#OneLessPie chart on Pi Day

It's become too easy and common for data visualization practitioners to point to flaws in pie charts and other artless visualizations. Far better is to pair criticism with demonstrated improvements. Kaiser Fung's junkcharts blog is the pioneer in backing words with actions, but there’s nothing stopping the rest of us from making visualization improvements. Let's all use Pi Day as motivation to clean up the data visualization world, one pie chart at a time.

Many critics have written at length against pie charts, so I'll only recap that most criticisms follow from perceptual studies showing we perceive angles and areas less accurately than positions and lengths. I won't go as far as John Tukey, the father of exploratory data analysis, who is often quoted as saying, "There is no data that can be displayed in a pie chart that cannot be displayed better in some other type of chart."

Pie charts have their supporters and can be useful for simple, low-accuracy views or when visually summing adjacent values is important, for instance. However, I think everyone can agree that pie charts fall down in many cases:

  • When there are many levels.
  • When the data doesn't support proportions.
  • When the wedge ordering is random.
  • When distorting effects are added.

These examples below from Wikipedia illustrate these pitfalls.

Collection of Bad Pie Charts

Questionable Pie Charts from Wikipedia

So what’s your Pi Day action? Look for wayward pie charts in your own work or in a public space like Wikipedia and replace them with better visualizations. Then leave a comment here or tweet with the tag #onelesspie to share your accomplishment. Anyone can edit Wikipedia, but if you're not up for editing, you can still move things forward by posting a comment on the "Talk" page for an entry or even contacting the chart author. In either case, be sure to read and follow the Five Pillars of Wikipedia.

You can use this Google image search as a starting point, but it's best if you can narrow it to your own field of expertise, such as semiconductors or genetics. That’s because you need to take a few minutes to understand the intended message of the chart in support of the text before you can improve it. Often the improvement will be a bar chart, but sometimes a table or removal may be better (Wikipedia even has a barnstar award for those "who remove unnecessary information from images or descriptions").

To get you going, here are the steps from my early start at improving the visualization of content languages for Internet websites. The page Languages used on the Internet contains two pie charts. The first one was this pie chart:

While the chart succeeds in showing that more than half of websites have English content (pie charts are good at comparisons to 50% and 25%), the rest of the chart underperforms. Plus, the percentages for this pie chart don’t add up to 100% because some websites use more than one language.

Fortunately, the data is provided in the Wikipedia page and via a link to the original source. Sometimes, you may have to hunt a little for the data. In this case, I still had do some data work because the data in the Wikipedia page was out of date.

I made a bar chart of the data and ran into one of the great problems of data visualization: handling multiple magnitudes of scale. In this case, the English usage dwarfs the others. I thought about showing the top non-English languages, but decided the English dominance was an important part of the message and left it in. To keep the emphasis on English being in more than 50% of websites, I added a label for that bar. For presentation, I added a reference line at 5% where the second-tier languages were and gave "Others" a different styling.

Once the chart was completed, I saved it as resolution-independent SVG (though PNG is fine, too) and uploaded it to Wikimedia Commons using the Upload Wizard. In the description, I added a link to the data to make it easier for the anyone who improves on my chart. Finally, I updated the referencing Languages used on the Internet page with the new image and new data.

I also left a note on the user page of the original chart author explaining my changes in case the author has objections. And I still need to update a few other pages that use the old images.

The process was not simple. I rarely edit Wikipedia and had never uploaded image files before, so it was a bit slow going. But it's nice to try to move things forward. #onelesspie

tags: Data Visualization, Pi Day, Pie Charts

8 Comments

  1. Howard Wainer
    Posted March 13, 2014 at 11:51 am | Permalink

    1. small grammatical error -- should be When the data don't support proportions.
    2. why not go all the way and use a dot plot rather than a bar chart?

    • Xan Gregg Xan Gregg
      Posted March 13, 2014 at 4:33 pm | Permalink

      Thanks, Howard. I'm sure you know there's a lot of commentary on the use of "data." Our style allows it with a singular verb. This Economist post is one recent treatment of the subject.

      Good point about the dot plot, which will be better in many situations, especially when 0 doesn't fit well on the scale. I think I will use another post to explore the possibilities. In the meantime, other readers may be interested in Dot Plots: A Useful Alternative to Bar Charts [PDF] by Naomi Robbins.

  2. Mike Clayton
    Posted March 13, 2014 at 11:59 am | Permalink

    I applaud your Wiki update efforts.
    That system has been amazing in recent years in its usefulness.
    One less pie chart is always a good thing in my opinion.

    I am trying to replace bar graphs for comparison purposes with box plots in cases where the raw data is really available but purposely hidden to use AVERAGES to tell a different story than the full disclosure of variability would tell. I think that is one very over-done graph trick used by political spinmeisters, bar graphs with variable spreads well hidden and averages skewed by outliers.

    • Xan Gregg Xan Gregg
      Posted March 13, 2014 at 4:36 pm | Permalink

      Good point, Mike. Getting the data at the right level is essential to making a better graph. I guess you're familiar with Sam Savage's book, The Flaw of Averages.

  3. Posted March 14, 2014 at 11:21 am | Permalink

    Xan--
    Great post for Pi Day. Your points about perception are valid, but pie charts have another huge flaw: namely, that it's not possible to put much data into the space. So pie charts work only if (a) you only want your audience to learn one or two data points and (b) they don't need to learn those one or two data points with any precision.
    In my book, "Painting with Numbers: Presenting Financials and Other Numbers So People Will Understand You," eighteen "Deadly Sins" appear somewhere in the book. Only one of them is about graphs: "Deadly Sin #10 -- Using a Pie Chart. Period." Happy Pi Day!
    -Randall

  4. Lee Creighton
    Posted March 14, 2014 at 2:10 pm | Permalink

    Great idea, Xan!

    Shouldn't this be #OneFewerPie ?

  5. Brian Powers
    Posted March 16, 2014 at 12:31 pm | Permalink

    If I could just make one comment - Since the whole point of this 'campaign' is to make corrections, shouldn't it be #onefewerpie? Less is used for nouns that are not counted, but measured. For example, We want to make the data visualization less misleading, so let's make fewer pie charts! Thanks and I'll start working on a pie chart to fix!

    • Xan Gregg Xan Gregg
      Posted March 16, 2014 at 5:31 pm | Permalink

      We almost went with "fewer", but a little research showed the issue is not so clear cut with "one less" being more common in print and sounding better to most. Thanks for participating.

3 Trackbacks

  1. By Happy Pi Day! | PolicyViz on March 14, 2014 at 7:20 am

    [...] own work or in a public space like Wikipedia with better visualizations. You can leave a comment on Xan’s blog, or here if you like, or tweet with the tag Happy Pi Day! Take action and redesign some pie charts [...]

  2. By Happy Pi Day! | HelpMeViz on March 14, 2014 at 7:22 am

    [...] own work or in a public space like Wikipedia with better visualizations. You can leave a comment on Xan’s blog or tweet with the tag #onelesspie to share your [...]

  3. By Data Viz News [47] | Visual Loop on March 15, 2014 at 10:03 am

    [...] #OneLessPie chart on Pi Day | JMP Blog [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <p> <pre lang="" line="" escaped=""> <q cite=""> <strike> <strong>