Get Mapping Data for Subnational Analysis
Source:R/5_mapping_get_mapping_data.R
get_mapping_data.Rd
get_mapping_data
merges input data with a country's shapefile and computes
indicator coverage at the specified subnational level.
Usage
get_mapping_data(
.data,
un_estimates,
rates,
subnational_map = NULL,
admin_level = c("adminlevel_1", "district")
)
Arguments
- .data
A data frame containing the input data for mapping.
- un_estimates
A data frame containing UN estimates for coverage or demographic indicators.
- rates
A named list of rates required for calculations, including:
sbr
: Stillbirth ratenmr
: Neonatal mortality ratepnmr
: Post-neonatal mortality rateanc1
: ANC1 survey coverage ratepenta1
: Penta1 survey coverage ratetwin_rate
: Twin birth ratepreg_loss
: Pregnancy loss rate
- subnational_map
An optional data frame containing additional mapping information to join with the shapefile.
- admin_level
A character string specifying the level of analysis. Options are:
'adminlevel_1'
: First administrative level.'district'
: District level (default for Kenya).
Examples
if (FALSE) { # \dontrun{
rates <- list(sbr = 0.02, nmr = 0.03, pnmr = 0.02, anc1 = 0.8, penta1 = 0.75,
twin_rate = 0.015, preg_loss = 0.03)
get_mapping_data(data, un_estimates, rates, level = 'adminlevel_1')
} # }