read_terra_micro | R Documentation |
Reads a microdata dataset downloaded from the IPUMS Terra extract system.
read_terra_micro( data_file, ddi_file = NULL, data_layer = NULL, n_max = Inf, verbose = TRUE, var_attrs = c("val_labels", "var_label", "var_desc") )
data_file |
Path to the data file, which can either be the .zip file directly downloaded from the IPUMS Terra website, a path to the unzipped version of that folder, or to the csv unzipped from the download. |
ddi_file |
(Optional) If the download is unzipped, path to the .xml file which provides usage and citation information for extract. |
data_layer |
For .zip extracts with multiple datasets, the name of the
data to load. Accepts a character vector specifying the file name, or
|
n_max |
Maximum number of observations to read from the data |
verbose |
Logical, indicating whether to print progress information to console. |
var_attrs |
Variable attributes to add from the DDI, defaults to
adding all (val_labels, var_label and var_desc). See
|
read_terra_micro
returns a tbl_df
with the tabular data. Use
read_ipums_sf
or read_ipums_sp
to read shape
data out of a microdata Terra extract.
Other ipums_read:
read_ipums_micro_chunked()
,
read_ipums_micro_yield()
,
read_ipums_micro()
,
read_ipums_sf()
,
read_nhgis()
,
read_terra_area()
,
read_terra_raster()
## Not run: data <- read_terra_micro("2553_bundle.zip") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.