A Preview of Tableau 8.1 Integration with R Using Parameters (10/8/2013)

Earlier today, Tableau published a post here by Bora Beran titled

I am a huge fan of both Tableau and R and have been looking forward to this integration for a long time now. One major competitor of Tableau, Tibco's Spotfire, allows direct integration with R. Proctor and Gamble uses Spotfire and I've seen some incredible demonstrations connecting their visual analytics in Spotfire with the model building in R. As an example, the initial model will run and show a resulting plot. Then the user can select certain observations and the model will immediately re-run using only those observations. The combination makes for incredible data analysis capabilities an it's a pretty seamless integration. Needless to say, I was eager to check out Tableau's new R integration.

Bora's example outlines how easy it is to connect to R using the R package Rserve. Once this package is loaded it it possible to connect Tableau to R using one of 4 new functions that are described in the post. Building on this I wanted to demonstrate the power that is now available in Tableau with this integration.

First, using parameters it is possible to build the variables on the fly and pass them to R. The variables can be used in the model and the results passed back to Tableau to visualize. The power here is exploratory analysis and "rinse and repeat". It gives the user the ability to build models with input variables and visualize them quickly. There are packages in R that allow this functionality, for example Shiny. Shiny is a very powerful package that enables interactive web applications based on input parameters. This is an incredibly powerful feature that Tableau is now able to do.

Second, Tableau's ability to select and highlight points enables a rich analysis on top of the visualization. For example, after running a cluster analysis it is possible to explore the accuracy of the clusters simply by clicking on the legend or some other feature of the visualization that would highlight the points.

Third, it is now possible to call functions that are not available in Tableau. For example, by using R's basic rnorm() function it is possible to get a pseudo-random number returned back to R, something that is not a native function in Tableau.

Example calculated field:

SCRIPT_REAL("rnorm(1, mean = .5, sd = .2)", count([Number of Records]))

Building on the workbook that Bora posted earlier, below is a screen shot demonstrating a cluster analysis using input parameters. Click on the image to view full size or download the Tableau 8.1 workbook here.

Below is an example exploring the accuracy of the clusters simply by clicking on one of them in the legend to highlight on the visualization.

Sincerely, Jeffrey A. Shaffer