R acs package - fetching county level data for all us only third of counties ouput

288 views Asked by At

Thanks in advance for any help.

Trying to retrieve county level(entire US) data for one variable from US Census with acs package. Only getting data for 830 counties. Trying to get data for all 3200 or so counties. Tried setting the geo.make to a single state and similar proportion of counties were outputted.

install.packages("acs") 
library(acs)

geocou <- geo.make(state = "*",county = "*", combine = FALSE)
inc <- acs.fetch(geography = geocou, endyear = 2015, span = 1, variable = "B19052_001")

There should be a star in the quotation marks of the 'geo.make' function.

1

There are 1 answers

0
Hack-R On

Please review this document:

http://www.census.gov/programs-surveys/acs/geography-acs/areas-published.html

Only 830 counties are published in the 1-year ACS. However all 3,221 are in the 5-year ACS:

inc <- acs.fetch(geography = geocou, endyear = 2012, span = 5, variable = "B19052_001",
                 key="123")

dim(inc)

[1] 3221 1

inc <- acs.fetch(geography = geocou, endyear = 2015, span = 5, variable = "B19052_001", key="123")
dim(inc)

[1] 3220 1