Using Data

gender by zip code

I'm attempting to write some Python code to retrieve this information. I only have a little experience with APIs, and I'm kind of lost.

import requests

query_params = { 'apikey': 'mykey',

'place': , #would like to select all

'state': # would like to select all

#probably need one for ZCTAs?

}

# PO120001 - PO120049 all sex by age categories

# not sure how to request them

endpoint = 'http://api.census.gov/data/2010/sf1' # this is probably wrong

response = requests.get(endpoint, params=query_params)

data = response.json # i think

Has anyone done anything like this? Is Python the wrong way to be doing it?

Thanks

Tags

Submitted by

Stage: Active

Feedback Score

0 votes
1 up votes
1 down votes
Idea#97

Idea Details

Vote Activity

  1. Upvoted
  2. Downvoted

Similar Ideas [ 4 ]

Events

  1. The idea was posted

Comments

Add your comment