read_tracts {censobr} | R Documentation |
Download census tract-level data from Brazil's censuses
Description
Download census tract-level aggregate data from Brazil's censuses.
Usage
read_tracts(
year,
dataset,
as_data_frame = FALSE,
showProgress = TRUE,
cache = TRUE,
verbose = TRUE
)
Arguments
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 |
Value
An arrow Dataset
or a "data.frame"
object.
Examples
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
)