Plotting a Course: Pie Charts

Oh the pie chart – where would we be without the salt & vinegar chips of the data world?

I remember one of the first major analyses I did in my career. It dealt with percentages, so naturally I went for the pie chart, because – you know – that’s what they’re for, right? Well, by the end of it, I was presenting an unwieldy spreadsheet of colorful discs that spread across 4 computer screens… What was I thinking?

Although they’re among the most popular of all graphs, a good rule of thumb for using pie charts is: don’t. Or at least, that’s what conventional wisdom says – and for good reason. There are exceptions, however, which I’ll cover in this post. But first, let’s list some of the weaknesses of pie charts.

The Problems with Pie Charts

Values must be Percentages

It doesn’t matter to a pie chart if you have numeric values that have nothing to do with percentages or don’t sum to 100. All numbers will be converted to parts of a whole – it’s just the nature of it. That aspect alone severely limits the usability of the pie chart, and if ignored, makes analysis deceptively confusing.

Difficult for Comparative Analysis

Pie charts are designed for comparing parts to the whole (hence everything being made into percentages). If you’re trying to compare on slice to another, you’d be better off with another graph.

In order to compare one value to another, the reader needs to consider two dimensions, rather than one, which is needlessly more difficult. For example, it’s easy to compare two bars in a bar chart – just look at which is taller, and by how much. It’s easy because you only have to compare on one dimension: the y-axis. Comparing two slices of a pie chart, however, can be much more difficult. Each slice stretches across the x- and y-axis, as well as angled around the center!

Inefficient

One pie chart can only contain a single-value categorical variable and one numeric variable. But what if you wanted to compare New Year’s resolutions between the US and Canada? It’s still one categorical variable (country), but it now has two values (US and Canada). To analyze that dataset, you’d have to create two pie charts.

US-Canada

That’s pretty inefficient, not to mention difficult to analyze.

One solution is to use what’s known as a Donut Chart, which is just concentric pie charts. It allows a categorical variable to have more than 1 value without taking up any more space. But at what cost? Sure it allows more than one value for the categorical variable, but it also makes it even more difficult to read.

Donut

Imagine if we had four countries that we wanted to compare!

The Solution

So if pie charts are so awful, what should we use in their place? A bar chart, of course! Think about it: what kinds of variables do you need for a pie chart? One categorical variable and one numeric variable. And what types of variables do you need for a bar chart? One or more categorical variables and one or more numeric variables. What that means is that a bar chart can do the same thing a pie chart can do, and more.

BarChart

Notice how well the bar chart works? You’re immediately aware of which country seems to care more about health/fitness, or about better finances. It’s much easier to analyze than a pie chart.

The Strengths of Pie Charts

With all these disadvantages, why use pie charts at all? Well, there are a couple of strengths that are quite rare in the charting world. Here are some of them.

Easy to Understand

In the midst of a plethora of complicated, technical-looking graphs, there stands the pie chart, a sight for the beginner’s sore eyes! We all know how to read a pie chart, and as long as the data actually fits it, why go for something that’s more confusing?

Unique Shape

Think about it, most charts are rectangular: bar charts, scatter plots, tree maps, waffle graphs, even line charts. They either create a rectangular space, or they require it to show all their possible values. Not so with the pie chart – it’s round. Throwing in just a bit of visual variation can really make a report or dashboard aesthetically pleasing, and just because aesthetics are second to analysis doesn’t mean they should be ignored completely.

Best Practices

Even though pie charts are arguably the easiest chart to create, there are still a few things that will help the end user. So let’s start with one that needs a little help, and see what we can come up with!

LastPie1

Sort from Largest to Smallest

Not only does it make the chart look better, it makes it easier to analyze – no more guessing if one slice is larger than another.

LastPie2

Limit the Number of Values

Clearly this chart has too many slices – you can barely even see the last few! The real question is: how many slices are too many? Well, it’s difficult to say, but most agree on 8-10 being a good threshold. Over the years, I’ve tried to come up with a principle that gives consistently good results, but for whatever reason, it’s difficult to beat just plain “8”. If your chart has more slices than that, you may want to combine them into an ‘Other’ category. And now that we have a manageable number, we can give it some nicer colors.

LastPie3

Consider Putting ‘Other’ Group at the End

Once you start grouping the smaller values together, the newly created ‘Other’ group may become even the 2nd or 3rd largest group. You might think to order it according to size like any other, but remember, this isn’t really a true value, it’s an aggregation of many smaller values. This is more of a personal preference than the others, but I like to put the ‘Other’ at the end (the 11 o’clock position) for that reason.

LastPie4

Not too shabby!

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