Eating humble pie – pie charts or not?

Pie charts are probably the most ubiquitous data visualization form. However, there is a debate regarding their effectiveness. To summarize, humans are not very good at distinguishing and comparing area or angles. Pie charts use both of these mechanisms to convey a message about the data.

There is a temptation to use lots of pie charts when visualizing data. Why? Because people like them. However, they take up a lot of space on one page to give one message on the data. It isn't possible, for example, to show timelines very effectively, and they can't be used to convey multi-dimensional data properly.

In this recipe, we will look at creating a pie chart in Tableau, and then we will take a look at a better way of visualizing the same data. This will help you to see more of the debate surrounding the humble pie chart and to see when they are most effectively used.

Getting ready

For the exercises in this recipe, we will build on the existing Chapter 7 dashboard.

How to do it…

  1. Duplicate the Topic 3 Splom worksheet by right-clicking on the tab and selecting Duplicate Worksheet.
  2. Rename the duplicated worksheet to Topic 4 Humble Pie.
  3. On the Show Me tab, select the pie chart option.
  4. Your screen will now change to display pie charts. You can see an example in the following screenshot:
    How to do it…
  5. You can see that the pie chart doesn't make any sense. Tableau has tried to display different metrics on the same pie chart, and it does not show any meaningful information.
  6. Let's change the pie chart so that it shows one metric only. Remove everything from the columns and rows in order to start.
  7. Drag Year(FullDateAlternateKey) onto the Color button and remove CNT(Number of Sales Transactions) from the Marks shelf.
  8. Drag SalesAmount onto the Size button. The data visualization will now look like the following screenshot:
    How to do it…
  9. For some reason, Tableau has put red and green next to one another. Let's change the palette to one that is sensitive to the needs of color-blind people. Go to the Color button and click on it, and select Edit Color….
  10. In the Edit Colors dialog box, choose Color Blind 10 from the drop-down list, click on Assign Palette, and then click on OK. Here is an example in the following screenshot:
    How to do it…

    You can see the final pie in the following screenshot:

    How to do it…

How it works…

Generally speaking, pie charts are to be avoided. Humans are not accurate when they estimate area.

A key part of data analysis is comparison. Pie charts don't allow easy comparison because we find it harder to compare areas, and it is also harder for us to compare slices which are not next to one another.

So when should we use pie charts? If there are not too many slices, and the pie chart slices represent a percentage of a single measure, then this helps them to be more easily and quickly understood. They can be used when the area of a pie chart represents a measure. In the previous examples, we used Sales Amount as a single metric and showed it sliced by different categories. If we used it for lots of categories, then this would be harder to read. As a rule of thumb, no more than five slices is a good guideline.

Pies are useful when we want to put data on a map. Even then, the guidelines on slices should remain the same.

Pies can be nice as a way of filtering dashboards. So, they could filter dashboards by allowing the user to click on a particular slice to filter the whole dashboard. Pies are useful if you are displaying data on a map, as long as there are not too many slices, or you will lose the value of the data visualization.

See also

  • If you want to know more about the use and abuse of pie charts, there are plenty of resources. Stephen Few's blog, Perceptual Edge, is a great place to start. You can view it at the following link: www.perceptualedge.com.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset