Graph makeover: Pie crashes

I noticed a post on linkedIn about a published report with a nice looking chart... that I couldn't really make sense of despite working in the industry for 13 years. So I opened the larger version and looked harder. While it didn't take too long to understand there was a lot of interpretation required and I think I decided it would be a good example for a makeover before I had even finished reading it. And yes, I totally stole the idea of doing a graph makeover.

Chart makeover: left - original, right - makeover

Ok so firstly, pie charts are generally avoided by the data visualisation community, perhaps most famously by Stephen Few, and for good reason, they are notoriously hard to read and interpret with only a few exceptions. The three rules of Pie I use and recommend are:
  1. Don't use a pie chart
  2. Don't use a pie chart
  3. Try using another chart first
(FYI, the main exceptions to the rule are when you only 2-3 catagories and they are of very different sizes. Check out this post for some tasty tidbits on using pies.)

Anyway, back to the makeover.  I decided to remake this chart as a bar chart for a number of reasons:
  1. They are easy to understand and judge relative quantities
  2. I could remove the colour catagories which are hard to identify when you have 7 of them
  3. I could more easily compare the two crash severity catagories (but I didn't think of this till after I started)
It's often good to start with a sketch, which I didn't do, but this is more or less what I had in my head when I started:

Concept sketch graph


So I did my best to transcribe the data off the graph and got started...

Faceted bar graph in R
While I did a quick graph in excel, I didn't like the result. I was sure most of the customisation I wanted would be available, like rotating axis labels at 45 degrees, but I couldn't find them in excel on the mac so I switched to R.

Another advantage of R is that it also had the flexibility to quickly switch between plots using facets for crash severity or the fill colour as per the final results which allowed a better comparison of the values. It also makes the chart more compact.

The final elements of the graph were mostly formatting which included:
  • Choosing a good descriptive title, subtitle and other labels
  • Getting the axis text to display clearly
  • Choosing appropriate colours that are easy to differentiate and have appropriate meaning (or not)
  • Removing chart elements not key to the message e.g. grid lines, background colours
And here is the final result. I think it is more compact and much easier to read and understand because the majority of the labels are right next to the data rather than in a legend. The bar format also allows direct comparison of the two crash severity categories which was not possible with the pie chart without reading the labels. It would be possible to further highlight particular categories by either adding a label to the top of the bar, using annotation or a different fill colour/pattern/saturation.
Note: FSI = Fatal or serious injury

Comments

Popular posts from this blog

Kiva Exploratory Data Analysis on Kaggle

Victorian Property Overlay Map

Know your bias