Extreme pie chart polishing
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
The usual response from statisticians and data professionals to pie charts ranges from lofty disdain to outright snobbery. But sometimes I think they’re the right tool for communication with a particular audience. Like others I was struck by this image from New Zealand news site stuff.co.nz showing that nearly half the earthquake energy of the past six years came in one day (last Sunday night, and the shaking continues by the way). Pie charts work well when the main impression of relative proportions to the whole is obvious, and fine comparisons aren’t needed.
Here’s my own version of the graphic. I polished this up during a break while working at home due to the office being shut for earthquake-related reasons:
Some of the particular aspects of pie chart polishing to note here:
- Colour filling in the wedges follows a natural sequence over time
- Colour of text is on a scale in the reverse direction to the colour of the fill, to improve readability
- Wedges advance in time clockwise rather than anti-clockwise, more intuitive for most readers
- Order of legend chosen to follow the natural sequence of the eye following the wedges around
- Pale polar co-ordinates gridlines left in place, but other unnecessary aixs numbers, ticks and titles removed
- Interpretive title, and caption showing the source
Here’s the code using R and ggplot2
. Of course, a pie chart is just a bar chart with polar co-ordinates:
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.