I have some code (below) which runs fine for getting census block group data for a certain geo (Atlanta as example below) for ACS surveys 2013/14/15/16/17. however when I run it for 2012 or prior i get the following error.
Getting data from the 2008-2012 5-year ACS Error: Your API call has errors. The API message returned is error: unknown/unsupported geography heirarchy.
atl_counties <- c("Barrow",
"Bartow",
"Butts",
"Carroll",
"Cherokee",
"Clayton",
"Cobb",
"Coweta",
"Dawson",
"DeKalb",
"Douglas",
"Fayette",
"Forsyth",
"Fulton",
"Gwinnett",
"Haralson",
"Heard",
"Henry",
"Jasper",
"Lamar",
"Meriwether",
"Morgan",
"Newton",
"Paulding",
"Pickens",
"Pike",
"Rockdale",
"Spalding",
"Walton")
atl_vars_short <- c(
total_pop = "B01003_001",
median_income = "B19013_001",
households = "B11001_001",
housing_units = "B25001_001",
agg_hh_income ="B19025_001"
)
# This works
cbg_data_atl_2013 <- get_acs(geography = "block group",
variables = atl_vars_short,
state ='GA',
county = atl_counties,
year = 2013,
geometry = FALSE)
# This does not work
cbg_data_atl_2012 <- get_acs(geography = "block group",
variables = atl_vars_short,
state ='GA',
county = atl_counties,
year = 2012,
geometry = FALSE)