Earlier quoted context omitted.
This doesn't seem unreasonable. 1) Whether it's user-friendly or not, it's still JSON, which makes JSON-P possible (they support JSON-P). 2) It probably mirrors the way they store their data (in tables, whether SQL or Access or Excel, doesn't really matter). 3) It's more compact than traditional JSON, which means less bandwidth, which means less cost. Keep in mind that this is essentially a not-for-profit API from a…
All good explanations, but I can't help but wish they had chosen a format like: { P0010001 : [ '710231', '4779736', // ... etc. ], NAME : [ 'Alaska', 'Alabama', // ... etc. ], state: [ '02', '01, // ... etc. ], // ... etc. }
The US Census now has an API
31–40 of 42 posts
Re: The US Census now has an API
#32> The response for all queries is formatted as a two dimensional JSON array where the first row provides column names and subsequent rows provide data values. Hmmm... looking at the example of this I can't help but think there has got to be a better way. This is more just a standard CSV (first row is header, all other rows are data). Using JSON for data formatted as such is kind of a waste of JSON. If you pass that e…
INSERT INTO table ('P0010001','NAME','state') VALUES (?,?,?)
and then loop through the remaining items using that to insert them into a database.Re: The US Census now has an API
#33Re: The US Census now has an API
#34Has anyone considered possible use-cases for this dataset? It's great to get excited about the data format, but actual use-cases currently seem a little limited to me. Of course this will hopefully change as more and more datasets become available.
Looking forward to many more visualizations and analysis thanks to the API :)
Re: The US Census now has an API
#35Re: The US Census now has an API
#36> The response for all queries is formatted as a two dimensional JSON array where the first row provides column names and subsequent rows provide data values. Hmmm... looking at the example of this I can't help but think there has got to be a better way. This is more just a standard CSV (first row is header, all other rows are data). Using JSON for data formatted as such is kind of a waste of JSON. If you pass that e…
Re: The US Census now has an API
#37You need to request a "key" (essentially a user ID) before you can make queries. I can imagine only 3 reasons for this: (1) they want to make you agree to the Terms & Conditions, (2) it gives a way to choke off a DDOS attack that makes repeated complex queries, or (3) the census bureau wants to track how you are using its service. The key is indeed easy to get, but I observe that Google would have exactly the same co…
However, both require that their users signup for an API key to do automated querying. (In fact, Google charges for its Web Search API now.) It's pretty standard for any API to want to be able to identify and potentially meter usage.
Re: The US Census now has an API
#38Wouldn't this be better served by a downloadable SQLite file rather than a web service?
Re: The US Census now has an API
#39You need to request a "key" (essentially a user ID) before you can make queries. I can imagine only 3 reasons for this: (1) they want to make you agree to the Terms & Conditions, (2) it gives a way to choke off a DDOS attack that makes repeated complex queries, or (3) the census bureau wants to track how you are using its service. The key is indeed easy to get, but I observe that Google would have exactly the same co…
(3B) Census data on some topics can move markets. If someone hacks to get a five minute lead time, the key policy gives them a start on figuring out who and maybe how.
Besides, this is the 2010 American Community Survey. Pretty sure it's moved all the markets it's going to move by now.
Re: The US Census now has an API
#40Earlier quoted context omitted.
for you, and your repliers: this data is already available as a downloadable file. Check out ftp://ftp.census.gov/ It's CSV, and it's kinda ugly-looking, but it's available. The 'full' data set is ...rather huge. The full data set for any particular report is rather huge. The advantage of this API, I expect, is it allows people to make quick, machine readable queries for useful subsets of the data. If you want a Java…
Excellent. Much easier than requesting API keys and parsing JSON. But that's just my opinion. CSV is beautiful. Simple and easy to manipulate into some other format if desired.