
Build province population
process_prov_pop_data.RdCleans the province level population data from the POLIS API and fill in gaps in population counts using district roll-ups where applicable and application of growth rates.
Usage
process_prov_pop_data(
pop_data,
pop_dir = "GID/PEB/SIR/Data/pop",
dist_pop_file_path = file.path(pop_dir, "processed_pop_file", "dist.pop.long.parquet"),
prov_file_path = "GID/PEB/SIR/Data/spatial/global.prov.rds",
growth_rate_file_path = file.path(pop_dir,
"pop raw/WPP2024_GEN_F01_DEMOGRAPHIC_INDICATORS_COMPACT.xlsx"),
output_dir = file.path(pop_dir, "processed_pop_file"),
output_type = "parquet",
edav = TRUE
)Arguments
- pop_data
tibbleProvince population dataset pulled from the POLIS API.- pop_dir
strDefault directory to the population folder.- dist_pop_file_path
strFile path to the cleaned district pop file.- prov_file_path
strFile path to the global province shapefile.- growth_rate_file_path
strFile path to the growth rate Excel file.- output_dir
strFile path to the output directory.- output_type
strHow the population file should be outputted.- edav
logicalWhether files are on EDAV. Defaults toTRUE.
Examples
if (FALSE) { # \dontrun{
pop_data <- load_polis_pop("prov")
prov_pop <- process_prov_pop_data(pop_data)
} # }