3 Replies Latest reply on Sep 23, 2018 3:01 PM by Fisseha Berhane

    Using Quantiles from R for coloring a Tableau Map

    Fisseha Berhane

      I have very skewed data (it follows approximately Pareto distribution). I want to map it and because of the skewness, the provided Tableau color options did not work for me.  I could have manually specified the max, center and steps and use a divergent color gradient. However, my map is dynamic. The values and their ranges significantly change based on my parameter selection. I thought using R to calculate quantiles (10% percentile, 20% percentile, ..., 90% percentile, and 100% percentile) would be good to handle this problems and as you can see in the image below, it looks to work fine for my purpose (I want to see various colors on the map). However, the problem I am facing is with the aggregation of the data that is sent to R and the results that come back to Tableau. My map is at DMA level. I have the group, order, lat and lon information for each polygon. So, I can map it at DMA level. I want to color it based on the quantiles from R. When i just create a Table with the DMA and the R quantiles, it works fine as you can see in the attached workbook, but I could not use the quantiles for coloring the map. I am using the EnvStats R package to create quantiles.

      Screen Shot 2018-09-21 at 2.40.12 PM.png