New Tutorial: Make a Census Explorer!

July 9, 2015
By

(This article was first published on AriLamstein.com » R, and kindly contributed to R-bloggers)

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('')

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 on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Sponsors

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)