The Grid containing the information is downloaded from the distribution

fileNF = loadData("FKA", "Image.ascii")
grid = DbGrid_createFromNF(fileNF)

ndim = 2
defineDefaultSpace(ESpaceType_RN(), ndim)
## NULL

The loaded file (called grid ) contains 3 variables:


dbfmt = DbStringFormat()
dbfmt$setFlags(flag_resume=FALSE,flag_vars=FALSE,flag_stats=TRUE, names="P")
## NULL
grid$display(dbfmt)
## 
## Data Base Grid Characteristics
## ==============================
## 
## Data Base Statistics
## --------------------
## 6 - Name P - Locator NA
##  Nb of data          =     262144
##  Nb of active values =     242306
##  Minimum value       =      0.000
##  Maximum value       =    314.000
##  Mean value          =     31.767
##  Standard Deviation  =     21.759
##  Variance            =    473.457
## NULL

Note that some pixels are not informed for variable P.


dbfmt$setFlags(flag_resume=FALSE,flag_vars=FALSE,flag_stats=TRUE, names="Ni")
## NULL
grid$display(dbfmt)
## 
## Data Base Grid Characteristics
## ==============================
## 
## Data Base Statistics
## --------------------
## 5 - Name Ni - Locator NA
##  Nb of data          =     262144
##  Nb of active values =     262144
##  Minimum value       =   1840.000
##  Maximum value       =  12593.000
##  Mean value          =  10111.444
##  Standard Deviation  =    884.996
##  Variance            = 783217.898
## NULL

dbfmt$setFlags(flag_resume=FALSE,flag_vars=FALSE,flag_stats=TRUE, names="Cr")
## NULL
grid$display(dbfmt)
## 
## Data Base Grid Characteristics
## ==============================
## 
## Data Base Statistics
## --------------------
## 4 - Name Cr - Locator NA
##  Nb of data          =     262144
##  Nb of active values =     262144
##  Minimum value       =   2591.000
##  Maximum value       =  24982.000
##  Mean value          =  16800.231
##  Standard Deviation  =    936.213
##  Variance            = 876495.558
## NULL

ggplot() + plot.correlation(grid,namex="Cr",namey="P", bins=100)


ggplot() + plot.correlation(grid,namex="Ni",namey="P", bins=100)


ggplot() + plot.correlation(grid,namex="Ni",namey="Cr", bins=100)


Using inverse square distance

grid$setLocator("P",ELoc_Z())
## NULL
err = DbHelper_dbgrid_filling(grid)

We concentrate on the variable of interest P (completed) in the next operations


p = ggDefaultGeographic()
p = p + plot(grid)
p = p + plot.decoration(title="P after completion")
ggPrint(p)