
Stool adequacy maps by province
generate_stool_ad_maps.RdGenerates maps that contain the stool adequacy rate for each province per year.
Usage
generate_stool_ad_maps(
ctry.data,
pstool,
ctry.shape,
prov.shape,
start_date,
end_date,
output_path = Sys.getenv("DR_FIGURE_PATH"),
caption_size = 3
)Arguments
- ctry.data
listLarge list containing polio data of a country. This is the output of eitherextract_country_data()orinit_dr().- pstool
tibbleStool adequacy table at province level. This is the output off.stool.ad.01()calculated at the province level.- ctry.shape
sfCountry shapefile in long format.- prov.shape
sfProvince shapefile in long format.- start_date
strStart date of analysis.- end_date
strEnd date of analysis.- output_path
strWhere to save the figure to.- caption_size
numericSize of the caption. Defaults to 3.
Examples
if (FALSE) { # \dontrun{
ctry.data <- init_dr("algeria")
pstool <- f.stool.ad.01(
afp.data = ctry.data$afp.all.2,
admin.data = ctry.data$prov.pop,
start.date = start_date,
end.date = end_date,
spatial.scale = "prov",
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")
generate_stool_ad_maps(ctry.data, pstool, ctry.shape, prov.shape, "2021-01-01", "2023-12-31")
} # }