We’ve discussed a few times the advantages of presenting your work in R as an interactive visualization using Shiny, and the next obvious step has been interactive charts. Let me introduce rCharts and Slidify created by Ramnath Vaidyanathan (ramnathv on GitHub). As is increasingly the case, these tools are all about how quickly you can begin creating your own work and ideas, it’s about putting the power in your hands.
First things first, you’ll want to install Slidify (demo) from Ramnath’s GitHub account using install_github(‘slidify’,’ramnathv’), there are a number of other packages you need to install, including rChartsNYT, some of which are on his github account only, and you’ll need R 3.0.0. I generally don’t like going through these details as a few Google searches will get you what you need, and it only took me about 30 minutes to update and install everything after running into a few errors and making some coffee.
That being said, as always the goal here is to Democratize Data, and what better way than to begin with America’s pastime; although I must object because his demo begins with the Boston Red Sox chosen in the side-panel. To fix this grievous error is simple, go to the ‘ui.R’ file and change the ‘selectInput’ function attribute ‘selected’ from ‘Boston Red Sox’ to ‘New York Yankees’ … Aaaahh, much better!
Some details are provided in this great tutorial, of which the HTML5 code you can recreate and augment using Slidify using the R markdown file “index.Rmd” with these commands: slidify(‘index.Rmd’); system(‘open index.html’). You know everything is working when you can recreate this New York Times app using the command “runApp(‘app’)” and both the tutorial and interactive chart show up in your browser.
Again, the goal here is to easily create interactive presentations of your data, and rCharts with Shiny provides that given you can begin with organized data. This seems completely reasonable to me as I myself have trouble speaking intelligently on a subject if I don’t have the information organized in my own mind, why would I expect R to do better?