Closed tomahawklin closed 5 years ago
BTW the original code can work with 2016 acs5 data. Probably the census side is not making it consistent across different years? If we don't count on them making the correction, is there any workaround we can try in the module itself? Many thanks!
Hi, the module is trying to use the recent updated Census API endpoints. It looks like the updated endpoints do not work consistently for all geographies, at least in this case. For instance, the code above works for 2013 with county-level data; the error is only at the block group level. I will investigate this further and update the _download function accordingly to fix the error.
Hi, I could not find documentation indicating which geographies still fall under the old endpoints. As a workaround, I have added an option to the download function in censusdata to force use of the old endpoint. This resolves your problem:
year = 2013 g = censusdata.censusgeo([('state', '25'), ('county', '017'), ('block group', '*')]) features = ['B25001_001E', 'B19013_001E'] d = censusdata.download('acs5', year, g, features, endpt='old')
Hi I'm not sure if this is an issue about the module itself, but when I try to retrieve 2013 ACS 5-year estimates data, I used a following code:
However I got an value error
unknown/unsupported geography heirarchy
I notice the url requested is
And if I remove
/acs
in the url, it actually worked: