View source: R/get_population.R
get_population | R Documentation |
get_population
is a function that allows the user to get a demographic
dataset regarding population and population proportions based on the
given parameters.
get_population(
v_state = "National",
v_year = "2021",
v_sex = "Total",
v_age = c("0", "5", "15", "25", "45", "55", "65", "70"),
age_groups = TRUE
)
v_state |
State(s) of desired data. |
v_year |
Year(s) of desired data. Must have numbers between 1970 and 2050. |
v_sex |
Vector selecting sex. Options: Female, Male and Total. |
v_age |
Specifies the age bins to aggregate and return. |
age_groups |
Specifies whether to aggregate the output by age groups. |
A demographic dataset indicating the year, the state, the state code
(CVE_GEO), the age (group, when age_groups = TRUE
), the population and
the proportion of each row, in relation to the selected year and sex.
get_population(v_state = "Chiapas",
v_year = 2015,
v_sex = "Total",
v_age = c(0, 15, 45, 75),
age_groups = FALSE)
get_population(v_state = c("Aguascalientes", "Campeche"),
v_year = c(2010, 2021),
v_sex = "Male",
v_age = c(0, 15, 45, 75),
age_groups = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.