download.geo | R Documentation |
Download text file from US Census Bureau with geographic information for American Community Survey.
The geo file is used to join data file(s) to FIPS/GEOID/NAME/SUMLEVEL/CKEY.
Used by get.acs()
download.geo(
mystates,
end.year = acsdefaultendyearhere_func(),
folder = getwd(),
testing = FALSE,
attempts = 5,
silent = FALSE
)
mystates |
vector of character 2-letter State abbreviations specifying which are needed |
end.year |
Specifies end year of 5-year summary file such as "2020" |
folder |
folder to use for saving files - default is current working directory |
testing |
Default to FALSE. If TRUE, provides info on progress of download. |
attempts |
Default is 5, specifies how many tries (maximum) for unzipping before trying to redownload and then give up. |
silent |
Optional, default is FALSE. Whether progress info should be sent to standard output (like the screen) |
For information on this new Summary File format visit:
https://www.census.gov/programs-surveys/acs/data/summary-file.html
Downloads to the current working directory unless another folder is specified. In contrast to the data files, the geo file is not zipped so does not have to be unzipped once downloaded. Key functions used:
url.to.find.zipfile()
geofile()
data(lookup.states, package="proxistat")
Side effect is downloading the file.
get.acs()
which uses this, and get.read.geo()
## Not run:
download.geo("de")
download.geo( c("pr", "dc") )
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.