Download and format address ranges from the Census TIGER/Line API, and then
store in Arrow format. One of county
or zip
must be provided.
Usage
gc_prep_street_db(
data,
path = gc_cache_path(),
year = 2022,
save_edge = TRUE,
save_face = TRUE,
save_cens = FALSE,
refresh = FALSE
)
Arguments
- data
A data frame containing columns
state_code
and eithercounty_code
,zip
, orcity
, such as the output ofgc_address()
.- path
The folder where the database will be stored. See
gc_cache_path()
and the README for more information.- year
The year to download data for.
- save_edge
Whether to save road edge shapefile information. Needed to use
gc_code_pt()
.- save_face
Whether to save shapefile face information. Needed to use
gc_code_block()
.- save_cens
Whether to save additional Census geographies (school districts, NECTAs, etc.) for matching with
gc_code_block()
. Only applies ifsave_face=TRUE
.- refresh
If
TRUE
, force re-downloading of the Census data.
Examples
# \donttest{
# may take longer than 5 seconds
gc_prep_street_db(data.frame(state_code = "37", county_code = "055"))
gc_prep_street_db(data.frame(state_code = "37", county_code = "055",
zip = "27920", city = "Buxton"))
# }