
Create super regions from subsets of consequential geographies
create_cg_super_regions.RdCreate a shapefile containing super regions of consequential geographies.
Arguments
- cg
tibbleTable containing data about existing CGs, the dataset is expected to contain the following headers of the following datatypes:type:strConsequential geographies must have a type of"cg". All other can beNA.label:strGeographic grouping (i.e., "Lake Chad"). Can be a country or a subset of a country (i.e., "Northern Yemen"). This column will be used to group the consequential geographies for creating super regions.ctry:strName of the country.prov:strName of the province.dist:strName of the district.adm_level:strName of the administrative level. Must be one ofNAif at the country level,"adm1"if at the province level, and"adm2if at the district level.
- ctry
sfCountry level spatial objects. Can be theglobal.ctryspatial object attached to the output ofget_all_polio_data().- prov
sfProvince level spatial objects. Can be theglobal.provspatial object attached to the output ofget_all_polio_data().- dist
sfDistrict level spatial objects. Can be theglobal.distspatial object attached to the output ofget_all_polio_data().
Details
You can download an example dataset using: sirfunctions_io("read", file_loc = "Data/misc/consequential_geographies.rds").
Examples
if (FALSE) { # \dontrun{
polio_data <- get_all_polio_data()
cg <- sirfunctions_io("read", file_loc = "Data/misc/consequential_geographies.rds")
create_cg_super_regions(cg, ctry = polio_data$global.ctry,
prov = polio_data$global.prov, dist = polio_data$global.dist)
} # }