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.

 

Mar 172016
 

Overview

I’m a big fan of Andy Kriebel’s and Andy Cotgreave’s Makeover Monday challenge. For those of you not familiar with this, each week Kriebel and Cotgreave find an existing visualization / data set and ask the data visualization community to come up with alternative ways to present the same data.

As Cotgreave points out in one of his blog posts “It’s about using a tool to debate data. It’s about improving people’s data literacy.”

With one major exception that I’ll discuss in a moment the challenge is meeting its goals as each week several dozen people participate and the submissions and accompanying discussions have been enormously valuable.

But there was one week where the community failed.

Worse than that, the community did some damage that will be difficult to repair.

Bad Data Make Bad Vizzes Make Bogus Conclusions

Week four of the Makeover Monday challenge used survey data from GOBankingRates that posed the question “how much money do you have saved in your savings account?” Here are some of the baseless conclusions from people that participated in the makeover:

Figure 1

Figure 1 — From the source article that spawned the makeover.  Yes, the exploding donut needs a makeover, but it’s the headline “Survey finds that two-thirds of Americans don’t have enough money saved” that presents the bigger problem.

  • Americans Don’t Have Enough Money Saved (See link).
  • 71% of Americans Have Less than $1,000 in Savings. Yikes! (See link).
  • Americans Just Aren’t Saving Money (See link).
  • Most Americans Have Miniscule Savings (See link).
  • 80% of Americans Have Less than $5,000 in Savings! (See link).
  • Americans Are Not Saving Enough Money! (See link).
  • Americans Have Too Little Savings (See link).

So, what’s the problem?

It turns out the key finding from the original publication is not true — and thanks to the makeovers that spurious finding has been amplified dozens of times.

How did this happen?

Let’s dig into the data a little bit.

Is There a Relationship Between Age and Savings?

As I mentioned before I think the Monday Makeover Challenge is great and I’ve participated in a couple of them. I started to work on this one and took a stab at showing the relationship between age and savings, as shown here.

Figure 2 -- Divergent stacked bar chart showing the percentage of people that have different savings amount, sorted by age

Figure 2 — Divergent stacked bar chart showing the percentage of people that have different savings amounts, sorted by age

This looked odd to me as I expected to see a correlation between age and savings; that is, I expected to see a lot more blue among Seniors and Baby Boomers.

I decided to make the demarcations less granular and just compare people with minimal savings and those with $1,000 or more in savings, as shown here.

Figure 3 — Less granular divergent stacked bar chart

This result seemed way off, so either my supposition is wildly incorrect (i.e., as people get older they save more) or there was something wrong with the data.

Note: I try to remind people that Tableau isn’t just for reporting interesting findings. It’s a remarkably useful tool for finding flaws in the data.

It turns out that while there is indeed something wrong with the data, there was a much bigger problem:

Most people didn’t bother to look at the actual question the survey asked.

What the Survey Asked

The survey asked “How much money do you have saved in your savings account?”  It did not ask “How much money do you have saved?

The difference is titanic as the average American savings account yields but .06 percent interest!  That’s infinitesimal — you might as well stick your money in a mattress!

Indeed, I am of the Baby Boomer generation and I have but $20 in my savings account — but (thankfully) more in my savings.

So, the vast majority of people that participated in the makeover didn’t bother to look at the actual question and came to — and published — a bogus conclusion.

Were there any other problems with the survey?

You betcha.

What’s Wrong with the Survey?

A visualization is only as good as its underlying data and the data in question has nothing to do with the savings habits of Americans; it only has to do with having a savings account.

But there are other shortcomings with the survey that should make us question whether the data is even useful for analyzing how much money Americans have sitting in a savings account.

Consider this excellent review of the same Makeover Monday challenge from Christophe Cariou.  He points out the following shortcomings with the survey itself:

  • In the article, we read: ‘The responses are representative of the U.S. internet population’. It is therefore not representative of the US population. See this report by Pew Research Center for age and online access.
  • We also read ‘Demographic information was not available for all respondents, and analysis of responses by demographics is based solely on responses for which the targeted demographic information was available.’ Normally, if it was demographically representative, this would be clarified. This comment adds a doubt.
  • The average savings amount in the article is the sum of the averages of the groups divided by 6. It is not weighted by the size of each group.

Note: Kudos to Bridget Cogley who also saw the problems with the conclusions when the makeovers first appeared in late January 2016.

Further note: In a subsequent makeover challenge blog post Cotgreave alerted participants to questionable data.

So, Where Exactly is the Harm?

So, dozens of people have created visualizations based on bad data and came up with bogus conclusions. Given the number of articles from allegedly reliable sources reporting shortcomings in savings, what’s the harm of sounding an alarm bell?

I suppose if you are an “ends justify the means” type of person then it’s fine to publish bogus findings as long as they change behavior in a positive way.

But I know many of the people in this community and they would be aghast at using data visualization this way.

I also fear that with collective missteps like this people will question the ability of makeover participants to relay accurate information.

So What Should We Do?

Andy Cotgreave and Andy Kriebel have earned their leadership positions in the data visualization community, so I hope they will make note of this makeover mishap and encourage people that published the bogus result to modify their headlines.

I also strongly encourage anyone working in data visualization to understand the data — warts and all — before rushing to publish. Andy Kriebel is providing the data set and we shouldn’t ask him to find all the flaws in it.  Indeed, that’s part of our job.

Finally, I ask others in the community to be more diligent: only publish work that has been carefully vetted and do not tolerate unsubstantiated work from others.

While it’s true that nothing terrible will happen if more Americans open savings accounts, there may be other situations where publishing spurious conclusions will do some serious damage.

Dec 092015
 

Overview

In an October 2015 meeting of the Tableau Zen Masters each Zen Master was asked to name his / her favorite thing about Tableau.  Most people started by saying “well, besides the community, my favorite thing is…”

At the time I said “undo”.  Don’t laugh.  Let’s not take it for granted that with Tableau we can try things, fail, and go back to where we were before we failed… gracefully.

After the meeting I thought more about this question and how there are unheralded aspects of the tool and the ecosystem that I count on but that don’t get the attention they deserve.  I realized that there is one thing in particular that I use almost every day and without it I, and scores of others, would be at a major loss.

Tableau Public.

What is Tableau Public

Tableau Public consists of a free downloadable version of Tableau desktop to explore and visualize data, and a free cloud platform to host, share and embed interactive visualizations.

While I use my regular copy of Tableau desktop to explore data and fashion visualizations, it’s the free hosted version of Tableau Server (the cloud platform) that allows me to do so much and to learn so much.

Sharing

My website consists mostly of examples and blog posts and most of those posts contain Tableau dashboards that are embedded right inside the post.  I don’t have to ask people to download a reader and then download my dashboards.  The dashboards are right there.

Learning

But it gets better. Anyone with a copy of Tableau who is curious about how the viz works can just download the workbook, open it up, and see how it’s put together.

For example, a couple of years ago I wanted to see if anyone had recreated Hans Rosling’s famous Gap Minder demo in Tableau.  A quick Google search lead me to this example from Jeffrey Shaffer.

Figure 1 -- Jeffrey Shaffer recreates Rosling's Gap Minder.  See http://public.tableau.com/profile/jeffs8297#!/vizhome/shared/FQWYZ95DJ

Figure 1 — Jeffrey Shaffer recreates Rosling’s Gap Minder.  Click here.

I was curious to see how Jeff had gotten the year to display as big block letters in the middle of the viz, so I downloaded the workbook and “looked under the hood.”

Over the years I’ve downloaded hundreds of workbooks and have analyzed the individual brush strokes of Kelly Martin, Andy Cotgreave, Ben Jones, Anya A’Hearn, and dozens of others.  That I can do this so easily  is nothing short of amazing.  I don’t just get to interact with cool vizzes; I can download them and see how they work.

Adding to the conversation

Because the vast majority of Tableau Public authors do make their work downloadable, you’ll see people modify and repost the work they’ve downloaded. Andy Cotgreave wrote about this in late 2014 where one way of visualizing something begat other ways of visualizing the same data.  Here’s a particularly beautiful example from Michal Mixon.

Figure 2 -- A stunning dashboard from Michael Mixon that you can download from here.

Figure 2 — A stunning dashboard from Michael Mixon that you can download from here.

It Isn’t Perfect

Before you accuse me of writing a hagiography, there are several shortcomings with Tableau Public.

Row limit

You can only have 100,000 rowsNo, now you can only have 1,000,000 rows.  Okay, as of May of 2015 you can have 10 million rows of data.  Not really a shortcoming.

Locking down your data

Your workbooks and the underlying data can be downloaded and examined.  As of May of 2015 you can “lock down” your workbooks and your data.  This is huge as it allows public-serving organizations with proprietary data to publish interactive workbooks without fear that somebody will download and examine the underlying data.

That said…

Unless you indeed have proprietary data please, please, please don’t stop your workbooks from being downloaded.

Figure 3 -- This setting is on by default.  Please don’t turn it off unless you have a good reason (e.g., the underlying data is proprietary).

Figure 3 — This setting is on by default.  Please don’t turn it off unless you have a good reason (e.g., the underlying data is proprietary).

Tableau and the community that supports it are giving you this amazing free platform for you to showcase your work.  Please allow others to benefit by making your work downloadable.

Just because something is anointed a Tableau Public “Viz of the Day” does not mean it is a good viz

Many Viz of the Day selections are examples you should emulate, but I’ve seen some really bad vizzes that made the cut because the subject matter was “discussion-worthy”.  The problem is that those who are new to data visualization won’t know that these vizzes aren’t worth emulating.  They’ll just think “hmm, that viz with the word cloud and donut charts was a ‘viz of the day.’  I guess it’s a good thing to make vizzes with word clouds and donut charts.”

As Tableau comes out with new versions they tinker and break things

I understand that Tableau Public is an evolving platform and that Tableau wants to improve that platform by adding new features. The problem is that I’ve had many dashboards that suddenly stops working. Tableau has been great at responding to notices that things are broken, but sometimes it can take hours, if not days, to fix. So…

Favor: Please add my website to your test suite. In other works, do not implement any new features until you’re sure everything on my site works perfectly.

Okay, okay, okay… but it doesn’t hurt to ask.

Things I cannot do without

Here’s a summary of the things I cannot do without in my practice.

I would not be able to do what I do without Tableau Desktop.

I would not be able to do what I do without the community that supports Tableau.

And I would not be able to do what I do without Tableau Public.

My sincere thanks to the Tableau Public team.

 Posted by on December 9, 2015 1) General Discussions, Blog Tagged with:  4 Responses »
Nov 222015
 

Overview

I received an e-mail inquiry about weighted data recently and realized that while I cover this in my survey data class I had not yet posted anything about it here.  Time to remedy that.

The good news is that it is not at all difficult to work with weighted survey data in Tableau.  And just what do I mean by weighted data? We use weighting to adjust the results of a study so that the results better reflect what is known about the population. For example, if the subscribers to your magazine are 60% female but the people that take your survey are only 45% female you should weigh the responses from females more heavily than males.

To do this each survey respondent should have a weighting amount associated with their respondent ID, as shown here.

Figure 1 – A snippet of survey data showing a separate column for Weight.

Figure 1 – A snippet of survey data showing a separate column for Weight.

When pivoting / reshaping the data make sure that [Weight] does not get reshaped.  It should remain in its own column like the other demographic data.

Once this is in place we’ll need to modify the formulas for the following questions types:

  • Yes / No / Maybe (single punch)
  • Check-all-that-apply (multi-punch)
  • Sentiment / Likert Scale (simple stacked bar)
  • Sentiment / Likert Scale (divergent stacked bar)

Yes / No / Maybe (single punch)

With this type of question you usually want to determine the percentage of the total.

02_YesNoMaybe

Figure 2 — Visualization of a single-punch question

Unweighted calculation

The table calculation to determine the percentage of total using unweighted data is

   SUM([Number of Records]) / TOTAL(SUM([Number of Records]))

Weighted calculation

The table calculation to determine the percentage of total using weighted data is

   SUM([Weight]) / TOTAL(SUM([Weight]))

Check-all-that-apply (multi punch)

With this type of question you usually want to determine the percentage of people that selected an item.  The total will almost always add up to more than 100% as you are allowing people to select multiple items.

Figure 3 -- Visualization of a multi-punch question

Figure 3 — Visualization of a multi-punch question

Most surveys will code the items that are checked with a “1” and those that are not checked with a “0”.

Unweighted calculation

The calculation to determine the percentage of people selecting an item using unweighted data is

   SUM([Value]) / SUM([Number of Records])

where [Value] is the name of the measure that contains the survey responses.  If the survey responses are coded as labels instead of numbers you can use this formula instead.

   SUM(IF [Label]="Yes" then 1 ELSE 0 END) / SUM([Number of Records])

Weighted calculation

The calculation to determine the percentage of people selecting an item using weighted data is

   SUM(IF [Value]=1 then [Weight] ELSE 0 END) / SUM([Weight])

Sentiment / Likert Scale (simple stacked bar)

This is very similar to the single-punch question but instead we have several questions and compare them using a stacked bar chart.  I am not a big fan of this approach but it can be useful when you superimpose some type of score (e.g., average Likert value, percent top 2 boxes, etc.).

Figure 4 -- Simple Likert Scale visualization

Figure 4 — Simple Likert Scale visualization

Figure 5 -- Simple Likert Scale visualization with Percent Top 2 Boxes combo chart

Figure 5 — Simple Likert Scale visualization with Percent Top 2 Boxes combo chart

Unweighted calculation – Stacked Bar

The table calculation to determine the percentage of total using unweighted data is

   SUM([Number of Records]) / TOTAL(SUM([Number of Records]))

Weighted calculation – Stacked Bar

The table calculation to determine the percentage of total using weighted data is

   SUM([Weight]) / TOTAL(SUM([Weight]))

Unweighted calculation – Percent Top 2 Boxes

Assuming a 1 through 5 Likert scale, the calculation to determine the percentage of people selecting either Very high degree or High Degree (top 2 boxes) using unweighted data is

   SUM(IF [Value]>=4 then 1 ELSE 0) / SUM([Number of Records])

Weighted calculation – Percent Top 2 Boxes

Assuming a 1 through 5 Likert scale, The calculation to determine the percentage of people selecting either Very high degree or High Degree (top 2 boxes) using weighted data is

   SUM(IF [Value]>=4 then [Weight] ELSE 0) / SUM([Weight])

Sentiment / Likert Scale (divergent stacked bar)

Here is what I believe is a preferable way to show how sentiment skews across different questions.

Figure 6 -- A divergent stacked bar chart

Figure 6 — A divergent stacked bar chart

I’ve covered how to build this type of chart using unweighted values here.

There are six fields we need to fashion the visualization, three of which need to be modified to make the visualization work with weighted data.

  • Count Negative
  • Gantt Percent
  • Gantt Start
  • Percentage
  • Total Count
  • Total Count Negative

Count Negative – Unweighted

Assuming a 1 – 5 Likert scale, the calculation to determine the number of negative sentiment responses using unweighted data is

   IF [Score]<3 THEN 1
   ELSEIF [Score]=3 THEN .5
   ELSE 0 END

Count Negative – Weighted

Assuming a 1 – 5 Likert scale, the calculation to determine the number of negative sentiment responses using weighted data is

   IF [Score]<3 THEN [Weight]
   ELSEIF [Score]=3 THEN .5 * [Weight]
   ELSE 0 END

Percentage – Unweighted

The calculation that determines both the size of the Gantt bar and the label for the bar using unweighted data is

   SUM([Number of Records])/[Total Count]

Percentage – Weighted

The calculation that determines both the size of the Gantt bar and the label for the bar using weighted data is

   SUM([Weight])/[Total Count]

Total Count – Unweighted

The calculation that determines the total number of responses for a particular question for unweighted data is

   TOTAL(SUM([Number of Records]))

Total Count – Weighted

The calculation that determines the total number of responses for a particular question for weighted data is

   TOTAL(SUM([Weight]))

Summary

Here’s a summary of all the unweighted calculations and their weighted equivalents

Unweighted Weighted
SUM([Number of Records]) / TOTAL(SUM([Number of Records])) SUM([Weight]) / TOTAL(SUM([Weight]))
SUM([Value]) / SUM([Number of Records]) SUM(IF [Value]=1 then [Weight] ELSE 0 END) / SUM([Weight])
SUM(IF [Value]>=4 then 1 ELSE 0) / SUM([Number of Records]) SUM(IF [Value]>=4 then [Weight] ELSE 0) / SUM([Weight])
IF [Score]<3 THEN 1 ELSEIF [Score]=3 THEN .5 ELSE 0 END IF [Score]<3 THEN [Weight] ELSEIF [Score]=3 THEN .5 * [Weight] ELSE 0 END
SUM([Number of Records])/[Total Count] SUM([Weight])/[Total Count]
TOTAL(SUM([Number of Records])) TOTAL(SUM([Weight]))

 

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.