Skip to contents

The map displays the U15 population for each province for a country.

Usage

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

Arguments

ctry.data

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

ctry.shape

sf Country shape file in long format.

prov.shape

sf Province shape file in long format.

end_date

str End date of the analysis.

output_path

str Local path where to save the figure.

caption_size

numeric Size of the caption. Default is 11.

Value

ggplot A map of U15 province 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")
generate_pop_map(ctry.data, ctry.shape, prov.shape, "2023-12-31")
} # }