Skip to content

ACS5: restrict state_county_blockgroup to 2013+#169

Open
c-tonneslan wants to merge 1 commit into
datamade:masterfrom
c-tonneslan:fix/acs5-blockgroup-supported-years
Open

ACS5: restrict state_county_blockgroup to 2013+#169
c-tonneslan wants to merge 1 commit into
datamade:masterfrom
c-tonneslan:fix/acs5-blockgroup-supported-years

Conversation

@c-tonneslan
Copy link
Copy Markdown

Block group geography wasn't published in the ACS API until 2013 (2012 geography schema vs 2013 geography schema). Calling state_county_blockgroup with an earlier year currently makes the API trip and return unknown/unsupported geography hierarchy, which is hard to diagnose. Narrow the @supported_years so callers get the local UnsupportedYearException up front instead, like the other geography-specific methods already do.

Behavior change is just on years 2009-2012, which the API was rejecting anyway.

Closes #140.
Closes #155.

Block group geography wasn't published in the ACS API until 2013.
Calling state_county_blockgroup with an earlier year currently hits
the Census API and comes back with 'unknown/unsupported geography
hierarchy', which doesn't help anyone diagnose the actual problem.
Narrow the @supported_years on this method so callers get an
UnsupportedYearException up front instead, matching the behavior
of the other geography-specific methods on the class.

Closes datamade#140, datamade#155.

Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error: "unknown/unsupported geography hierarchy" when using state_county_blockgroup function pre-2013 ACS5 Block Group Data Error

1 participant