Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Retrieve data at County level - Example please ? #91

Closed
UGuntupalli opened this issue Jun 9, 2020 · 1 comment
Closed

Can't Retrieve data at County level - Example please ? #91

UGuntupalli opened this issue Jun 9, 2020 · 1 comment

Comments

@UGuntupalli
Copy link

I am trying to get population using ACS1 at a county level or a zip code level if possible.
ACS5 supports a method called zipcode which makes this possible as recommended here (#76). However, for my needs, I need this data through ACS1, so what I tried was :

   # Define a consensus class object to get population estimates 
   consensus_object = Census(api_key_census)

   # Get total population estimates 
   consensus_object.acs1.get(('NAME', 'B01003_001E'), {'for': 'county', 'in': 'county:36047, state:36'})

Trying to frame this similar to (#73). However, one thing that I am unable to figure out is:

  1. Does ACS1 support this ?
  2. If it does, can someone provide a working example ?
  3. Assuming, there is no way to do this, can anyone suggest alternatives with this or a different package ?
@jcgiuffrida
Copy link
Contributor

ACS1 does not support ZIP codes. #76 (comment)

You can retrieve population data for decently large counties through ACS1. Only about 800 counties are provided in ACS1.

>>> client = Census(os.environ.get('CENSUS_API_KEY'))
>>> results = client.acs1.state_county(['NAME', 'B01003_001E'], '*', '*')
>>> len(results)
838

@fgregg fgregg closed this as completed Oct 13, 2021
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

No branches or pull requests

3 participants