Sep 072016
 

Overview

TruthfulArtImagine a terrific introductory college course presented by a terrific professor.

That’s the feeling I had in reading The Truthful Art, Alberto Cairo’s follow up to his first book The Functional Art.

Whereas his first book took a “look at what you can and should do” approach to help people see and understand data, The Truthful Art is more of a “here’s what you need to know” if you want to be a data journalist — and there’s a lot of things you need to know if you are going to do a proper job.

I’m reluctant to use the term “data journalism” as Cairo’s book is for anyone that that is tasked with helping people make sense of data. The difference is that the data journalist’s work is likely to be public and yours may only be seen by people working in your organization. But while you may not have to make a dashboard that is as polished as an infographic from the New York Times, both you and the data journalist need to adhere to a particular doctrine and have sufficient skills across a wide range of topics if you are going to build functional, truthful, and meaningful visualizations.

First, Be Truthful

If the credo for doctors is to “first, do no harm” Cairo might argue that the credo for data journalists is to “first, be truthful.” Cairo makes the case that a good visualization must be

  • Truthful
  • Functional
  • Beautiful
  • Insightful
  • Enlightening

And it must be these things in this order of priority. That is, the visualization must first be “relevant, factual, and accurate” and only then should it be “accessible and engaging.” Cairo further states that “honesty, clarity, and depth come first.” Indeed, this is why he bristles with outrage over deceitful graphics like this one.

So, how, exactly, does one create something that is truthful, functional, beautiful, insightful, and enlightening?

By achieving a sufficient level of competence in a LOT of different areas.

And just what are those areas?

The Data Journalism Landscape

In reading The Truthful Art you may feel like you are in a helicopter several thousand feet above the data visualization landscape. In each section Cairo, as expert guide, will gently descend to several hundred feet above a particular area and allow you to examine varied topics including design, statistics, color, storytelling, psychology, and ethics. While the book never gets deep into any of these subjects Cairo does provide excellent resources for anyone interested in exploring a particular topic in depth as every chapter of the book ends with a section titled “To Learn More.”

While Cairo’s writing is disarmingly warm and engaging he takes the responsibility of data storytelling very seriously. By the end of the book you will have an excellent understanding of the investment needed to make a worthwhile contribution to your company, society, or both.

Conclusion

Whether you are new to the field or have been practicing for years, I’m confident you’ll find The Truthful Art, like its predecessor, to be fun, elucidating, and inspiring.

The Truthful Art

Paperback: 400 pages

Publisher: New Riders; 1 edition (February 28, 2016)

Aug 112016
 

Overview

As readers of this blog know, I have my problems with donut charts.

That said, I acknowledge that they can be cool and, under certain circumstances, enormously useful.

On a recent flight I was struck by how much I liked the animated “estimated time to arrival” donut chart that appeared on my personal TV screen. An example of such a chart is shown in Figure 1.

Figure 1 -- Donut chart showing progress towards completion of a flight.

Figure 1 — Donut chart showing progress towards completion of a flight.

I find this image very attractive and very easy to understand — I can see that I’m almost three-quarters of the way to my destination and that there are only 49 minutes left to the flight.

So, given how clear and cool this is, why not use them on a dashboard?  And if one is good, why not use lots of them?

It’s the “more than one” situation that may lead to problems.

Trying to make comparisons with donut charts

The flight status chart works because it shows only one thing only: a single item’s progress towards a goal.

Let’s see what happens when we want to compare more than one item.

Consider the chart in Figure 2 that shows the placement rates for Fremontia Academy.

Figure 2 -- Donut chart showing placement percentage.

Figure 2 — Donut chart showing placement percentage.

A 95% placement percentage is really impressive.  Is that better than other institutions?  If so, how much better is it?

Figure 3 shows a comparison among three different institutions using three different donut charts.

03_3Donuts

Figure 3  — Three donut charts displaying placement percentages for three different institutions.

Before digging deeper let’s replace the three separate donuts with a donut-within-a-donut-within-a donut chart (Figure 4.)

Figure 4  -- A concentric donut chart (also called a “radial bar chart” or a “pie gauge.”)

Figure 4  — A concentric donut chart (also called a “radial bar chart” or a “pie gauge.”)

“What’s the problem?” you may ask, “these comparisons are easy.”

While you may be able to make the comparisons you are in fact working consierably harder than you need to be.

Really.  Let me prove it to you.

Let’s suppose you wanted to compare the heights of three famous buildings: One World Trade Center, The Empire State Building, and The Chrysler Building (Figure 5).

Figure 5  -- Comparing the size (in feet) of three large buildings.

Figure 5  — Comparing the size (in feet) of three large buildings.

Now that’s an easy comparison. With virtually no effort we can see that One World Trade Center (blue) is almost twice as tall as The Chrysler Building (red).

Now let’s see how easy the comparison is with donuts (Figure 6.)

Figure 6  -- Three large buildings twisted into semi-circles.

Figure 6  — Three large buildings twisted into semi-circles.

Here are the same buildings rendered using a concentric donut chart (Figure 7).

Figure 7  -- Three skyscrapers spooning.

Figure 7  — Three skyscrapers spooning.

Yikes.

So, with this somewhat contrived but hopefully memorable  example we took something that was simple to compare (the silhouettes of buildings) and contorted them into difficult-to-compare semi-circles.

With this in mind, let’s revisit the Placement example we saw in Figure 3.

Here is the same data rendered using a bar chart.

Figure 8 -- Placement percentage comparison using a bar chart.

Figure 8 — Placement percentage comparison using a bar chart.

The comparison is much easier with the bars than with the donuts / semi-circles. You can tell with practically no effort that the blue bar is approximately twice as long as the red bar, even without looking at the numbers.

Indeed, that’s a really good test of how clear your visualization is: can you compare magnitude if the numbers are hidden?

Pop quiz — how much larger is the orange segment compared to the red segment?

Figure 9 -- Trying to compare the length of donut segments is difficult.

Figure 9 — Trying to compare the length of donut segments is difficult.

Now try to answer the same question with a “boring” bar chart.

Figure 10 -- Comparing the length of bars is easy.

Figure 10 — Comparing the length of bars is easy.

With the circle segments you are squinting and guessing while with the bars you know immediately: the orange bar is twice as large as the red bar.

More downsides for donuts

In addition to comparisons being difficult, how would you handle a situation where you exceeded a goal?  For example, how do you show a salesperson beating his / her quota?  With a bar chart you can show the bar going beyond the goal line (Figure 11).

Figure 11 -- With a bar chart it's easy to show more than 100% of goal.

Figure 11 — With a bar chart it’s easy to show more than 100% of goal.

How do you show this with a donut chart?

Rhetorical question.  You can’t.

Conclusion

If you only have to show progress towards a single goal and don’t need to make a comparison then it’s fine to use a donut chart. If you need anything more complex you should use a bar chart as it will be much easier for you and your users to understand the data.

Special thanks to Eric Kim for creating the building images.

 

Jun 222016
 

Overview

My obsession with finding the best way to visualize data will often infiltrate my dreams. In my slumbers I find myself dragging Tableau pills in an ongoing pursuit to come up with the ideal dashboard that shines light on whatever data set has invaded my psyche.

But is the pursuit of the perfect dashboard folly?

Probably, as I’ll explain in a minute, but I don’t want to suggest anyone not at least try for the clearest, most insightful and most enlightening way to display information.

Is this way is the best way?

This pursuit of the ideal chart preoccupies a lot of people in the data visualization community. Consider this open discussion between Stephen Few and Cole Nussbaumer Knafflic that transpired earlier this year.

As you will read, Few weighs in on Knaflic’s book Storytelling with Data and her use of 100% stacked bar charts.  He cited this particular example.

Figure 1 -- Knafflic's 100% stacked bar

Figure 1 — Knafflic’s 100% stacked bar

Few argued that there was a better approach and that would be to have a line chart with a separate line for each goal state.

Figure 2 -- Few's line chart

Figure 2 — Few’s line chart

Having written about visualizing sentiment and proclivities, I chimed in suggesting that a divergent stacked bar chart would be better (see Figure 3.) I think this presents a clearer and more flexible approach, especially if you have more than three categories to compare as the 100% stacked bar chart and line chart can become difficult to read.

Figure 3 -- My divergent stacked bar chart

Figure 3 — My divergent stacked bar chart

The ongoing public discussion was engaging and congenial but I’ve seen similar cases where one or more of the parties advocating a solution become so certain that his / her approach is without a shadow of a doubt the only right way to present the data that tempers flare high. Indeed, I’ve seen instances where some well-respected authors have declared a type of “Sharia Law” of data visualization and have banned so-called heretics and dilettantes from leaving comments on blogs and even following on Twitter!

My take? While I prefer the divergent stacked bar, the real question is whether the intended audience can see and understand the data. In this case, if management cannot tell from any of the three charts that there was a problem that started in Q3 2014 and continued for each quarter, then that company has some serious issues.

In other words, if the people that need to “get” it can in fact make comparisons, see what is important, and make good decisions on their new-found understanding of the data  — all without having to work unnecessarily hard to decode the chart — then you have succeeded.

I’m not saying don’t strive to be as efficient , clear, and engaging as possible, it’s just that the goal shouldn’t be to make the perfect chart; it should be to inform and enlighten.

And in this case I think all three approaches will more than suffice.  So stop arguing.

Understanding and educating your audience

Earlier this year I got a big kick out of something that Alberto Cairo retweeted:

Figure 4 -- Avoid Xenographphobia: The fear of unusual graphics / foreign chart types.

Figure 4 — Avoid Xenographphobia: The fear of unusual graphics / foreign chart types.

Xenographphobia! What a wonderful neologism meaning “fear of unusual graphics.”

So, why do I bring this up? While it’s critical to know your audience and not overwhelm them with unnecessary complexity, you should not be afraid to educate them as well. I’ve heard far too often people proclaim “oh, our executive team will never understand that chart.”

Really? Is the chart so complex or the executive so close-minded that they won’t invest a little bit of time getting up to speed with an approach that may be new, but very worthwhile?

I remember the first time I saw a bullet chart (a Stephen Few creation) and thought “what is this nonsense?”  It turns out it wasn’t, and isn’t, nonsense.  It took all of 60 seconds for somebody to explain how the chart worked and I immediately saw how valuable it was.

Figure 5 -- A bullet chart, explained.

Figure 5 — A bullet chart, explained.

I had a similar reaction when I first heard about jump plots from Tom VanBuskirk and Chris DeMartini. My thoughts at the time were “oooh… curvy lines.  I love curvy lines! But I suspect this is a case where the chart is too much decoration and not enough information. I bet there are better, simpler ways to present the data.”

Figure 6 -- Jump plot example. Yes, these are very decorative, but they are also wickedly informative.

Figure 6 — Jump plot example. Yes, these are very decorative, but they are also wickedly informative.

Then I spent some time looking into the use cases and came to the conclusion that for those particular situations jump plots and jump lines worked really well.

That said, there are some novel charts that I don’t think I will ever endorse, with the pie gauge being at the top of my list.

Figure 7 -- The pie gauge, aka, a donut chart within a donut chart, aka, stacked donut chart. I won't go into the use case here but a bullet chart is a much better choice.

Figure 7 — The pie gauge, aka, a donut chart within a donut chart, aka, stacked donut chart. I won’t go into the use case here but a bullet chart is a much better choice.

So, what should we do?

I’ve argued that you should always try to make it as easy as possible for people to understand the data but you should not go crazy trying to make the “perfect dashboard.”

I also argue that that while you should understand the skillset and mindset of your audience, you should not be afraid to educate them on new chart types, especially if it’s a “learn once, use over and over” type of situation.

But what about aesthetics, engagement, and interactivity? What roles do these play?  Is there a set of guidelines or framework we should follow in crafting visualizations?

Alberto Cairo, in his book The Truthful Art, suggests such a framework based on five key qualities.

I plan to write about these qualities (and the book) soon.

Apr 112016
 

Overview

This past week I enjoyed looking at and interacting with Matt Chambers’ car color popularity bump chart.

 Figure 1 -- Matt Chambers' car color popularity bump chart.

Figure 1 — Matt Chambers’ car color popularity bump chart.  You can find the original Datagraver visualization upon which this was based here.

The key to this dashboard is interactivity as it’s hard to parse all the car colors at once. If you hover over one at a time it’s easy follow the trends, as shown here.

Figure 2 -- Hovering over a color shows you that color’s ranking over time

Figure 2 — Hovering over a color shows you that color’s ranking over time

Showing Rank Only

Over the past few months I’ve seen a lot of people making bump charts (myself included). As much as I like them I fear that people are leaving some critical insights out of the discussion as bump charts only show ordinal information and not cardinal information. That is, they show rank but not magnitude.

Consider the bump chart above.  In 2009 White was the number one color, Black was number two, and Red was a distant sixth.

Figure 3 -- Red appears to be a distant sixth

Figure 3 — Red appears to be a distant sixth

But was Red in fact “distant” or its popularity closer than it would appear?  When you just show rank there’s no easy way to tell.

Showing Rank and Magnitude

Consider the dashboard below that shows the overall ranking and percentage popularity for car colors over the last ten years.

Figure 4 -- Ranked Bar Chart dashboard with no colors selected

Figure 4 — Ranked Bar Chart dashboard with no colors selected

Right now we can see that over the last ten years white came in first place with 22% and Red came in fifth place with 11%.  Now let’s see what happens if we select red and white, as shown below.

Figure 5 -- Comparing popularity of white and red car over the last ten years.

Figure 5 — Comparing popularity of white and red car over the last ten years.

Here we can see everything that the bump chart had plus so much more. Specifically, we can see that White was in first place for the past ten years and that Red was as high as fourth place in 2007 and as low as sixth place in 2008 and 2009. But we can also see that in 2009 White was only 50% larger than Red while in 2015 it was almost 150% larger!

Try it yourself

Click here to interact with the color popularity ranked bar chart.

Ranked Bars are Versatile

The ranked bar approach works well showing rank and magnitude over time and across different categories.

Consider the dashboard below that shows the sales for the top 20 products overall and then a ranked breakdown by one of three possible categories (Customer Segment, Region, and Year)

Figure 6 -- Overall sales / rank and sales / rank broken down by Customer Segment.

Figure 6 — Overall sales / rank and sales / rank broken down by Customer Segment.

Here we can see not only how the Bosch Full Integrated Dishwasher is ranked overall and within the four Customer Segments, but we can also see how much more and less the other products’ sales were.

Here’s the same dashboard showing a breakdown by Region.

Figure 7 -- Overall sales / rank and sales / rank broken down by Region.

Figure 7 — Overall sales / rank and sales / rank broken down by Region.

The Bosch Dishwasher is fifth overall but it isn’t even in the Top 20 in the South.  We can also see that it is Second in the East, ever-so-slightly behind the first ranked product (the Whirlpool Upright Freezer.  You can see for yourself when you interact with the dashboard that’s at the end of the post).

Here’s the same data but presented using a bump chart.

Figure 8 -- Overall sales / rank and just rank by Region.

Figure 8 — Overall sales / rank and just rank by Region.

The bump chart looks cool but we only get part of the story as I can only glean rank.

Conclusion

The bump chart is a great choice if you want to show “soft” rankings, such as what place a team came in over time, but if you want to show rank and magnitude, consider the ranked bar chart instead.

Note: for step-by-step instructions on how to build a dashboard like the one below, see Visual Ranking within a Category.

The Ranked Bar Dashboard — Kick The Tires

Mar 302016
 

Some thoughts on functionality, beauty, crown molding, and lollipop charts

Overview

I’ve been writing a book about business dashboards with Jeffrey Shaffer and Andy Cotgreave and we’ve conducted screen-sharing sessions with dozens of people and reviewed scores of dashboards. We had a particularly enjoyable jam session with Tableau Zen Master Mark Jackson last week. When we asked him why he had done something in particular he replied with a comment that has been haunting me (in a good way) ever since:

“I look at this dashboard first thing every morning. I want to look at something beautiful.”

This really resonated with me. Mark was not tasked with making a public-facing dashboard that had to compete with USA Today infographics. He just wanted to make something that was both functional and beautiful. It made me think of waking up in a lovely room with crown molding. You don’t need crown molding, but as long as it isn’t blocking sunlight or clashing with the decor it’s certainly delightful to have crown molding.

This got me thinking about a topic I come back to often — how to make visualizations that are both functional and beautiful.

Unfortunately, this isn’t so easy and often leads to people sacrificing clarity for the sake of coolitude (see “Balancing Accuracy, Engagement, and Tone” and “It’s Your Data, not the Viz, That’s Boring” for some more thoughts on the matter).  I did, however, want to share a case study that had a delightful outcome and that employed a chart type that combines the accuracy of a bar chart with a bit of the “oooh” from packed bubbles and “ahhh” from donut charts.

Marist Poll and Views of the 2016 Presidential Election

Marist Poll is one of my clients and they are tasked with providing nationwide survey results to The Wall Street Journal and NBC News.  In November 2015 they conducted a poll asking people to describe in one word the tone of the 2016 presidential election. Here were the results.

Figure 1 -- Marist Poll results in tabular form

Figure 1 — Marist Poll results in tabular form

Attempt One — Word Cloud

The results from the poll are very compelling but the results as depicted in the text table don’t exactly pop.

The client tried a word cloud as shown below.

Figure 2 -- Marist Poll results using a word cloud

Figure 2 — Marist Poll results using a word cloud

I’ll admit that the graphic “pops” but it’s hard to make sense of the six terms let alone discern that the results for “Crazy” were almost three times greater than the next most popular term.

Attempt Two — Packed Bubbles

People love circles and this chart certainly looks “cool” but what does it tell other than that the “Crazy” circle is larger than the other circles?

Figure 3 -- Marist Poll results with packed bubbles

Figure 3 — Marist Poll results using packed bubbles

Why not use a simple bar chart?

Attempt Three — A Simple Bar Chart

Here are the same results rendered using the chart type Tableau’s “Show Me” suggests you use when working with this type of data.

Figure 4 -- Marist Poll results using a bar chart

Figure 4 — Marist Poll results using a bar chart

This is a big improvement over the word cloud and packed bubbles with respect to clarity — you can easily sort the responses and see how much larger “Crazy” is than the other responses.

But the chart is a bit sterile. What can we do to make the “Crazy” pop out without distorting the information?

Attempt Four — A Colored Bar Chart

The major takeaway from the poll is that 40% of the respondents characterized the election as “Crazy.” We can make that easier to glean by making that bar a bold color and all the other bars muted, as shown here.

Figure 5 -- Marist Poll results using a bar chart with one bar colored differently

Figure 5 — Marist Poll results using a bar chart with one bar colored differently

I’ll confess that this does the trick for me, but the client wanted to pursue some other options so we looked into a lollipop chart.

Attempt Five — Lollipop Chart

The lollipop chart is not native to Tableau;  it’s simply a dual axis chart that superimposes a circle chart on top of a bar chart that has very thin bars.

Figure 6 -- Marist Poll results as a lollipop chart

Figure 6 — Marist Poll results using a lollipop chart

This strikes me as an excellent compromise between the analytical integrity of the bar chart and the “ooh… circles” appeal of the packed bubbles.  I have no qualms about using this chart type.

But there’s still something if we want the chart to have some impact.

Final Attempt — Adding a Compelling Title

A concise, descriptive title can make a huge difference in garnering attention and making a chart more memorable. In the example below the client added some graphic design artistry to the typography to make the title compelling.

Figure 7 -- Marist Poll results as a lollipop chart with compelling headline.  I love this.

Figure 7 — Marist Poll results using a lollipop chart with compelling headline.  I love this.

Conclusion

My bass-playing friends will probably agree that “groove” is more important than “chops.”  That is, being able to play “in the pocket” with a rock-steady beat is more important than being able to play a great solo with a flurry of notes all over the neck.

But it sure is great to be able to do both.

The same goes for data visualization. Functionality needs to come first, then beauty.

But it sure is great to have both.

And in many cases, with a little extra effort, you can have both.

So go ahead, try putting some “crown molding” into your data visualizations and delight yourself and your stakeholders.

 

Nov 102015
 

Overview

Several weeks ago the data visualization community broke into justified outrage over an inexcusably misleading dual-axis chart from Americans United for Life.  I plan to write an article about this and other “ethically wrong” visualizations in a few weeks but in the meantime I encourage you to read these excellent posts from Alberto Cairo and Emily Schuch, as well as this discussion from Politifact.

Around the same time these posts appeared I came across a “Viz of the Day” dashboard from Emily Le Coz that accompanied a lengthy article in the Daytona Beach News-Journal.  The dashboard contained several visualizations but the one that caught my eye was this dual axis chart.

Figure 1 -- Infographic showing that as the number of firefighters has increased over the past 30 years, the number of fire-related deaths has decreased.

Figure 1 — Infographic showing that as the number of firefighters has increased over the past 30 years, the number of fire-related deaths has decreased.

I engaged in an interesting Twitter discussion about this graphic with Alberto Cairo, Jorge Camoes, and Noah Illinsky. I’ll get into that discussion in a bit (and point out some troubling problems with the visualization) but first want to discuss the use case for dual axis charts.

Why use dual axis charts

There are several reasons to use a dual axis chart (e.g., a Pareto chart that shows individual values along with the cumulative percent) but the primary use case is when you want to compare two completely different measures and see if there is any noteworthy relationship between the two measures.  Consider the example below that shows cyclical sales data for a retail store (bars) and the number of orders placed each month (line).

Figure 2 -- Dual axis chart comparing sales and orders by month.

Figure 2 — Dual axis chart comparing sales and orders by month.

The surprising result is that while November is historically the strongest month for sales ($5M from 2010 to 2013) the total number of orders placed in November is the lowest of any month. And yes, I checked to make sure that this was true of all years and not one crazy blowout year.

I think this dual axis combination chart (where we show bars and a line) makes it easy to see there is something very interesting about November. The low number of orders combined with the high sales – something that is easy to see – means that we either sold more items per order or more expensive items per order.

So, what’s wrong with the firefighter example?

Given that dual axis charts can be so useful I wondered why I had problems with the Firefighter example.  Fortunately, the author made the dashboard downloadable from Tableau public so I was able to see how it was put together.

Cutesy icons set the wrong tone for the piece

My first problem was with the firefighter hat and skull-and-crossbones icons.

Figure 3 -- Icons representing firefighters and civilian deaths.

Figure 3 — Icons representing firefighters and civilian deaths.

In my opinion (and it is just an opinion) I thought this “cartoonified” the visualization. I would much prefer to see either a simple color legend or a label next to both lines.

The author exaggerates the changes over time

A much more troubling issue is that the author uses a fixed Y-axis that exaggerates the changes over time.  The author also fails to show the axis labels so we can’t see that the axis doesn’t start at zero.

Consider the dashboard below that shows the original visualization on the left with an accurate visualization on the right.

Figure 4 -- Comparison of fixed axis vs. automatic axis charts.  Note that the axis uses a SUM() function while the label is using AVERAGE(). The data is repeated three times in the data source which is why the author needs to use AVERAGE(). Yes, the axis should use AVERAGE() as well but the relative positioning of the elements is the same with SUM() so this causes no harm.

Figure 4 — Comparison of fixed axis vs. automatic axis charts.  Note that the axis uses a SUM() function while the label is using AVERAGE(). The data is repeated three times in the data source which is why the author needs to use AVERAGE(). Yes, the axis should use AVERAGE() as well but the relative positioning of the elements is the same with SUM() so this causes no harm.

Because the author fixed the Y-axis rather than starting from zero, the slope of the lines is exaggerated. While this does not alter what is in fact a noteworthy observation, whenever I see this type of “rigging” it makes me question the validity of any and all parts of the story.  That is, even though I don’t think the exaggeration was an intentional attempt to dramatize the difference, seeing this in play will make me question everything that the author and the publication now publishes.

Am I being too hard on the author? I don’t think so as anything that’s published as a “viz of the day” and accompanies a high-profile news article should get a lot more scrutiny than just any old Tableau Public visualization.  While I don’t feel mislead by the overstated changes, I do wonder at what point does a viz cross the line into TURD territory (Truly Unfortunate Representation of Data)? We’ll save that discussion for a later post.

Different approaches

Combination area and line chart

After adjusting the axis I still wondered if having two line charts was causing unnecessary confusion. In my first makeover attempt I tried combining an area graph with a line chart, as shown here.

Figure 5 -- First makeover attempt.  A dual axis chart using an area chart for firefighters and a line chart for civilian deaths.

Figure 5 — First makeover attempt.  A dual axis chart using an area chart for firefighters and a line chart for civilian deaths.

While using two different chart types made it easier to see that I was comparing two different measures, I didn’t love the chart and sought alternatives.

Connected Scatterplots

On Twitter Jorge Camoes offered this connected scatterplot.

Figure 6 -- Jorge Camoes’ connected scatterplot.  Notice that the axes do not start at zero but that the axes labels are at least visible.

Figure 6 — Jorge Camoes’ connected scatterplot.  Notice that the axes do not start at zero but that the axes labels are at least visible.

In a connected scatterplot the path the line takes represents the year.  This is why the line folds back on itself from time to time (more on this in a moment).  Camoes also “normalized” the data using an index so that both civilian deaths and number of firefighters start at a value of 100.

I like this visualization very much but fear that many people won’t understand the index value of 100 so I tried my own connected scatterplot, shown below.

Figure 7 -- Connected scatterplot with regular vs. normalized values.  Notice that the X-axis does not start at zero but that the axes labels are visible.

Figure 7 — Connected scatterplot with regular vs. normalized values.  Notice that the X-axis does not start at zero but that the axes labels are visible.

Before anyone cries foul about the X-axis, here’s a version with the axis starting at zero.

Figure 8 -- Connected scatterplot with both axes starting at zero.  This may be why Camoes normalized the data although his chart doesn’t start at zero, either.

Figure 8 — Connected scatterplot with both axes starting at zero.  This may be why Camoes normalized the data although his chart doesn’t start at zero, either.

I think starting the x-axis at zero obscures the relationship but that’s not what makes me question using this approach.  My problem is that many people will have a hard time understanding how the line “works”, as it were.  This is because whenever we see a line chart that involves time we come to expect marks on the left of the chart to show older dates and marks on the right to show newer dates.  In other words, we expect the chart to behave like this.

Figure 9 – Since grade school we’ve been indoctrinated to expect earlier dates to the left and later dates to the right.

Figure 9 – Since grade school we’ve been indoctrinated to expect earlier dates to the left and later dates to the right.

With a connected scatterplot the X-axis is “owned” by an independent measure so we have to adjust our perception to see that sometimes a later year will appear to the left of an earlier year, as shown below.

Figure 10 -- Connected scatterplot with marks showing all years.

Figure 10 — Connected scatterplot with marks showing all years.

Notice how 1986 appears to the left of 1985 and 1989 appears to the left of 1988.  Unless you are used to this type of approach this can look very strange.

Keep it simple

After experimenting a bit more I decided to forgo the dual axis and connected scatterplots and fashioned this simpler narrative.

Figure 11 -- Two separate charts yielding a simple and easy-to-follow narrative.

Figure 11 — Two separate charts yielding a simple and easy-to-follow narrative.

If you have what you think is a better approach I would love to see it.  If you’re using Tableau you can download the packaged workbook with the original dashboard and various makeover attempts here.

Sep 232015
 

Overview

I recently wrote about emotional vs. accurate comparisons and several people questioned whether the word “emotional” was appropriate.  (Several people questioned my assertions, too.  You can read their comments here.)

For this discussion I’ll use the term “engagement” in place of “emotion” and we’ll look into the challenges of creating public-facing visualizations that attract and engage, are clear and accurate, and do these things without “dumbing down” the subject matter.

Time Magazine and a cumbersome infographic

Stephen Few recently wrote a great post about the following infographic that appeared in Time Magazine in August, 2015.

Figure 1 -- Time Magazine's "Why we still need women's equality day" infographic. See http://time.com/4010645/womens-equality-day/.

Figure 1 — Time Magazine’s “Why we still need women’s equality day” infographic. See http://time.com/4010645/womens-equality-day/.

I have three major problems with this treatment.

  1. This is an important subject but the cutesy approach trivializes it.
  2. With so many chart types I have to work very hard to make comparisons among the different areas (Federal, Congressional, etc.). In addition, the chart is very long and requires a lot of scrolling.
  3. I strongly suspect that most people thought this was a dashboard having to do with Republicans and Democrats. I know that for me, whenever I see red and blue in a political context I think Republicans and Democrats and I had to fight this expectation to see that this was about men and women.

Stephen Few’s redesign

Here is Few’s redesign.

Figure 2 – Stephen Few’s clear and compact redesign.

Figure 2 – Stephen Few’s clear and compact redesign.

The collection of stacked bars makes it very simple to compare across the various categories and treats an important subject with the seriousness that is warranted.

But…

Few’s treatment is rather clinical and may be a little too dry for Time Magazine.

So, is there a way to fashion a graphic that is clear and accurate, like Few’s, but does more to draw the reader in?

Alberto Cairo’s redesign

Stephen Few asked Alberto Cairo to have a look at the source graphic and Cairo was able to turn out the following in a matter of minutes.

Figure 3 -- Cairo's redesign of Few's redesign.

Figure 3 — Cairo’s redesign of Few’s redesign.

Here are Stephen Few’s comments upon seeing the redesign:

“Alberto,

You’re the man! I love your improvements to the graphic.

You described your version as middle ground between my position and that of the embellishers, but I don’t see it that way. I’m an advocate of the kinds of embellishments that you added to the graphic for journalistic purposes, for they don’t detract from the information in any way. I’ve always said that journalistic infographics can be both informative and beautiful without compromising either. Doing this takes skill, however, that relatively few of the folks producing infographics possess. It also takes graphic design skill that I don’t possess, which is why I don’t design journalistic infographics. You’ve illustrated what it takes to do this well. As I said, you’re the man.”

I think Cairo would be the first to agree that there are many shortcomings to his rendering (e.g., colors, the guy on right looks like he’s holding a boomerang and not reading a book, etc.) but remember, Cairo put this together in a few minutes simply to show that it is in fact possible to create something that is beautiful and emotionally engaging without sacrificing one pixel of analytic integrity.

 

Sep 212015
 

Overview

I’ve conducted a lot of Tableau training classes and have found three things that confuse students simply because of the nomenclature Tableau uses for these things.  These three terms are

  • Headers
  • Table Calculations
  • Quick Filters

Headers

Consider the chart below that has both mark labels and an axis along the bottom.

Figure 1 -- Bar chart with visible axis.

Figure 1 — Bar chart with visible axis.

Because each bar has a label we don’t need to see the axis.  We can hide the axis by right-clicking it and selecting…

Figure 2 -- Turning off the header turns off the... footer.

Figure 2 — Turning off the header turns off the… footer.

… Show Header.

Yes, indicating that we don’t want to display a header will make Tableau hide…

the footer!

As I explain to students, in Tableau anything that surrounds a chart is called a Header.  If it’s along the top of a chart, it’s a Header.  Left side of the chart?  Header?  Bottom?  Header.  Right side?

Header.

Table Calculations

I know the first time I saw this I thought “Table Calculations” pertained to a visualization that used text tables. As I explain to students, I think of table calculations as Tableau having the ability to do math in its head.

Consider the example below where we show the raw vote count for each candidate from the 2012 US presidential election.

Bar chart based on query to the back-end database

Figure 3 — Bar chart based on query to the source database

Here, Tableau has queried the underlying database and is displaying the results based on that query.

With a table calculation, Tableau looks at the results that are already on display, as it were, and then does some additional internal calculations.  In the case of asking Tableau to show the percent of total, Tableau adds up the total for all three candidates and then divides the tally for each candidate by that total.

As I said, I find it helpful to think of Tableau Calculations as Tableau doing math in its head.

Quick Filters

To filter results in Tableau, you drag dimensions and measures from the Data window to the Filters card and then apply the settings you want for the various filters.

If you want easier access to the filter settings you can right-click a filter and select Show Quick Filter.

The problem with this term is that people new to Tableau think this pertains to speeding up the filter when it in fact means that you just want the filter control to be visible on a worksheet or a dashboard.  It has nothing to do with making filters quick.  In fact, having lots of quick filters on a worksheet can slow Tableau down because Tableau has to calculate what selections should appear in each of the quick filters.

The only rationale I can see for the name is that it allows you to access the settings quickly rather than having to go through the Filters dialog box.  Still, it’s quite confusing for those first learning Tableau.

Summary of confusing terms

Here’s a summary of the terms that often confuse people new to Tableau.

Term What students think it means What it actually means
Header Something at the top of a chart Anything that surrounds a chart
Table Calculation Something having to do with text tables / cross tabs The ability for Tableau to do math “in its head”
Quick Filters Some setting that makes filters work faster Make the filter control visible

What should we call these things and should Tableau rename them?

Given just how entrenched Tableau is it may be too late to change these terms, but if it’s not too late…

In the case of Show Quick Filters I would change it to Show Filter Control.

What about Table Calculations and Headers?  Got any ideas?

 

Sep 152015
 

Overview

Figure 1 – Bar charts are better than pie charts are better than donut charts.  Most of the time.

Figure 1 – Bar charts are better than pie charts are better than donut charts.  Most of the time.

As anyone who has read this blog knows I’m definitely a “bar charts are better than pie charts are better than donut charts” kind of guy, at least when you need to make an accurate comparison.

But in my classes, as I rearticulate the case against pies and donuts, I find myself wondering if there are in fact times when a pie chart might be a better choice.

Most of my data visualization work is for internal purposes so I focus on making it easy for people to make an accurate comparison.

But as my clients and I make occasional forays into public-facing visualizations I think about how to make it easy for people to make an emotional comparison.  By this I mean that I want people viewing the visualization to just “get it”.

Better yet, I want people to get it, be engaged by it, and in some cases, “feel” it.

With this in mind, in this post we’ll explore cases where

  • a pie chart is in fact as good, if not better, than a bar chart.
  • circles and spheres do a better job conveying magnitude than do bars.
  • a waffle chart produces an emotional wallop without compromising analytic integrity.

Where a pie chart trumps a bar chart

So, it’s the year 2034 and in this somewhat dystopian future there’s a movement afoot to add an amendment to the US constitution banning the use of pie charts.

Those of you familiar with the United States Constitution know that three-quarters of the states need to approve an amendment for said amendment to become law.  In 2034 it turns out the 39 of 50 states will in fact ratify the amendment.

Does that get us the needed 75%?  Here’s a simple, compact chart that lets us know immediately.

Figure 2 -- The amendment banning pie charts passes as I can see that the "Yes" votes fill more than three quarters of the circle.

Figure 2 — The amendment banning pie charts passes as I can see that the “Yes” votes fill more than three quarters of the circle.

It’s so easy to see that the “Yes” votes fill more than three-quarters of the pie that I don’t need labels indicating the large slice is 78% and small slice is 22%.

Compare this with a bar chart.

Figure 3 -- Did the "Yes" exceed 75%?  Without labels it's very hard to tell.

Figure 3 — Did the “Yes” exceed 75%?  Without labels it’s very hard to tell.

Without labels showing the percentages I cannot tell for sure if the “Yes” bar is more than three times larger than the “No” bar.

Okay, Okay, Okay!  I know that a simplified bullet chart would work, too.

Figure 4 -- A bullet chart shows that we've exceeded the goal.

Figure 4 — A bullet chart shows that we’ve exceeded the goal.

Yes, the bullet chart makes it clear that I’ve exceeded my goal but I need to know that the goal was 75%.  I don’t need the goal line with the pie chart.

So, does this mean that it’s okay to use pie charts instead of bar charts?

No.  Based on this example it’s only okay to use a pie chart (singular).  In addition, your pie chart (singular) needs to meet the following conditions:

  • One of the slices has to make up at least 50% of the pie.
  • If you’re pie has more than two slices you don’t ask people to compare the smaller slices.

Where circles and sphere’s do better than bars

As we all know Jupiter is big, really big.

Just how much bigger is it than Earth?

Should I create a bar chart to show this? If I were to create one should I compare the radius or the surface area of each planet?

Or should I really go nuts and compare the volume of the planets?

I don’t think the dashboard shown above is nearly as effective as the visualization shown below.

Figure 5  -- "Size planets comparison" by Lsmpascal - Own work. Licensed under CC BY-SA 3.0 via Commons - https://commons.wikimedia.org/wiki/File:Size_planets_comparison.jpg#/media/File:Size_planets_comparison.jpg

Figure 5  — “Size planets comparison” by Lsmpascal – Own work. Licensed under CC BY-SA 3.0 via Commons – https://commons.wikimedia.org/wiki/File:Size_planets_comparison.jpg#/media/File:Size_planets_comparison.jpg

Jupiter and Saturn – and even Neptune and Uranus – really dwarf earth and the other planets and with this visualization I feel it.

Even the simple chart comparing the area of the cross section of the planets gives me a better feel for the data than does the bar chart.

Figure 6 -- Circles comparing cross-section area of the planets.  Yup, I can tell that Jupiter is way bigger than Earth.

Figure 6 — Circles comparing cross-section area of the planets.  Yup, I can tell that Jupiter is way bigger than Earth.

Is it essential that I can tell exactly how much larger one planet is than another?  I don’t think it is and I much prefer the emotional pull of the circles and the spheres.

A Fun Tangent

One thing that’s very hard to express in a static chart is how much space there is between the sun and the planets.  To get a sense of just how incredibly vast the distances are check out this fascinating, albeit somewhat tedious, interactive visualization from Josh Worth.

Getting an emotional wallop with waffles

A few weeks ago Cole Nussbaumer posted a tweet asking people what they thought of this chart from The Economist:

Figure 7 – A waffle chart from the article "Teens in Syria".  See http://www.economist.com/blogs/graphicdetail/2015/08/daily-chart-6?fsrc=rss.

Figure 7 – A waffle chart from the article “Teens in Syria”.  See http://www.economist.com/blogs/graphicdetail/2015/08/daily-chart-6?fsrc=rss.

The first thing that surprises me about this is that The Economist went with a waffle chart and not a bar chart, like the one below.

Figure 8 -- The type of chart I would have expected to see in The Economist.

Figure 8 — The type of chart I would have expected to see in The Economist.

The second thing that surprised me was that I preferred the waffle chart.  Yes, as Jeffrey Shaffer correctly points out, the dots are so tightly packed that you literally see stars between the circles, but  this can easily be remedied.  The question on my mind is why do I prefer waffles?

My answer is that the having each dot represent one of the 120 people surveyed connected with me in a way that the bar chart did not. Combined with the percentage labels (which are critical to the success of the visualization) the waffle chart hit me hard and it did so without dumbing down the importance of the discussion one bit.

So, are bars charts always boring?

No!  In my next blog post I’ll show you an example of a bar chart embedded inside a “come hither” graphic that

  • attracts and engages
  • does not trivialize an important issue
  • represents the data clearly and accurately

Stay tuned.

Sep 012015
 

Overview

I’ll admit that I have a problem with treemaps in Tableau, but it’s not because the chart type is in some way inferior. My problem is with how people use – and misuse – treemaps.

Here’s a good example of misuse.  Instead of displaying something straightforward that looks like this…

Figure 1 -- The humble, but accurate bar chart

Figure 1 — The humble, but accurate bar chart

… some people feel compelled to add “visual variety” to their dashboards and instead create something that looks like this.

Figure 2 -- Look , Ma! I made a Mondrian!

Figure 2 — Look , Ma! I made a Mondrian!

Except for the “it looks cool” factor there’s no good reason to use a treemap in this situation.

So, when should you use a treemap?

What’s in a treemap and why it can be useful

With a treemap you have two attributes at your disposal:

  1. The size (area) of rectangles, and
  2. The color of the rectangles

A treemap consists of packed rectangles where the area of a rectangle corresponds to the size of a particular measure.  In the example above the size of the rectangle is based on the number of people that come from a particular region.  North America has the largest value so it’s represented with the largest rectangle. Europe has a smaller value to its rectangle is proportionally smaller.

Treemaps really come in handy is when you have A LOT of marks to plot and you need to show all of the marks in a compact area.

So, this sounds like a great chart – we’ve got rectangles to show how big and small stuff is, color to group related rectangles intelligently, and we can fit a lot of stuff in small space.  Why not use this chart all the time?

The downside is that we are comparing the area of rectangles and with rectangles it is difficult to make an accurate comparison. People may be very good at comparing the length of bars but as a species we are not particularly good at comparing the area of rectangles (and we’re downright awful at comparing the area of circles.)

So, given the advantages and shortcomings, just when should you use it?  Let’s look at a particular scenario.

Showing Presidential Electoral Results

A Filled Map

Consider the electoral map below showing electoral votes by state for Barack Obama and Mitt Romney in 2012.

Electoral Map Filled

Figure 3 — Filled map showing electoral votes for the 2012 presidential election (displaying 48 out of 50 states)

Our Electoral College system is fairly confusing and I can only imagine how somebody from outside the US would look at this as there appears to be more red on the map than blue… but the blue guy won!

This discrepancy becomes even more pronounced when we include Alaska and Hawaii in the map.

Figure 4 -- Filled map showing electoral vote winners for the 2012 presidential election (displaying 50 states)

Figure 4 — Filled map showing electoral vote winners for the 2012 presidential election (displaying 50 states)

Clearly, a map designed to show how much area there is in a state fails with Electoral College results where the numbers are based on population not land mass.  In the example above there’s A LOT more red then blue, but again, the blue guy won the election.

Perhaps a different type of chart will do a better job?

Symbol Map

Here’s a symbol map of the same data.

Figure 5 -- Symbol map showing electoral vote winners for the 2012 presidential election (displaying 48 out of 50 states)

Figure 5 — Symbol map showing electoral vote winners for the 2012 presidential election (displaying 48 out of 50 states)

I think this is more accurate as there’s clearly more blue than red, but it’s still a tough read.  What else might work?

Cartogram

Here’s a cartogram from Professor Mark Newman of the University of Michigan showing the same data, except the polygons for each state has been adjusted to reflect the population of the state.

Figure 6 -- Cartogram showing election results where the shape of the state is based on its population and not land mass.

Figure 6 — Cartogram showing election results where the shape of the state is based on its population and not land mass.

While it’s very clear that there is more blue than red on this map there are two problems with this approach:

  1. There aren’t many tools that will support this type of distortion; and,
  2. This map will frighten small children.

Summary Bar Chart

Why not just display a simple bar chart showing the total number of electoral votes, like the one shown here?

Figure 7 -- Electoral vote count by candidate

Figure 7 — Electoral vote count by candidate

This is certainly very clear and we can see easily by how much Obama won, but we’re missing an important part of the story.

In US presidential elections a winner is chosen by tallying the electoral votes from each state and the summary bar chart doesn’t show us how each state contributes to the total for each candidate.

And the Winner is… ? The Treemap!

Here’s a treemap showing the exact same data.

Figure 8 -- Treemap showing 2012 electoral vote results

Figure 8 — Treemap showing 2012 electoral vote results

Of all the single visualizations I think this treemap tells the most complete story.  We can see just how much states like California, Texas, Florida, and New York contribute to the total as well as gauge —  to some degree  — just how many more electoral votes Obama received than did Romney.

One shortcoming, however, is that we can’t see the names of all the states as some of the rectangles are too small.

One way to address this is by adding a tool tip, as shown here.

Figure 9 -- Hovering over a mark allows me to see the name of the state and number of electoral votes.

Figure 9 — Hovering over a mark allows me to see the name of the state and number of electoral votes.

While this works, a problem we should address is that the small states are not easily searchable.  That is, if I want to know the results for Alaska, Hawaii, Delaware, etc., I have to go hunting for them.

At this point we’ve gotten about as far as we can get with a single chart.  To tell the complete story – and to make it easy for people to find results for a particular state – we should create a dashboard.

The Electoral Vote Dashboard

Here’s a dashboard that puts two of the views together and that allows the user to find a particular state’s rectangle by selecting the state from a list.

Figure 10 -- Electoral votes dashboard.  Selecting a state from the list will display that state’s rectangle in the treemap.

Figure 10 — Electoral votes dashboard.  Selecting a state from the list will display that state’s rectangle in the treemap.

While the “star” of the dashboard is the treemap, the summary bar chart and the selectable list make the story complete and we get a solid understanding of the 2012 Electoral College results.

And we achieved this without using an actual map.

Click here to interact with dashboard.