New Tutorial: Make a Census Explorer!
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:
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
- Get a Census API Key from here.
- 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.
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.