1

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) 
NoNameMLer
  • 21
  • 5
  • This is an issue with the new Census API not currently accepting wildcards for block groups for certain years. We are unable to retrieve all block groups in a county from the API without iterating through each tract. Hopefully this functionality will be rolled back into the new API. See these issues in the tidycensus repo for more details: https://github.com/walkerke/tidycensus/issues/173 and https://github.com/walkerke/tidycensus/issues/193 – mfherman Oct 01 '19 at 13:16

0 Answers0