
Maps of NPAFP rates by district and year
generate_npafp_maps_dist.RdGenerates maps of the NPAFP rates for each district per year.
Usage
generate_npafp_maps_dist(
dist.extract,
ctry.shape,
prov.shape,
dist.shape,
start_date,
end_date,
output_path = Sys.getenv("DR_FIGURE_PATH"),
caption_size = 2
)Arguments
- dist.extract
tibbleProvince NPAFP rate table. This is the output off.npafp.rate.01()calculated at the province 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 the figure is saved to.- caption_size
numericSize of the caption. Default is2.
Examples
if (FALSE) { # \dontrun{
ctry.data <- init_dr("algeria")
dist.extract <- f.npafp.rate.01(
afp.data = ctry.data$afp.all.2,
pop.data = ctry.data$prov.pop,
start.date = start_date,
end.date = end_date,
spatial.scale = "dist",
pending = T,
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_npafp_maps_dist(
dist.extract, ctry.shape, prov.shape, dist.shape,
"2021-01-01", "2023-12-31"
)
} # }