[This article was first published on PremierSoccerStats » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
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 their blog: PremierSoccerStats » R.
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.