load_population.Rd
Loads information on (estimated) population
load_population(
dataset = "population",
raw_data = FALSE,
geo_level,
time_period,
language = "eng"
)
A dataset name ("population").
A boolean
setting the return of raw (TRUE
) or processed (FALSE
) data.
A string
that defines the geographic level of the data. Can be one of "country", "state" or "municipality".
A numeric
indicating for which years the data will be loaded, in the format YYYY. Can be any vector of numbers, such as 2010:2012.
A string
that indicates in which language the data will be returned. Portuguese ("pt") and English ("eng") are supported.
A tibble
.
if (FALSE) {
# Download raw data (raw_data = TRUE) at the country level
# from 2008 to 2010 (time_period = 2008:2010).
data <- load_population(
raw_data = TRUE,
geo_level = "country",
time_period = 2008:2010
)
# Download treted data (raw_data = FALSE) by state (geo_level = "state")
# from 2008 to 2010 (time_period = 2008:2010) in portuguese (language = "pt").
data <- load_population(
raw_data = FALSE,
geo_level = "state",
time_period = 2008:2010,
language = "pt"
)
}