Data Visualization Done the Right Way With Tableau — Pie and Donut Chart

Learn how to create and place Pie and Donut charts creatively!

Phalguni Kamani
The Startup
7 min readJul 17, 2020

--

Tim O’Brien once said, “Storytelling is the essential human activity. The harder the situation, the more essential it is.” This applies to everything in life, especially data.

Data is just a collection of numbers until it is turned into a story. Showing reports and dashboards can be overwhelming without adding a narrative to the data. Visualization gives you answers to questions you didn’t know you had. Facts tell, stories sell.

In the previous article, we discovered Packed Bubble Charts and the wonders that can be done with it. We learnt how Data analysts have industry tools like Tableau at their disposal for helping them in creation of artistic representations of data. Using this, analysts don’t have to be artists.

Striking a balance between art and science is a skill in itself. Today we are going to create graphs that make sense, use it in visualizations that scream Innovative, shows patterns, draws conclusions, and weave them into compelling stories.

🍩 Pie Chart uses radial slices to show relatives sizes of data i.e. the arc length/sector area is proportional to the quantity it represents. This is one chart everybody is more than familiar with.

Many have also been mocked for using this chart. But there’s a reason it’s still one of the heavily used charts, isn’t it? 😉 The argument most of these anti-Pie Chart folks present that can be agreed upon is that it’s not the most precise. One thing that cannot be stressed on enough is to not use this chart if there are lots of quantities/slices. It becomes very hard for the eye to distinguish the relativity of size between each section. Labels cannot be marked efficiently. The meaning is lost.

Keeping this in check, let’s move forward. The Pie and Donut/Doughnut charts are going to be explored with the Winter Olympics Dataset. The first step to telling any good story is to study and understand the context efficiently. Understanding the dataset thoroughly is of utmost importance. This dataset is taken from — https://data.world/makeovermonday/2018w7-the-winter-olympics

We will first go through the Pie Chart and then the Donut chart as Pie chart is the first step to a Donut chart. This link can be used to download Tableau Public. 👉 https://public.tableau.com/s/

🍩 Tableau is first connected to the dataset. The Analysis of the number of Gold, Silver, and Bronze medals won in Men’s, Women’s, and Mixed Events can be done as below.

We’ll create three Pie Charts. Each one of them will analyze only one of the kind of medals won in the three different types of competitions held. For example, the Pie Chart created below shows the number of Gold medals won in Men’s, Women’s, and Mixed competitions. This is done for more clarity and for the design purpose- which will be seen later.

As shown above, the dimension Gender and Medal is dragged and dropped to Rows and Columns respectively. The dataset originally given has the gold, silver and bronze medals won in the same category of Medal as shown below 👇

Part of the dataset

Since the occurrences of these need to be counted, the measure Count is selected from the drop-down in Medal which was just dropped and placed in Rows. As three different pie charts are required, so is some filtering. Medal is thus dropped to the “Filters” card and Gold is selected. The Pie Chart option on the right-hand side is then selected and done! It can be hovered on to see the label and the numbers each slice represents.

A few final touches as shown below can be given:

  • The Pie Chart can be labeled by dropping the Gender and Medal Count to Label.
  • The view of the Pie Chart can be changed.
  • The Pie Chart can be played around with and formatted as one desires. This is the link to my previous article which has the formatting section fully covered! 👇 It can be referred to and applied here as well.

🍩 Below are the three pie charts created and placed in a visualization which when seen in the bigger picture, can be utilized for an Infographic.

The Pie Chart evaluating The Number of Gold Medals won in Women’s, Men’s and Mixed Events is placed on the Gold Medal and above the first position of the podium for obvious reasons. Similarly for the others.

As can be seen above, the number of Silver, Gold, and Bronze medals won by the Men’s Events are 570, 573, and 568 respectively. There is almost no difference in the numbers i.e. the males participating in the Men’s Events have won almost the same number of Gold, Silver, and Bronze medals. The same goes for Women’s and Mixed Events. But there is a huge difference in the number of medals won between the different gender events. Men have won 573 Gold medals whereas Women have won 349 Gold medals. This pattern can be observed across all three charts.

This clearly shows that there exists a gender gap in the Olympics. The ones who follow the Olympics, know that there are a higher number of Men’s only Events when compared to Women’s only events that take place. The number of Mixed Events taking place is even lesser, way lesser. Hence the huge difference in the numbers and the inequality. However, slowly but surely, this gap is declining and has declined massively since the first Olympic games ever.

🍩 We will now master the Donut chart which has a lengthier process of creation. Donut chart is very similar to Pie Chart except that it enjoys the added advantages of:

  • having a hole cut out in the middle which can be used to display additional information in the same space
  • adds visual variety

🍩 Here, we will evaluate the number of Gold, Silver, and Bronze medals won Country wise.

As shown above, the number of medals won is being analyzed only for Canada. Hence it has to go through the same filtering process that took place for the previous Pie Chart. The process to create the Pie Chart first is the same as what we have seen up until now.

Once the Pie Chart is created, then comes the part we are all here for. To create the donut chart, “Number of Records” from Measures needs to be dragged and dropped to the Rows not just once, but twice. Average is selected in the Measure which is present in the drop-down for both of them.

Dual Axis is selected from the drop-down of the second instance of Number of Records. Headers need to be hidden.

A point to be noticed and noted is that there are three cards in the Marks Cards. What is done with each of these needs to be handled carefully in the sense that something that is meant to be changed in the last card shouldn’t be changed in the second and so on.

So as shown above, Medal needs to be removed from color and the Count of Medal has to be removed from angle and size. These can simply just be dragged and dropped into empty space. It has to be done from the THIRD/last Marks Card.

Then the color from the third marks card has to be made the same as the background color. This essentially is going to be the color of the hole of the donut chart. So if you wish for the color of the hole of your chart to be different, you can pick a color accordingly.

For the donut chart to come into life, the size needs to be increased in the SECOND Marks Card. The size of the sheet will have to be increased as well.

Shown above is the labeling and formatting which you must be familiar by now.

🍩 Shown below is a visualization created using the chart above. This has been created using the simplest of the tools like MS Paint 🎨 A key has been given in the bottom to match the colors and then infer the number of medals won.

From above, it can be interpreted that Norway won 111 Silver medals, 118 Gold Medals, and 100 Bronze Medals.

One can use Donut Charts even as progress bars! Give this a try on your own.

Don’t just bake Pies and Doughnuts; Turn your most delicious food items into charts and create some appealing visualizations. 💡 💭

Happy creating! 🎉

--

--