| wpp_age | R Documentation |
This function is deprecated in favour of passing population data directly
to contact_matrix() via the survey_pop argument. Additionally, the
underlying wpp2017 data is outdated. For more recent population data,
use the wpp2024 package from GitHub.
wpp_age(countries, years)
countries |
countries, will return all if not given |
years |
years, will return all if not given |
This uses data from the wpp2017 package but combines male and female,
and converts age groups to lower age limits. If the requested
year is not present in the historical data, WPP projections
are used.
data frame of age-specific population data
wpp_age("Italy", c(1990, 2000))
# For more recent data, use wpp2024 from GitHub:
# remotes::install_github("PPgp/wpp2024")
# library(wpp2024)
# data(popAge1dt)
# uk_pop <- popAge1dt[name == "United Kingdom" & year == 2020,
# .(lower.age.limit = age, population = pop * 1000)]
# contact_matrix(polymod, countries = "United Kingdom", survey_pop = uk_pop)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.