R and Interactive Graphics

by Joseph Rickert

Judging from the number of JSM talks that incorporated interactive visualizations of some sort or another, it appears that interactive graphics have captured the attention of a good many statisticians. I found this a little surprising. Statisticians, on the whole, are not easily impressed by “eye candy”, and I believe that there are many, like me, who think that base R graphics remain a powerful tool for data exploration. The ability of R’s plot() function to quickly produce plots for all sorts of objects helps an R user attain that state of flow that makes R such a productive environment for data analysis.

But, it is exactly the desire to preserve the flow of exploratory analysis when working with large, complex data sets that is driving the creation of new visualization tools.

Below, I highlight two talks that address the need for new tools, and a third talk by Chambers Awared winner Carson Sievert who discussed design principles for creating interactive graphics software. These talks illustrated the state of the art of the integration of interactive graphics with R, and also showed how interactive visualization can be a real aid to statistical inference.

In his talk, Applications of Interactive Exploration of Large Multi-Panel Faceted Displays Using Trelliscope, Ryan Hafen showed how the Small Multiples capability of Trelliscope can help you simultaneously compare complex behavior of several entities. Ryan’s slides convey the salient points of his presentation.

Note that the interactive features work to keep you in the analytical flow by letting you easily change views and comparisons. Look here for documentation on the underlying tressiscopejs package.

Visualizing genomic data provides several challenges: one being the need to integrate multiple assays and annotations across many regions of a genome. For this, scientists have favored heatmaps for some time. In her presentation, Extracting Insights form Genomic Data via Complex Interactive Heatmaps Alicia Schep showed how interactivity takes heatmaps to the next level. Alicia’s iheatmaper package aids exploration, and allows scientists to add information and build multiple subplots around the main heatmap as the following diagram illustrates.

You can find Alicia’s slides here.

In his talk, delivered with the aid of the following slides, Carson Sievert discussed the difference between exploratory and expository visualizations along with design principles for creating interactive graphics software.

Perhaps the biggest take away from Carson’s presentation was his exhortation: “Interactive graphics software must be opinionated - Not enough statisticians influence the design / implementation”. The idea is that technical mastery notwithstanding, you shouldn’t expect even the best JavaScript developers to invent tools that really facilitate statistical inference without guidance. To give support to his argument that statisticians used to be better at, and more engaged with the development interactive graphics, Carson points to the ASA’s video library.

This is an exciting time to be involved with interactive graphics.

Share Comments · ·

You may leave a comment below or discuss the post in the forum community.rstudio.com.