Helper function to download Census data
load_tiger(
url,
refresh = getOption("tigris_refresh", FALSE),
tigris_type = NULL,
class = getOption("tigris_class", "sf"),
progress_bar = TRUE,
keep_zipped_shapefile = FALSE,
filter_by = NULL
)
sf or sp data frame
URL for zipped shapefile in TIGER database (constructed in calling function).
Whether to re-download shapefiles if cached. Defaults to value of the global option "tigris_refresh" if that option is, and FALSE if not. This will override the behavior set in "tigris_refresh" option if a value (TRUE or FALSE) is provided.
Added as an attribute to return object (used internally).
Class of return object. Must be one of "sf" (the default) or "sp".
If set to FALSE, do not display download progress bar (helpful for R Markdown documents). Defaults to TRUE.
If set to TRUE, do not delete zipped shapefile (stored in temporary directory or TIGRIS_CACHE_DIR depending on the configuration of global option "tigris_use_cache"). Defaults to FALSE.
Geometry used to filter the output returned by the function. Can be an sf object, an object of class bbox
, or a length-4 vector of format c(xmin, ymin, xmax, ymax)
that can be converted to a bbox. Geometries that intersect the input to filter_by
will be returned.