Skip to contents

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()

Usage

download.geo(
  mystates,
  end.year = acsdefaultendyearhere_func(),
  folder = getwd(),
  testing = FALSE,
  attempts = 5,
  silent = FALSE
)

Arguments

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)

Value

Side effect is downloading the file.

Details

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:

See also

get.acs() which uses this, and get.read.geo()

Examples

 if (FALSE) { # \dontrun{
   download.geo("de")
   download.geo( c("pr", "dc") )
 } # }