read_tracts | R Documentation |
Download census tract-level aggregate data from Brazil's censuses.
read_tracts(
year,
dataset,
as_data_frame = FALSE,
showProgress = TRUE,
cache = TRUE,
verbose = TRUE
)
year |
Numeric. Year of reference in the format |
dataset |
Character. The dataset to be opened. The following options are available for each edition of the census: 2000 Census
2010 Census
2022 Census
The For a complete description of the datasets, themes, and variables, check
|
as_data_frame |
Logical. When |
showProgress |
Logical. Defaults to |
cache |
Logical. Whether the function should read the data cached
locally, which is much faster. Defaults to |
verbose |
A logical. Whether the function should print informative
messages. Defaults to |
An arrow Dataset
or a "data.frame"
object.
library(censobr)
# return data as arrow Dataset
df <- read_tracts(
year = 2022,
dataset = 'Domicilio',
showProgress = FALSE
)
# return data as data.frame
df <- read_tracts(
year = 2010,
dataset = 'Basico',
as_data_frame = TRUE,
showProgress = FALSE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.