visualizing change via slopegraph

Elizabeth Ricks recently joined the storytelling with data team after spending the past decade in various analytical roles in the healthcare, manufacturing, retail and payments processing industries. Most recently, she was Assistant Vice President of Analytics for Bank of America Merchant Services, where she strengthened her data storytelling skills by using the key lessons covered in the storytelling with data workshop. Elizabeth has a passion for helping her audience understand the "so-what?" when communicating with data. Join me in welcoming Elizabeth and her first blog post here! You can connect with her on LinkedIn or Twitter.  

Communicating the “so what?” is fundamental to telling a story with data and I can’t overemphasize the importance of choosing an intuitive visual. Often our story is lost, simply because because we’ve chosen a graph that forces the audience to do more work than necessary. Today’s post illustrates this transformation with a real-world (de-identified!) example.

Imagine you’re a marketing analyst tasked with evaluating your product’s market share and communicating the growth opportunity to your senior marketing leadership team. You’ve gathered the data on the 14 states in which you operate and visualized your market share over the past decade in this bar chart:

blogslopegraph1.png

This graph is functionally adequate. It’s thoughtfully designed using pre-attentive attributes. The color blue cues us where to look first (that’s our market share now!), which allows our second series (our market share then) to fade to the back.  

Additionally, horizontal bar charts have many visual advantages as outlined in storytelling with data:

  • Familiar and easy to read

  • Useful for long category names

  • Align well to how we typically process information: starting from top left and zig-zagging across the page so that we process the category names before interpreting the data

We see this final point demonstrated here, as a quick vertical scan makes it relatively easy to see that our product’s market share is down in every state, except Michigan and Oregon.

That’s fantastic if that’s the end of the story. However our task is twofold: we also need to communicate how our market share has changed over time and our recommendation for the opportunity. With the current design, how easily can you see which state(s) had the greatest decline in market share? Between Michigan and Oregon, which had the greatest improvement?  

blogslopegraph2.png

As the designer of this information, we are asking our time-crunched marketing executives to do a lot of work to scan the graph and make 14 different comparisons. Never make the audience do more work than necessary to understand a graph! Perhaps a different visual would make the task easier.

Enter the slopegraph.  

The slopegraph is a visually intuitive way to see what’s changing in your data. For a deeper analysis of the beauty of slopegraphs, check out this post.

Let’s instead connect the data points with a line. Notice where your eyes go first now.    

blogslopegraph3.png

A few interesting things emerge. We can immediately see that some states have higher rates of change than others, both positive and negative. That’s the "so-what" what we want our audience to understand!

We can further improve by using color to focus our audience’s attention on specific takeaways. For example, we might use blue to highlight the positive story: we’ve improved in 2 states!

blogslopegraph4.png

Or we could focus attention on Texas, the state with the greatest market share decline.  

blogslopegraph5.png

Finally, we’d add a call to action emphasizing how the audience should use this information. Remember, we always want our audience to do something!

blogslopegraph6.png

In conclusion, if your “so-what?” is what’s changed over time, then the slopegraph can be an extremely effective visual.   

From a formatting standpoint, slopegraphs can take some time to set up. However, that’s time well invested if it means your audience clearly understands the story. Here’s a handy Excel template to get you started.   

/
CLICK HERE TO JOIN OUR MAILING LIST

SEARCH STORYTELLING WITH DATA: © 2010-2017 Cole Nussbaumer Knaflic. All rights reserved. STORYTELLING WITH DATA and the STORYTELLING WITH DATA logo are trademarks of Cole Nussbaumer Knaflic.

how would you show this data?

While riding the subway from Manhattan to Brooklyn this morning (which I mention simply because that's not a sentence I get to say every day), I came across the following graph from the Economist, headlined, "Hurricanes in America have become less frequent."

Economist_hurricane.png

This graph gave me pause for a number of reasons. But rather than recount them here, I thought it would be interesting to turn this graph (and the data) over to you. If you were reporting on this data, how would you show it? What would your headline be?

Send your makeover and headline to makeover@storytellingwithdata.com (if you'd like, include a social media profile you'd like me to link to) by next Friday, 9/22, and I'll follow up with a blog post featuring the remakes I receive. I look forward to seeing what you come up with!

axis vs data labels

A common decision point that arises when creating a graph is whether to show the axis or label the data points directly. Today's post focuses on the things I think about when making this decision and illustrates a few possibilities via example.

Probably the most common approach you'll see is where the axis is shown directly, as in the following graph.

In the above graph, we have monthly spend, in millions of dollars, on the y-axis. The x-axis is time, with Jan-Apr depicting actual data and May forward are forecast figures.

Showing both axes directly is a good default approach. This works especially well if you want your audience to focus on the shape of the data without cluttering it up with a bunch of numbers.

That said, there are circumstances that might cause you to vary from this. One consideration is the level of specificity the audience needs to have with the individual data points. If the particular numbers themselves are important, I'd suggest labeling the data points directly. In this case, you can get rid of the y-axis altogether: it's no longer necessary and becomes redundant when the points are individually labeled.

While I wouldn't typically preserve the y-axis and label every single data point (due to the redundancy previously mentioned), there may be cases where it makes sense to keep the axis and label just some of the data directly. For example, if we thought our audience would want to know how much we've actually spent each month but for the forecast we just want people to focus on the general shape of the data that illustrates our expectations, I might do something like the following:

Notice how the data labels themselves can help to draw attention to certain data points. In preattentive attribute language, these are "added marks." They act as visual cues, helping direct our audience's attention within the graph. It's like the graph is saying, "Look audience, these numbers are so important that they are labeled directly so you know what the specific values are."

We could use this strategy with data labels to direct our audience's attention to another point in the graph:

Notice that you can't help but look at the $7.5M label and the data point that goes with it. In the above, I chose a different color to fill in the data marker and also to label the data point, so as not to inadvertently visually tie together the ACTUAL data with the Jun data point (by filling it with the same dark blue as the actual data). In this case, we are drawn quickly to the $7.5M figure in Jun, while none of the other figures are labeled directly. Rather, we see the general shape of the rest of the data as context, and if we want to know rough values, can estimate those using the y-axis at the left.

This is actually an example from a recent workshop (details and numbers changed to preserve confidentiality). My final graph looked similar to the following, where in addition to the data label, I added some explanatory text:

I should note that whether to show the axis or label data directly is a decision point in most (all?) graphs. I've illustrated using a line graph here, but the same thought process can be applied to vertical or horizontal bars, scatterplots, etc.

In general, when you are deciding whether to show the axis, label the data directly, or some combination of these things: consider how you want your audience to read the graph. What level of specificity do they need to have with the individual data points? Where do you want them to pay attention? Let the answers to these questions guide your thoughtful design.

If interested, you can download the Excel file with the above graphs.

the bullet graph

The following is a guest post written by Bill Dean. After a recent workshop, Bill shared with me his affinity for bullet graphs. I've never used one before—though can see the potential—so invited him to share his views and an example approach here. Bill leads an engineering and data science team at Microsoft that enables groups across the company to analyze and act on customer feedback at scale. He loves (and makes) both BBQ and data visualizations but hasn’t yet mixed the two. For more on Bill or to connect with him, check out LinkedIn or Twitter.

While some chart series stand on their own, it sometimes makes sense to allow them to stand alone-ish. That is, you want it to stand near some benchmark (e.g., closest competitor, last year’s performance, goals) without giving up too much of the spotlight. Enter “Bullet Graphs.” Bullet graphs were seemingly developed by Stephen Few, and provide a great way to gain information density without the cognitive load of some graph options. Bullet graphs have been around a while but are utilized much less frequently than simple 2-series bar charts or even malformed eye-candy gauges.  

For example, take a typical water bill (Figure 1, below, roughly replicated from my personal bill), which does a decent job at drawing your eyes to the current year’s data via a two-series bar chart. This is actually a good starting point as I’ve seen data like this represented as two pie charts. There’s a confusion factor lurking for users to misinterpret the chart due to its two-month groupings. At first glance, one might think that January is the white bar, February the black bar, and so on in some sort of tick-tock visual joke. Instead, we’re billed two months (e.g., January-February Unit) at a time and each period is the total for combined months in each year’s data. I’m going to start with the water bill as-is, and will adjust it towards a bullet graph through a path that’s familiar…especially for Cole’s readers.

Figure 1: Original Water Bill

Figure 1: Original Water Bill

While it’s a pretty good start, the white bars representing the “previous year’s consumption” series make my eyes bleed and I might want to help it stand out less by making those bars gray and removing the border. In Figure 2, both series still have sufficient contrast ratios from the background and each other, which is good for everyone…especially “low-vision” users. It will also help to move the legend up towards the top of the chart to inform users ahead of the visual.

Figure 2: Updated Water Bill with Gray

Figure 2: Updated Water Bill with Gray

If the exact numbers matter, I could consider adding the data labels on the inside end of the bars. Only do this if you can ensure there’s always enough vertical bar space for a contrasting text and sufficient width to accommodate reasonably large numbers.

Figure 3: Updated Water Bill with Inside Labels

Figure 3: Updated Water Bill with Inside Labels

Figure 3 feels like a natural improvement over the original chart (even though I want to remove the y-axis, I’ll leave it here for continuity). I could leave this alone, but I’m going to transform it into a simple bullet graph. Next, I’d like to put the previous year’s series behind the current year’s series so the direct comparison is more obvious. I can do this by clicking once into my first data series and making it “Secondary.” Because this will move them on top of each other, I’ll want the ensure the context (previous year series) is in the background, lighter in color (it already is), and wider.

Figure 4: Simple Bullet Graph

Figure 4: Simple Bullet Graph

Now, my chart looks different because both the primary and secondary axis are using ranges that make sense for each series independently. I’ll need to intervene and ensure they’re both set to be the same. Do this by right-clicking on each axis and the “Edit Series” icon to set the scale (in this case it’s 0 to 3500). I can also delete the axis on the right (or both, if I add the value as a data label). Dealer’s choice, really. For additional decluttering, I’ve opted to remove the line at the base of the bars. 

Figure 5: Simple Bullet Graph with Consistent Axes Range

Figure 5: Simple Bullet Graph with Consistent Axes Range

Now, I’ve got a chart that draws my attention to this year’s trend with the context of what my family consumed last year (Figure 5). There’s also a side benefit that the two-month format no longer confusing as they’re grouped and centered under both bars. It’s just as easy to have made this a horizontal bar chart instead (often better for longer labels and non-time groups). This is how that would look (also used data labels in lieu of the axis).

Figure 6: Horizontal Simple Bullet Graph

Figure 6: Horizontal Simple Bullet Graph

If my water company wanted to add a little more information and a little peer pressure, they might add a more complete bullet graph with zones of guilt and a small marker that represents my local neighborhood, a goal they set for me, or (in this case) last year’s consumption for the same period).

Figure 7: Single Bullet Graph

Figure 7: Single Bullet Graph

A full series with this information would be more informative.

We can start with the data table and walk through how to do it. We’ll start with some reference ranges that will add up to the full range of the chart you want to see and will create zones in the background for context.

Table 1: Monthly Consumption Data (in percent)

Table 1: Monthly Consumption Data (in percent)

Start, by highlighting the entire table in Excel and use the Insert tab to add a 100% stack chart. It will be hideous!

Figure 8. Default Stack Chart

Figure 8. Default Stack Chart

Excel draws the table in reverse order (the top cell value is at the bottom of each chart column with each subsequent value piled on top). This is important to know so you start with what you want in the background at the top of the table. 

The blue, orange, gray sequence for each period in Figure 8 is the Conservative, High, Extremely High data from my table, respectively. You’ll want to right click the bottom series and color that a dark gray, the orange series should be a noticeable bit lighter than that, and the gray series should be a few notches lighter than the previous value. Set the outline to “None” (or make it white to have the borders pop a little).

Figure 9. Stack Chart Mid-Formatting

Figure 9. Stack Chart Mid-Formatting

From here, you’ll want to right-click one of the series and adjust the gap width to 40% or so to ensure the bars are nice and wide. When you hover over untouched series, you’ll see that they are the current and previous year. Let’s go ahead and make those “secondary” by right- clicking on “Change Series Chart Type.” Check the box for both Current and Previous years’ data. For the current year, we’ll change that to the “stacked column” chart while the previous year will be set to a “stacked line with markers.”

Figure 10: Stack Chart Changing Chart Type and Secondary Axes

Figure 10: Stack Chart Changing Chart Type and Secondary Axes

While we’re at it, we can eliminate the chart border and the axis lines. We’re civilized, after all.

Figure 11: Stack Chart with Secondary Axes and Mixed Chart Types

Figure 11: Stack Chart with Secondary Axes and Mixed Chart Types

Formatting the Current Year Consumption to Black and removing the ‘Previous Year’ connecting lines gets us REALLY close to the final chart.

Figure 12: Stack Chart Starting to Look Like a Bullet Graph

Figure 12: Stack Chart Starting to Look Like a Bullet Graph

Here we can play with the Previous Year Consumption marker to ensure it can be seen a bit more clearly. Click on the series by right-clicking on the dots and selecting “Format Data Series” (Figure 13). Select the Marker, Built-in and click on the wide dash. The default size is 5, but it will look much better around 18.

Figure 13: Format Data Series Marker

Figure 13: Format Data Series Marker

It’s not quite done because you’ll need to ensure both axis are set to 0-100%. Do this then delete one of them (most delete the right).

Figure 14: Bullet Graph Core Completed

Figure 14: Bullet Graph Core Completed

On the home stretch as now you can adjust the colors, add a title, and size it appropriately to fit your dashboard, report, etc. There’s a really helpful feature that might help down the line so that you can consistently format all similar charts EXACTLY the same way. Right-click your chart and click “Save as Template,” name it, and save it.

Next time you have a set of data like this, you can start with whatever chart you want, right-click, and select “Change Series Chart Type” > “Templates” > Chart Template.

Figure 15: Chart Template Dialogue

Figure 15: Chart Template Dialogue

Figure 16: Bullet Graph with Title, Lighter Ranges, Less Clutter

Figure 16: Bullet Graph with Title, Lighter Ranges, Less Clutter

It’s probably more likely that each month pair has a different idea of what Conservative Water Usage, High, and Extremely High Usage so I’ve made each zone differently sized in Figure 17.

Figure 17: Bullet Graph with Variable Ranges

Figure 17: Bullet Graph with Variable Ranges

...and with a navy bar.

Figure 18: Bullet Graph with Navy Bar

Figure 18: Bullet Graph with Navy Bar

...and another, even bluer option in Figure 19 (in honor of “Towel Day”).

Figure 19: Bullet Graph with Hooloovoo

Figure 19: Bullet Graph with Hooloovoo

The following GIF (Figure 20) demonstrates the process described above and should keep your cats busy, if not teach them how to make bullet graphs. 

Figure 20: GIF

Figure 20: GIF

Jon Peltier also has a variety of instructions if you’d like to see a variety of ways to make bullet charts in both horizontal and vertical varieties. 

Huge thanks to Bill for this thorough and informative post! You can download the Excel file that contains his graphs.

/
CLICK HERE TO JOIN OUR MAILING LIST

SEARCH STORYTELLING WITH DATA: © 2010-2017 Cole Nussbaumer Knaflic. All rights reserved. STORYTELLING WITH DATA and the STORYTELLING WITH DATA logo are trademarks of Cole Nussbaumer Knaflic.