Skip to contents

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 rate

  • nmr: Neonatal mortality rate

  • pnmr: Post-neonatal mortality rate

  • anc1: ANC1 survey coverage rate

  • penta1: Penta1 survey coverage rate

  • twin_rate: Twin birth rate

  • preg_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).

Value

A data frame merged with the corresponding shapefile for subnational mapping.

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')
} # }