(This article was first published on PremierSoccerStats » R, and kindly contributed to R-bloggers)
The Shiny package provides great user interactivity and another boost to its attractiveness has come with its integration with googleVis. Markus Gesman provides some background in a blog article with coded examples which he along with fellow googleVis creator, Diego de Castillo and lead Shiny developer Winson Chang have furnished
There are at least three significant advantages that appeal to me
- Pageable/Sortable Tables
- Zoomable/Draggable Maps
- Motion Charts
It is the last of these that I want to cover here which is a motion chart showing changes by game played in the league position for each English Premier league club, selectable for each of the past 20+ seasons
The Shiny App is made up of three files
- global.R – which loads the libraries, and sets up the data
- ui.R – a simple page offering a season selection and displaying the chart
- server.R – basically one function which takes the season input to subset the data, some initial conditions (which the user can then vary) and calls the motion chart
The charts can be found here and the code on github (167)
To leave a comment for the author, please follow the link and comment on his blog: PremierSoccerStats » R.
R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

Zero Inflated Models and Generalized Linear Mixed Models with R.
Zuur, Saveliev, Ieno (2012).