Monday, February 10, 2014

Scraping Pro-Football Data and Interactive Charts using rCharts, ggplot2, and shiny

UPDATE: THE BLOG/SITE HAS MOVED TO GITHUB. THE NEW LINK FOR THE BLOG/SITE IS patilv.github.io and THE LINK TO THIS POST IS: http://bit.ly/1k0mKWI. PLEASE UPDATE ANY BOOKMARKS YOU MAY HAVE.

This post uses pro-football (American) boxscore data from 1966 through 2013 and generates few interactive charts using rCharts, ggplot2 and shiny.  It also provided a first time exposure to the power of dplyr. Data for these charts were scraped from the excellent reference site, pro-football-reference.com, using a function written in R. (This site has been used previously by other bloggers as a source for their data as well. See here and here for two examples.) Rest of this post has been created using slidify. The code for this post and relevant data are available at github. The code for the shiny application can be found here on github. (shiny is amazing, thanks R-Studio team and a big thanks to Ramnath Vaidyanathan for his support on rCharts).

No comments:

Post a Comment