get_age_pop: Extract age-specific population estimates for a given country...

Description Usage Arguments Value Source Examples

View source: R/get_age_pop.R

Description

Extract population estimates in 10-year age intervals for a given country from the UN World Population Prospects 2019 (WPP2019).

Usage

1
2
get_age_pop(iso, format = c("wide", "long"), interval = c("10yr",
  "5yr"))

Arguments

iso

ISO3 code for country of interest

format

Return format ("wide" or "long"). Format "wide" yields a single-row data.frame with age classes as column names, whereas "long" yields a 2-column data.frame with the first defining age classes and the second giving corresponding population sizes. Defaults to "wide".

interval

Age interval ("5yr" or "10yr"). The WPP data is originally in 5-year age intervals, but by default we aggregate to 10-year intervals to match the intervals at which covid severity estimates are usually available.

Value

A data.frame. If format = "wide" returns a single-row data.frame with age classes as column names, whereas if format = "long" returns a 2-column data.frame with the first defining age classes and the second giving corresponding population sizes.

Source

https://population.un.org/wpp/Download/Standard/Population/

Examples

1
2
get_age_pop(iso = "FRA")
get_age_pop(iso = "FRA", format = "long", interval = "5yr")

epicentre-msf/covidestim documentation built on Jan. 1, 2021, 1:06 a.m.