Tableau Tutorial: Sunburst

Tableau Tutorial: Sunburst

When I started to learn Tableau, I remember being completely amazed and confused about how to build Bora Beran’s blog on Sunbursts; I could not believe that this was possible in Tableau and I wished that I could build it one day. In this blog, I am going to go through the building of a Sunburst visualisation in Tableau.

The Data

Let us get started by downloading the data source and open it in Tableau. Download the data source: HERE

Calculated Fields

We will create a Path (bin) object by:

  • Right click on Path
  • Go to Create, Bins…
  • In Edit [Path] set the Size of bins to 1
  • Click Ok
No alt text provided for this image

The Path (bin) will allow us to use a table calculation to create additional data points between 1 and 362.

Note: we are using the Path (bin) to densificate data and give us more points to work with. One thing to make sure of is that you check the Show Missing Values.

We will now create the following Calculated fields.

Index: This Table Calculation will be used to represent the individual points.

No alt text provided for this image

WC_PI: A Table Calculation that represents PI.

No alt text provided for this image

WC_Value: This gives you the value of the individual segments.

No alt text provided for this image

WC_Max Distance: This gives you the maximum distance away from the centre point.

No alt text provided for this image

WC_Min Distance: This gives you the minimum distance away from the centre point.

No alt text provided for this image

Note: These are needed to draw the individual segments

WC_Starting Point: This will be used to identify where each segment starts.

No alt text provided for this image

X: This is used to draw the X points

No alt text provided for this image

Y: This is used to draw the X points

No alt text provided for this image

Now that we have all the Calculated fields, we will now go about building our worksheet.

The Worksheet

Let’s start by dragging our Calculated fields onto the worksheet:

  • Grad Path (Bin) onto the Details Mark.
  • Drag X onto Columns. Right click on X, select Compute Using and choose Path (Bin)
  • Drag Y onto Columns. Right click on Y, select Compute Using and choose Path (Bin)
  • Change the Mark Type to Polygon
  • Drag Index onto Path. Right click on Index, select Compute Using and choose Path (Bin)
  • Drag Label onto the Color Mark

You should now see the following:

No alt text provided for this image

Seriously, do not panic, we will work this all out.

  • Right click on X and click Edit Table Calculations
  • For WC_Value select Specific Dimensions. Tick Label. Tick Path (bin). Make sure Label is on top. In Restarting every, select Label
  • For WC_Min Distance select Specific Dimensions. Tick Label. Tick Path (bin). Make sure Label is on top. In Restarting every, select Label
  • For WC_Max Distance select Specific Dimensions. Tick Label. Tick Path (bin). Make sure Label is on top. In Restarting every, select Label
  • For WC_Starting Point select Specific Dimensions. Tick Label
  • Right click on Y and click Edit Table Calculations
  • For WC_Value select Specific Dimensions. Tick Label. Tick Path (bin). Make sure Label is on top. In Restarting every, select Label
  • For WC_Min Distance select Specific Dimensions. Tick Label. Tick Path (bin). Make sure Label is on top. In Restarting every, select Label
  • For WC_Max Distance select Specific Dimensions. Tick Label. Tick Path (bin). Make sure Label is on top. In Restarting every, select Label
  • For WC_Starting Point select Specific Dimensions. Tick Label

Do not panic while making these changes, but once you are done, you should get the following:

No alt text provided for this image

You can see it all coming together. What we need to do next is sort our Labels. Right click on Label and manual sort to this order:

  • Europe
  • Asia Pacific
  • North America
  • France
  • United Kingdom
  • Germany
  • Spain
  • Hong Kong
  • Japan
  • Singapore
  • United States
  • Mexico

You will now have the following:

No alt text provided for this image

Now, by yourself:

  • Remove the axis headers, Gridlines and zero lines
  • Modify the colours and add white border lines
  • Add tooltips

You should now have the following:

No alt text provided for this image

For extra credit:

  • Add this worksheet to a Dashboard
  • Create another sheet which shows the Label and Value Label, add this to the Dashboard and position in the centre of the Sunburst.
  • Use Dashboard actions to make sure that when you click on the Sunburst, the centre worksheet will filter to show details.

I hope you enjoyed following this blog and, as always, let me know your comments below, or on Twitter at @thoang1000

If you want to learn more about Creating Bespoke Data Visualisations in Tableau, do check out our course on Udemy at https://www.udemy.com/course/creating-bespoke-data-visualisations-in-tableau

To view or add a comment, sign in

More articles by Toan Hoang

  • Chessboard Magic: October 2024 Update

    Yes, I do a little more in life than just Tableau..

    15 Comments
  • LEANING IN: How Embracing My Hobbies Shaped My Life

    In life, we all have hobbies and interests that we dabble in, but often they remain just that—casual pastimes that we…

    3 Comments
  • Creating Spiral Column Charts in Tableau

    This is something that I have been wanting to create for a while, but alas, I put this on my backlog until I could…

  • Tableau Twelve-Step Programme for 2020

    With every new year comes new challenges, new opportunities and, more importantly, a chance of exploring new…

    6 Comments
  • OHCL Charts in Tableau

    In this Tableau Quick Tip, we are going to create an Open-High-Low-Close (OHLC) chart in Tableau, we will do this…

  • TL;DR - 5 Categories of Tableau Deliverables

    I have designed and delivered Tableau Solutions for a variety of clients, and while each client requirements differ, I…

    5 Comments
  • Creating Jitter Bar Charts in Tableau

    Yes, I create this data visualisation a little while ago, and while hesitant about it, decided to write a nice, quick…

    2 Comments
  • Drawing Neon Bar Charts in Tableau

    Sometimes you just have to have fun with Tableau, and given I was too preoccupied to participate in the Music themed…

    2 Comments
  • Tableau Magic on Udemy

    After months of planning, endless preparation, and loads of refilming, I am finally ready to make public my first Udemy…

    27 Comments
  • Tableau QT: Shape Bar Chart

    This is a Quick Tip on how to build a Shape Bar Chart in Tableau, so less reading and more jumping in. We are going to…

Others also viewed

Explore content categories