[R] Reading data from Census API into R

Corey Sparks corey.sparks at UTSA.EDU
Thu Feb 6 19:39:48 CET 2014


Dear list, 
I've gotten access to the US Census Bureau's developer API for accessing
various datasets they maintain. Here is the link:
http://www.census.gov/developers/

They say that:
"Data are accessible to software developers through a stateless HTTP GET
request. Up to 50 variables can be requested with a single API call. "

I can successfully query the API in a web browser, for instance:
http://api.census.gov/data/2010/sf1?key=mykey&get=P0010001,NAME&for=county:*&in=state:48

which returns the population total for each county in the state of Texas.
The API returns the requested data in this structure:
[["P0030001","NAME","state","county"],
["58458","Anderson County","48","001"],
["14786","Andrews County","48","003"],
["86771","Angelina County","48","005"],
["23158","Aransas County","48","007"],
["9054","Archer County","48","009"],
["1901","Armstrong County","48","011"],
["44911","Atascosa County","48","013"],
["28417","Austin County","48","015"]]

So my question is, how can I perform this query in R, using these types of
queries? Any thoughts would be most welcome.
Thanks 
Corey




-----
Corey Sparks, PhD
Assistant Professor
Department of Demography
University of Texas at San Antonio
501 West César E. Chávez  Blvd 
Monterey Building 2.270C
San Antonio, TX 78207
210-458-3166
corey.sparks 'at' utsa.edu
https://rowdyspace.utsa.edu/users/ozd504/www/index.htm
--
View this message in context: http://r.789695.n4.nabble.com/Reading-data-from-Census-API-into-R-tp4684877.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list