Description Usage Arguments Value Examples
Get raw data from the Census Bureau, JSON format is converted to R data frame
1 |
url |
character vector of length one containing the get query. |
data frame
1 2 3 4 5 6 | # State populations based on the 2010 Decennial Census
popstate <- read.census(sprintf("http://api.census.gov/data/2010/sf1?key=%s&get=P0010001,NAME&for=state:*", getkey()))
# get data on total population for all congressional districts of iowa
u1 <- sprintf("http://api.census.gov/data/2011/acs1_cd113?key=%s&get=DP02_0086E&for=congressional+district:*&in=state:19", getkey())
df2 <- read.census(u1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.