Read NHGIS data and geometry to return a named list or a combined sf
object.
Usage
read_nhgis_files(
path = NULL,
data_file = NULL,
data_file_select = NULL,
shape_file = NULL,
shape_file_select = NULL,
verbose = FALSE,
geometry = FALSE,
...
)Arguments
- path
Optional if
data_fileis supplied. A named list with a "data" and "shape" element containing the paths to thedata_fileandshape_filearguments of used byipumsr::read_nhgis()andipumsr::read_ipums_sf().- data_file
Path to a .zip archive containing an NHGIS extract or a single file from an NHGIS extract.
- data_file_select, shape_file_select
Passed to
file_selectparameter ofread_nhgis_data()orread_ipums_geometry().- shape_file
Path to a single .shp file or a .zip archive containing at least one .shp file. See Details section.
- verbose
Logical controlling whether to display output when loading data. If
TRUE, displays IPUMS conditions, a progress bar, and column types. Otherwise, all are suppressed.Will be overridden by
readr.show_progressandreadr.show_col_typesoptions, if they are set.- geometry
If
FALSE, return a list containing the data and geometry as two separate elements. IfTRUE, return a data frame with the geometry joined to the data and converted to a sf object.- ...
Additional parameters passed to both
read_nhgis_data()andread_ipums_geometry().