Skip to contents

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_file is supplied. A named list with a "data" and "shape" element containing the paths to the data_file and shape_file arguments of used by ipumsr::read_nhgis() and ipumsr::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_select parameter of read_nhgis_data() or read_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_progress and readr.show_col_types options, if they are set.

Value

A named list with "data" and "shape" elements or a combined sf data frame.