Everything's Shiny
We often have to build dashboards for different groups within the RSC. These groups are diverse, and include those working in publishing, sales, technology and Business Intelligence. While putting these in place we have evaluated a number of different dashboard technologies – from high-level packages with minimal coding (e.g. Tableau) through to “raw coding” frameworks (e.g. Django/Python). The standout technology that has become our de facto standard is Shiny.
The reason we are fans of Shiny is partly due to the fact R is pretty much always part of our preferred tech stack when rapid small/medium scale analytics is needed. For R-based analytics, Shiny is nothing short of spectacular.
The immediate problems with Shiny are:
- Its limited functionality and extensibility – compared to something like Rails (my preferred web app framework) there are limitations that have to either be “hacked through” or just accepted (e.g. performance/concurrency issues, functionality, integration with other tools)
- It also is not as easy to use, and lacks the beauty, of something built purely for visualisation (like Tableau)
- However, it is quick to develop with, fits naturally with analytics, is stable, and has a simple programming model.
Most dashboards we provide have relatively simple requirements, and we generally use the Shiny Markdown documents for these. The programming model for shiny is based upon a simple cached or not cached approach, which is intuitive and has a small (if any) learning curve. To move from an R script to an R shiny mark-up (which is your web app) is simply a matter of thinking about the data to be cached. You declare reactives/observables (special functions), which will have their results cached unless a reference variable (e.g. user input) changes. Elegant and simple.
Generally the resulting code is clean, and easily extended. We have used Shiny to develop a large number of dashboards for a variety of applications including:
- Exploring trends and identifying categories of papers with high downloads
- Identifying highly accessed papers
- Predicting the “Impact factor” of journals and arbitrary collections of papers
In summary we can knock out stable and useful dashboards in hours with Shiny, and can migrate our R scripts into usable web apps with relative ease. For this reason alone we heartily recommend that you try Shiny, especially if you analyse with R and rely on other technology for producing reports.