First, let me applaud the Census Bureau for doing this, it's an awesome project. I'm glad to see JSON as the response format for the API, but structure makes it really hard to use. I also haven't seen this list-of-lists format for individual records before. What would work much better would be one of the following: a) an array of objects. Within each object, each field name is a key, each value is the value associated ...more »
API Technical Discussions
The XML format for the data dictionary is a great start, but it could be a lot better. In particular, the hierarchical structure of the variables is not mapped. Let's take P012B049: African American female 85 years and over. It's extremely tedious to tease apart that this is the combination of three variables: race, sex, and age group. One of the great features of XML is its hierarchical structure, which makes it easy ...more »
Please note the API url has changed to api.census.gov. The former url will be disabled as of August 6th, so please update any apps. Thanks.
this applies to block groups, but others as well ... '+county:*+tract:*' with acs5 is not set to operate with the * wildcarding (using the above selects the first BG in each county only) but would be immensely valuable if county and tract can accept wildcarding rather than specific values. For most users, looking up a tract code is infeasible and generally not desireable (multi tracts being the norm). Thank you and ...more »
The acs5 at state level uses a gnis coding in query. maybe others do also. It is suggested that only FIPS codes, census codes (places, tracts etc), and OMB codes (cbsa etc) be used. folks are far more familiar with FIPS codes and it willl reduce a) confusion and b) Census resources to maintain a additional layer of geocodes. it might be that gnis is going to be a national standard, maybe, but we are not there now.
I'm trying to look at tables from the SF1 and I've noticed they don't seem to follow a consistent format. The ACS ID consistently use tableID-underscore-variable number. For SF1 variables I was under the impression that it worked similarly, because in the examples, the query for total population (for which the table ID is 'P001') uses the ID 'P0010001' or what I thought was Table P001 plus cell ID 0001. However I'm trying ...more »
Is there a way to use the NAME parameter for the IDs of variables? I've been using it to fill in the names of geographies but it doesn't seem to work for variable IDs in the output.
I can't find the following fields in the SF1 API:
P0020002 Total Urban Persons
P0020003 Total Rural Persons
Are only a subset of fields availible through this API?
Also it appears that I can only request up to 5 fields (seperated by commas) through the URL string. Is there a way to query more?
Hey I had a general question about the API. Im interested in finding out where the data set for a ZIP Code demographics can be found. I got approved for the API Key but need to find out where the Zip Code demographic info is. I would like to gather a ZIP Code from a data set I have and output the following. Does anyone know the codes for this, or on what page of the API manual it can be found? Median Income ($) ...more »
I'm having some trouble going from lat/lng to block data. The example here (http://www.census.gov/developers/data/geography_list_sf1.html) seem to indicate that state, country, and tract information is required to get the block data. Here (http://www.census.gov/developers/geo/) it recommends using the FCC's Block Conversion API to convert lat/lng to block FIPS code. That's great, but it doesn't return the tract so ...more »
First of all I want to thank you all at the Census for your brilliant effort in providing a usable API. I think the documentation needs to be improved, though, with more examples of string requests and possible use of wild cards, if any. I am currently working on a web application where I want the user to visualize demographic indicators within a certain distance from a specific/user-picked LatLong (for instance total ...more »
Via API queries I have easily obtained all county populations within a state, and all places populations within a state. Is there a way to obtain population for each place in a particular county? The main problem is that I want to know all of the places that are contained in one particular county. A secondary special case issue is the situation where a place (incorporated or CDP) may cross a county boundary... thus making ...more »
Greetings, Though we have provided this infomation in a reply to an existing thread, we also wanted to create a "fresh" post to let everyone know that the maximum number of variables per request has been increased from 4 to 50. The documentation on www.census.gov/developers/ will be updated to reflect this information as well. Thank you to everyone who has provided feekback so far. We do take the feedback into account ...more »
I wrote a python script to download all the census tract data for four different counties, parse it and save it as csv to upload to our database.
it works great! except that sometimes only the first and fourth queries return data.
Is there limit on how fast we can fire off queries to the API?
Just a reminder - you can now call up to 50 variables with each API call.