Description Usage Arguments Value Source Examples
Extract population estimates in 10-year age intervals for a given country from the UN World Population Prospects 2019 (WPP2019).
1 2 | get_age_pop(iso, format = c("wide", "long"), interval = c("10yr",
"5yr"))
|
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. |
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.
https://population.un.org/wpp/Download/Standard/Population/
1 2 | get_age_pop(iso = "FRA")
get_age_pop(iso = "FRA", format = "long", interval = "5yr")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.