Closed wzpeve closed 2 years ago
Could you share the direct API call that is working for you? I see at https://api.census.gov/data/2009/acs/acs5?get=NAME,B08101_001E&for=state:* the error message you shared.
This is what I just tried:
https://api.census.gov/data/2009/acs5?get=B08101_001E,NAME&for=tract&in=state:01
Edit: it seems like the /acs part after 2009 is the problem? But it only affects some variables in 2009 - odd! Also for the variable list: https://api.census.gov/data/2009/acs5/variables.html
Hmm - we had this discussion years ago: https://github.com/walkerke/tidycensus/issues/122 and https://github.com/walkerke/tidycensus/issues/227.
Census was supposed to have removed that endpoint and it appears that it did so for 2010 and later, but did not for 2009. I'll cross-reference this issue over on the Census's issue tracker. I'm not going to do a temporary fix as we can see with #227 that it creates downstream problems for other queries, so Census will need to fix on their end In the meantime you may want to consider the censusapi package (https://github.com/hrecht/censusapi) which allows for more custom construction of API calls.
Okay, thank you & happy new year!
I get the "unknown variable" error when trying to get data from 2005-2009 ACS, although the variables clearly exist for this survey and I could pull the data from census API directly. For example:
The same code runs with no problem for 2015-2019 ACS. So far I've run into this issue for tables B08101, B21005, B08126, B12006 but there could be more. I wonder if this is a known issue?