Skip to contents

Generates a map of U15 district populations, with population centers and roads.

Usage

generate_dist_pop_map(
  ctry.data,
  ctry.shape,
  prov.shape,
  dist.shape,
  end_date,
  output_path = Sys.getenv("DR_FIGURE_PATH"),
  caption_size = 11
)

Arguments

ctry.data

list Large list of polio country data. This is the output of either extract_country_data() or init_dr().

ctry.shape

sf Shapefile of country in long format.

prov.shape

sf Shapefile of province in long format.

dist.shape

sf Shapefile of district in long format.

end_date

str End date of the analysis.

output_path

str Local path of where to save the figure.

caption_size

numeric Size of the caption. Default is 11.

Value

ggplot A map of district level populations and population centers.

Examples

if (FALSE) { # \dontrun{
ctry.data <- init_dr("algeria")
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_pop_map(ctry.data, ctry.shape, prov.shape, dist.shape, "2023-12-31")
} # }