Spiral Heatmap in Tableau

Recently I started reading a book “The Book of Circles: Visualizing Spheres of Knowledge” by Manuel Lima where he beautifully explained why circular layout is such an exceptionally popular choice in data visualization. This book aims to answer this question in three distinct ways: first, by providing a context for the universality of the circular shape as a cultural symbol in all domains of human knowledge, across space and time. Second, by describing a set of perceptual biases, identified by cognitive science in recent years, that explains our innate preference for all things circular. Third, by developing a comprehensive taxonomy of twenty-one visual archetypes for depicting information, which showcases the diversity and flexibility of the circular design. This book inspired me to create –something Circular- on the tableau.

According to Robert Kosara’s example post, he clearly described that the common wisdom in visualization is that to find periodicity in data, it should be displayed on a spiral whose period the user can control. Repeating patterns are easy to spot on a spiral, and its layout suggests repetition. But are spirals really the most effective way of finding periodic patterns? After reading this post, I started looking for some inspiration and I found one very similar post on Tableau Public by Adam E McCann Spiral of Unemployment .This Complete post draws inspiration from Adam ,Joe Mako and Manuel Lima work.

I was looking for a data and luckily I found something (World Resources Institute) on https://www.vizforsocialgood.com/. Viz for Social Good is a social nonprofit that helps mission-driven organizations harness the power of data visualization for social change. It is founded and run by Chloe Tseng. I immediately downloaded the data and started playing with it. Out of all the data set, I opted “Annual net flux of Carbon (1850 – 2005)” for my Spiral heat map. After couple hours of thinking and few Tableau calculation, I ended up something like below image. Here is an interactive version that lets you compare year over year Flux.

A spiral heat map is a specific type of heat map designed for continuous comparable cycles like years or days. The spiral design makes it possible to compare the cycles, but keeping the continuous timeline along the spiral.

My dataset looks like the below image.

Step 1:

I needed a smooth curve for each year so I duplicated the data four times and union it. This gives me 4 marks for each year.

After you create a union, additional fields about the union are generated and added to the grid. The new fields provide information about where the original values in the union come from, including the sheet ( * this field will only show if you union it from two or more different databases) and table names. These fields are useful when unique information that is critical to your analysis is embedded in the sheet or table name. In this case, we can use the Table Name field that is generated by the union to access year information and use it in our analysis.

NOTE: To union your data in Tableau data source, the tables must come from the same connection.

Step 2:

Let’s generate four marks for each year. We will use table name in our calculated field and generate the same.

Step 3:

I also wanted to create a calculation which should be dynamic (in terms of periodicity) so that I can control the shape of my spiral Viz .

So I created a Parameter ranging from 3 to 50 with a step size of 1.

Step 4:

Now we needed a periodic calculation that repeats its values in regular intervals or periods. The below-calculated field“Adjusted Index” has the property to repeat its values after a certain period which can be controlled by our parameter.

Step 5:

Now we need a calculated filed called Spread distance which has different Radii and Spread angle for creating a Spiral map.

Spread Distance

Spread angle

Step 6:

let’s wrap this into X and Y equation and put this newly created calculated field into rows and columns.

Step 7:

As there are currently 4 values for each year, so in order to avoid duplicate/incorrect values. we will use LODs (MIN/MAX aggregation instead of SUM) for calculating the Flux for each year.

Step 8:

Now change the Marks from automatic to the polygon, add “Mark” calculated Field on Path and “Year” on Detail shelf.

Add “Flux Indicator” on Color marks and Country on Filter shelf. Select a particular country like China and play with your Period Parameter.

I am a multidisciplinary designer working in data visualization, interaction design and innovation. Expertise in developing Tableau, Web focus based visualization and reporting applications. I have a passion for analyzing, dissecting, and manipulating data sets as well as, building beautiful dashboard. Naturally talented in communicating between technology and business needs. Diverse and experienced in plenty of different domains .I am quick learner who can absorb new ideas and can communicate clearly and effectively.I love creativity and enjoy experimenting with various technologies.