The original WSJ article used pies of various size to compare recent store closings.
As we usually do in this space, we’ll use R to create our plots.
Let’s mix things up and go remix the remix.
But first let’s consider the original.
I’m not going to copy the original from the WSJ (click the link above to check out the story), but I am going to make my own pie version. I can’t believe I spent as much time as I did working with pies in ggplot2. I wasn’t quite able to replicate the original, but the code below follows the spirit of the original.
I couldn’t fill in the donut holes, but this chart shows both the percent closing and the percent remaining. The radius of the pie/donut represents the absolute number of stores. As is usual with pies (see this essay for some discussion of the challenges with pie charts), making comparisons is difficult.
@hrbrmstr remixed the original chart and posted some ggplot code. It’s short enough to reproduce here:
This is a pretty good remix, but it’s always worth considering alternatives.
While the graphic does list the number of stores closing and remaining on the labels, it doesn’t give you any visual sense of the number of stores. For example, JC Penny is closing 138 stores, but it is keeping 862 stores open. American Apparel is closing all 110 stores. The 138 JC Penny stores represents smaller share of the JC Penny footprint but in absolute number is greater than the American Apparel closings.
Making a treemap is not trivial, but once again the internet comes through. On github wilkox shared a library called treemapify that lets you create treemaps in R (ggplot2 geoms for drawing treemaps).
Turns out it’s super simple to create a treemap with the treemapify library. Let’s do it:
Overall, I’m not sure the treemap is better than the original remix. The simple bar chart focuses on the reduction in stores (as a percent of total), while the treemap shows multiple dimensions and could be confusing.
Of course, the data is so small that we can actually show each data point in the treemap or the bar chart. For larger datasets this wouldn’t work and we would have to decide what was most important.
But it’s pretty good to know we can use treemaps with ggplot2 should we need them.