A few weeks ago I was in Indianapolis with the juvenile detention alternatives initiative. This group wanted to graph:
- how many youth went to juvenile detention centers,
- by gender, and
- by quarter.
Brainstorming
There are a dozen ways to graph each dataset. For this data, we could utilize:
- table
- heat table
-
quarter-by-quarter pies(well, not the best choice) - one year-end pie
- line graph with numbers
- small multiples line graphs with numbers
- clustered bar
- small multiples bar
- stacked bars with numbers
- stacked bars with percentages
- stacked area with numbers
- stacked area with percents
- and probably a few more that I haven’t thought of yet
Before: Quarter-by-quarter pies
Naturally, the quarter-by-quarter-no-way-these-don’t-work-pies were currently being used by a few people in the room. I adjusted the wording from youth going to detention centers to youth being served so that this example is relevant to even more of you.
The quarter-by-quarter pies are off the table. According to my pie chart guidelines, gender breakdowns are one of the only times it’s okay to use a pie chart (nominal variable, just a few slices, etc.). But it’s really hard to make comparisons across multiple pies. Your eyes would have to jump from the 1st quarter pie to the 2nd quarter pie to the 3rd quarter pie to the 4th quarter pie and back again. I’m tired just thinking about it.
After
After we sketched ideas and discussed the pros and cons of each approach, we decided that stacked bars with numbers were the most promising. Stacked bars can display the number of males, females, and the totals. They’re also easy to label (compared to, say, a stacked area chart). We used vertical bars because time is ordinal.
My rule of thumb is to display numbers for anything less than 100 and percentages for anything over 100. Fewer than 100 youth went to these detention centers each quarter, so we displayed numbers.
Here’s the after version for a slideshow:
Here’s the after version for a handout or report, which intentionally contains a bit more explanatory text.
Make this yourself
No, I didn’t add the totals to each quarter’s bar chart with text boxes. Yes, that’s possible. It’s also a ton of work to crunch the numbers, create text boxes, and center them perfectly above each bar. This is a stacked bar chart with three segments: males, females, and totals. The total segment has a transparent fill so it looks invisible.
If you want to explore the strategy in more detail, watch the video or download the template.
That’s right, I’m YouTubing again!!!!!!!!!
Purchase the templates ($5)
MpPierce
Mar 31, 2017 -
Great post, and I especially like seeing all of the options you presented in the video. Thanks for that! I had 2 how-to questions for you: (1) In the “handout” version of the chart, do you hardcode the values (198 total, 140 males, etc.) and the color formatting? Or is there a way to do that via formulas? I’m thinking, because of the formatting, that it’s done by hand. And (2) for the labels in the first bar…did you do those manually or with formulas? I know you can display both the series name as well as the value, but when I do that, it displays “males 29” instead of “29 males.” Thanks!
Ann K. Emery
Mar 31, 2017 -
For the handout, I inserted a text box and wrote a few sentences by hand. If this graph were staying inside of Excel, you could write a formula that automatically tallies the annual amounts and you could use conditional formatting to automatically color-code those numbers.
For the labels in the first stacked bar chart, I think I just typed “males” and “females” into the boxes with the numeric labels. I often write formulas that concatenate the numbers and the words together and then tell the chart to use those concatenated cell ranges as the labels.
Excel Roundup 20170504 – Contextures Blog
May 4, 2017 -
[…] K. Emery shows the steps for planning and building an Excel chart, from the sketching phase, to the completed chart. What works, and what doesn’t? […]