Skip to contents

Download extract with download_ipumsr_extract() and return a list of file paths for the data and shape files.

Usage

get_ipumsr_extract_paths(
  extract = NULL,
  data_file = NULL,
  shape_file = NULL,
  submit_extract = TRUE,
  download_extract = TRUE,
  download_dir = getwd(),
  overwrite = FALSE,
  progress = TRUE,
  refresh = FALSE,
  api_key = Sys.getenv("IPUMS_API_KEY")
)

Arguments

extract

An ipums_extract object.

submit_extract

If extract is not NULL and submit_extract = TRUE, use ipumsr::submit_extract to submit the extract.

download_dir

Path to the directory where the files should be written. Defaults to current working directory.

overwrite

If TRUE, overwrite any conflicting files that already exist in download_dir. Defaults to FALSE.

progress

If TRUE, output progress bar showing the status of the download request. Defaults to TRUE.

api_key

API key associated with your user account. Defaults to the value of the IPUMS_API_KEY environment variable. See set_ipums_api_key().

Value

A named list with "data" and "shape" elements containing extract file paths.