ggmap_KS {SpatFD} | R Documentation |
Map plot of a 'KS_pred' object
Description
A visualization of the predicted kriging in a colormap for a specific window time.
Usage
ggmap_KS(KS, map_path, window_time = NULL, method = "lambda", map_n = 5000,
zmin = NULL, zmax = NULL, graph = "plotly")
Arguments
KS |
Object of class 'KS_pred'. Not NULL. |
map_path |
Character indicating the directory of the shape file or an object of class SpatialPolygonDataFrame load from a shape file by |
window_time |
numeric. Vector of window time to see the spatial prediction. If NULL choose the range values of KS$SFD. Default NULL. |
method |
character. "lambda" or "scores". Default "lambda". |
map_n |
numeric. Number of points to sample in the map. Default 5000. |
zmin |
numeric. Minimum value predicted for the color scale. If NULL is chosen from the data. Default NULL. |
zmax |
numeric. Maximum value predicted for the color scale. If NULL is chosen from the data. Default NULL. |
graph |
character. "plotly" or "gg" whether to use plotly or ggplot graphics. Default "plotly". |
Value
Plotly or ggplot image
Author(s)
Diego Sandoval diasandovalsk@unal.edu.co.
References
Bohorquez, M., Giraldo, R., & Mateu, J. (2016). Multivariate functional random fields: prediction and optimal sampling. Stochastic Environmental Research and Risk Assessment, 31, pages53–70 (2017).
See Also
Examples
library(gstat)
data(AirQualityBogota)
newcoorden=data.frame(X=seq(93000,105000,len=100),Y=seq(97000,112000,len=100))
SFD_PM10 <- SpatFD(PM10, coords = coord[, -1], basis = "Bsplines", nbasis = 17,
norder=5, lambda = 0.00002, nharm=3)
modelos <- list(vgm(psill = 2634000, "Exp", range = 2103.25, nugget = 0),
vgm(psill = 101494.96, "Exp", range = 1484.57, nugget = 0),
vgm(psill =53673, "Exp", range = 42406, nugget = 0))
KS_SFD_PM10_both <- KS_scores_lambdas(SFD_PM10, newcoorden, method = "both",
model = modelos)
ggmap_KS(KS_SFD_PM10_both,
map_path = map,
window_time = c(5108,5109,5110),
method = "scores",
zmin = 50,
zmax = 120)