New Tutorial: Make a Census Explorer!

[This article was first published on AriLamstein.com » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Today I am happy to announce a new tutorial I am running titled Make a Census Explorer with Shiny! It is free and will be held July 28 in San Francisco. In the tutorial we will combine R’s Shiny framework for web development with the census-mapping choroplethr package to create a browser-based census explorer. You can see the final app here. Here is a screenshot:

Screen Shot 2015-07-06 at 10.34.02 AM

Those who took my free email course Learn to Map Census Data might be surprised at the “Year” option in the app.  After all, data.frames like df_state_demographics just contain data from 2013. Where does the extra data come from? Well, choroplethr can connect to the US Census Bureau’s API and get past year’s data as well. To do that do the following

  1. Get a Census API Key from here.
  2. From an R console type:
    library(acs) 
    api.key.install('<your census API key>')

Now R knows what your census API key is. To get older data type:

  • ?get_state_demographics to get data for states from other years.
  • ?get_county_demographics to get data for counties from other years.
  • ?get_zip_demographics to get data for ZIPs from other years.

Note that the Census API only provides data for the American Community Survey (ACS) from 2010 onwards.

As always, if you create any interesting maps with the package, please tweet them to me (@AriLamstein).

The post New Tutorial: Make a Census Explorer! appeared first on AriLamstein.com.

To leave a comment for the author, please follow the link and comment on their blog: AriLamstein.com » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)