↓ Skip to main content

Shiny: R made interactive @ useR! 2014

At useR! 2014, one of the most anticipated presentations was Joe Cheng’s Shiny: R made interactive. It was but one of the of a fantastic series of talks by RStudio representatives; check out Winston Chang’s ggvis: Interactive graphics in R for another great talk. Shiny begins with your R code and ends with the customer’s view: an interactive, browser-accessible application. This enables you to place a great deal of power into your users’ hands to customize their view and provides a variety of new and innovative ways to interact with the data, such as by tuning parameters and focusing on sub-populations. Essentially, Shiny functions by allowing you to “wire up” up a reactive application, greatly speeding up the development of a data and analysis based web app.

Shiny comes out of the box with a number of standard industry UI widgets such as date inputs, file inputs, sliders, buttons - the standard widget toolbox. Shiny also leverages a simple panel-based layout manager which, in concert with the widgets, allows for a fluid development experience.

Video Highlights
#

If you’re interested in bypassing Joe Cheng’s fantastic explanation and you want to cut right to his first demo, he presents a web application for k-means clustering on the iris data set:

Joe Cheng's rShiny at useR! 2014
▶ Joe Cheng's rShiny at useR! 2014

Joe’s next demo involves a slick mapping component. Here you begin to see how Shiny apps have the potential to leverage intriguing data sources and provide first rate visualizations beginning only with ZIP codes and a limited amount of R code:

Joe Cheng's rShiny at useR! 2014
▶ Joe Cheng's rShiny at useR! 2014

He then shows an amazing example of what an R developer with no previous web development experience can build using Shiny.

Joe Cheng's rShiny at useR! 2014
▶ Joe Cheng's rShiny at useR! 2014

For his final demo, Joe embeds Shiny interactive documents using R markdown and combines them with Yihui Xie’s knitR. This is demoed in the video below with an application which parses the logs for RStudio’s CRAN mirror and visualizes package download trends.

Joe Cheng's rShiny at useR! 2014
▶ Joe Cheng's rShiny at useR! 2014

Shiny is a fun and easy way to widen the audience interacting with your data analyses. It leverages fantastic modern programming paradigms to provide a system with sane defaults and powerful components to interface the web with R. Enjoy!

Related

A Conversation with Joe Cheng at useR! 2014

Joe Cheng is a software engineer. Unfortunately the term gets thrown around pretty lightly, so I’d like to make sure that I convey the appropriate amount of gravitas when I refer to him as such. Joe Cheng is a *great* Software Engineer. He has worked for some of the largest technology companies on the planet, building cutting edge tools which empowered the web browser as a full blown platform instead of a historical curiosity. Joe is one of those software engineers who saw a future with the web as a platform for modern software, then worked hard to make it a reality. When the time came to build the next generation of data science IDEs, an IDE targeting the web as a platform, RStudio called Joe.

Winston Chang's "Interactive Graphics with ggvis" at useR! 2014

·3 mins
Winston Chang’s “Interactive Graphics with ggvis” talk at useR! 2014 was in many ways a watershed moment for the the data science community, as the future directions of rich data visualization for analytics, communication, and the web were revealed. In this talk, Winston introduces the viewer to ggvis, lays out the fundamental architecture, and provides an overview of reactive architectures.

Packrat presentation at useR! 2014

There comes a time in a software toolchain’s lifecycle where the focus shifts from developer productivity and preference to the ability to deploy solutions in production which coexist gracefully in the enterprise. Configuration management and dependency management are two of the first points of friction in this transition, as the free-wheeling methods preferred by developers are at odds with the structured methods and isolation desired by administrators, who serve as gatekeepers to enterprise deployment. R is currently at this very point in the transition, in the midst of transformation from a language and environment used primarily in academic research to its growing place in the enterprise. At useR! 2014 there were a series of presentations on how dependency management can be addressed within the R ecosystem, ranging from “provider” side options (e.g. freezing CRAN and private repositories) to the client side options, where a project maintains its own dependencies as part of its codebase.