8000 Error: "unknown/unsupported geography hierarchy" when using state_county_blockgroup function · Issue #155 · datamade/census · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Error: "unknown/unsupported geography hierarchy" when using state_county_blockgroup function #155
Open
@praful-dodda

Description

@praful-dodda

def state_county_blockgroup(self, fields, state_fips, county_fips,

Description

I'm encountering an error when trying to fetch block group level demographics data using the state_county_blockgroup function. The API returns "unknown/unsupported geography hierarchy" when I make calls with certain tract and block group codes.

Steps to Reproduce

  1. Set up Census client with a valid API key
  2. Attempt to fetch block group level data using code similar to:
from census import Census

# Initialize client
census = Census(api_key, year=2011)

# Error occurs when trying to fetch data for:
# state_fips=48, county_fips=339, blockgroup=1, tract=694201
data = census.acs5.state_county_blockgroup(
    fields=['B01001_001E'],  # Population estimate
    state_fips='48',
    county_fips='339',
    blockgroup='1',
    tract='694201'
)

Error Message

Error fetching data for GEOID 483396942011: error: unknown/unsupported geography hierarchy

What I've Tried

  • Ensured all FIPS codes are properly formatted as strings
  • Verified that the tract and block group values match the expected format

Possible Issues

I suspect the issue might be related to:

  1. The tract code format (694201) - possibly needs leading zeros?
  2. The year 2011 possibly having different geography hierarchy requirements
  3. The combination of these specific geography codes may not exist or may require a different format

Additional Context

I'm trying to fetch demographics data for multiple block groups in a pandas dataframe, and this error occurs for each record.

Any help or guidance would be greatly appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0