Description Usage Arguments Details Value
setup_space
creates the spatial grid of the simulation from a user defined
shapefile and resolution. If vaccination data are aggregated at a larger scale,
pass the id column (i.e. numeric id of the administrative unit) to assign each grid cell to.
Alternatively if vaccination data are aggregated at the grid cell level or vaccination
is absent, then pass NULL to id_col
.
1 | setup_space(shapefile, resolution = 1000, id_col, use_fasterize = FALSE)
|
shapefile |
a shapefile (either an sf or sp object) of the area being simulated should be projected in UTM coordinates |
resolution |
numeric, the resolution in meters |
id_col |
character, the name of the attribute/column to rasterize the data by, largely for allocating vaccinations |
use_fasterize |
boolean, if TRUE and class of shapefile is sf will use the fasterize package (if installed) |
To do:
Add examples with sf and sp & different id_col
Tests: resolution too large? if no fasterize, if no id col
raster of simulation bounds rasterized by the id column specify (i.e. each grid cell allocated to a location)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.