R-Integration in Tableau. A way of enriching your analytics.

Over the past 13 months I have been using Tableau and Alteryx on a daily basis, it’s been an amazing experience and I love it.

However, over the last couple of months I have been slowly introducing myself into the R integration available within Tableau.

To me, there is a clear use case for it.

I often build ‘crazy’ visualisations which require a lot of background work in Alteryx, but at times this can mean the front-end visualisations become quite inflexible, your users become unable to interact with them through filters and such like due to the fact that the data has been shaped for a specific scenario in the back end.

But because of this we are limiting one of the best bits in Tableau, the ability to slice and dice your data on the fly.


Tableau also falls down on some advanced analytics that you may wish to include in your analysis, an example being the ability to include the intercept value from a linear regression model in your visualisation.

One way of getting around these issues is through table calculations, and these work for a number of scenarios but not them all.

Another way is through the R-integration, essentially allowing you to write R-script from within Tableau to enrich your data with additional attributes or even completely new data sources.


The above image highlights one example of how I have implemented an R-script inside Tableau to create convex hulls which help show the extent and range of data points.

From my experience I have found that whilst there are some great resources out there on it’s use, they are few and far between, especially when placed in comparison with some of the other Tableau features; my plan is to help enhance this by creating a blog series specifically focused on this subject.

It will go from the most basic, the initial connection with R Server, to the most advanced , writing in completely new data sources with an R script.

I have some experience writing code in R, but it is limited and I also hope that this blog series will help add another dimension to my skill set.