Part 2 The Build: An Annual Sunburst Chart Template

I recently created an annual sunburst chart to visualize a full year of sleep data I had collected. I found some inspiration from a viz by Christian Felix and a template for the chart from 4x Zen Master Ken Flerlage. Ken’s work was built on prior sunburst work done by Zen Master Toan Hoang. Ken’s blog and workbook got me most of the way, but I had to make a few minor adjustments to make it an annual view. While the adjustments were minor, I figured I might as well provide a template that made it easy to enter in date data to make the calendar.

Below are instructions to use and/or modify an Excel file and Tableau workbook template in order to create your own annual sunburst “calendar” chart.

The Data

First of all, if you want more details on why the data is structured the way it is, please reference Ken’s blog post which explains everything (linked above). What is important is there are 3 sheets in the Excel file and one contains your data. The other two are part of the data densification.

On the sheet called “Data” you will see 8 columns.

Join – Joins your data to the Path table for densification

Level – For the calendar view, this is the order of the rings in the sunburst. I have defaulted this to have Saturday at the outer ring and Friday all the way on the inner because I wanted the weekends to be next to each other. You can adjust this order (the numbers are 1-7). Just know that the value of 1 is the innermost ring and 7 is the outer.

Date – This is where you would put in the dates for the year you are creating the chart for. The current view is defaulted to the most recent full year (2021) at the time of this post. One key thing to note is that in order to get the same number of segments per ring (weekday) you may need to add in dates from prior or post years. For example, in 2021, January 1st was on a Friday. For the chart to look accurate and clean, I needed the remaining dates within that first week, even though they were in 2020. Those rows didn’t have any of my data in them, but the dates were there to ensure the full week was in the view. Similar to a regular calendar where you see squares for dates in the prior or next year. You can see in the image below that there are spaces for the dates prior to the 1st of January.

Parent – This is the weekday of the date in the row. This is a bit different than Ken’s template because we don’t need a parent in the same way. We just need to group each date into it’s weekday to create the appropriate rings.

Value – This will always be 1. This data point spaces each calendar date “square” evenly around the circle of the sunburst. In Ken’s template, this is where you’d put your actual data to make the segments different lengths. For the calendar, we want to mimic an actual calendar so that each segment is the same size.

Sort – This is the order of the dates. You shouldn’t have to change this.

Lowest Level Value – Again, in Ken’s template, this is used a bit differently. Here, you just need to insure that the value equals 1 for the Level that is 7, as that is the outermost ring. Again, if you adjust the data for a different year, then you will need to be sure that all rows with Level = 7 also have a Lowest Level Value = 1. All other Level rows should be blank.

Your Data – This is where you would enter in whatever data you want to populate in the calendar. This could be a numerical value (minutes of sleep, distance ran, money spent, etc), or a dimension (such as yes/no something occurred). This value can be used in a tooltip or as color to code the calendar.

Download the Excel template here to get started.

The Chart Template

You can find my calendar-style template here and if you want to utilize and modify Ken’s template for creating more variable sunbursts then you can find his template here.

All you need to do after downloading the template is to connect the template to your data and modify as desired to achieve a lovely radial calendar!

Good luck and reach out if you have questions!

Cheers,

Lindsay

3 comments

  1. Hi Lindsay, I’d love to play around with your calendar template using my own data, but the template says it requires permissions to download the workbook. Any chance you could grant them? Much appreciated!

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s