| spCFmap | R Documentation |
Opens a Shiny web app for mapping CFSM results over a basemap. The function has two modes:
spCFmap(mod = NULL, crs = NULL, launch = TRUE, ...)
mod |
Optional fitted model returned by |
crs |
Coordinate reference system of the coordinates that were passed
to the model: an EPSG code (e.g. |
launch |
Logical; if |
... |
Passed to |
spCFmap()Without mod, the full application is
launched: models (cf_lm, cf_glm,
cf_dglm, cf_downscale) are fitted inside the app
from demo data (meuse, a space-time air-quality set, and an areal
downscaling set) or from user CSV / GeoJSON uploads, and predictions can be
exported as CSV or GeoJSON.
spCFmap(mod, crs)With a fitted model, a small app maps that model directly. The layer (predictive mean / SD, covariate effect, or a scale-wise spatial component), colour scaling, and - for space-time or downscaling fits - the time range or bandwidth range are chosen interactively.
If launch = TRUE, the value returned by
runApp (invisibly); otherwise a shiny.appobj.
cf_lm, cf_glm, cf_dglm,
cf_downscale, sp_scalewise
## Not run:
spCFmap() # full app, opens in the browser
spCFmap(launch.browser = FALSE) # print the local URL instead
m <- cf_lm(y = y, x = x, x0 = x0, coords = coords, coords0 = coords0,
mod_hv = cf_lm_hv(y = y, x = x, coords = coords))
spCFmap(m, crs = 28992) # map an already-fitted model
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.