
Maps of stool adequacy by district and year
generate_stool_ad_maps_dist.RdGenerates maps of stool adequacy map by district and year.
Usage
generate_stool_ad_maps_dist(
ctry.data,
dstool,
ctry.shape,
prov.shape,
dist.shape,
start_date,
end_date,
output_path = Sys.getenv("DR_FIGURE_PATH"),
caption_size = 3
)Arguments
- ctry.data
listLarge list containing polio data for a country. This is the output ofextract_country_data()orinit_dr().- dstool
tibbleDistrict stool adequacy table. This is the output off.stool.ad.01()calculated at the district level.- ctry.shape
sfCountry shapefile in long format.- prov.shape
sfProvince shapefile in long format.- dist.shape
sfDistrict shapefile in long format.- start_date
strStart date of analysis.- end_date
strEnd date of analysis.- output_path
strLocal path where to save the figure to.- caption_size
numericSize of the caption. Defaults to 3.
Examples
if (FALSE) { # \dontrun{
ctry.data <- init_dr("algeria")
dstool <- f.stool.ad.01(
afp.data = ctry.data$afp.all.2,
admin.data = ctry.data$dist.pop,
start.date = start_date,
end.date = end_date,
spatial.scale = "dist",
missing = "good",
bad.data = "inadequate",
rolling = F,
sp_continuity_validation = F
)
ctry.shape <- load_clean_ctry_sp(ctry_name = "ALGERIA", type = "long")
prov.shape <- load_clean_prov_sp(ctry_name = "ALGERIA", type = "long")
dist.shape <- load_clean_dist_sp(ctry_name = "ALGERIA", type = "long")
generate_stool_ad_maps_dist(
ctry.data, dstool,
ctry.shape, prov.shape, dist.shape,
"2021-01-01", "2023-12-31"
)
} # }