Jun 172013
 

Overview

Today I’m going to write about four viz types that have solved a lot of problems for me but that I don’t see out in the wild very often.  I really like each of these approaches as they are analytically sharp and pack an emotional wallop.

Note: a collection of dashboards illustrating each of these types may be found at the end of this post.

 

1) Highlight Table

This one always resonates well with students in my Tableau classes.  Consider this Superstore sales cross-tab that shows profit broken down by sub-category and region.  Can you easily discern which combination of sub-category and region are performing well and which are performing poorly?

A visually impoverished spreadsheet

Now let’s see what happens if we take the same data but present it in a highlight table.

With a highlight table the high and low performers really stand out

With this you can tell “from the back of the room” that Office Machines in the South are doing great and that Tables in the East or doing poorly.  Indeed, Tables are doing poorly across all four regions.

In addition to its clarity I like this approach because it’s so easy to create in Tableau and that is serves as a type of “gateway” visualization for people that are shackled to spreadsheets.  That is, people can still have their raw numbers, but they can really see what’s working and what isn’t.

 

Why Not Use a Heat Map?

I’m the first to recognize that the highlight table just shows one measure (in this case, profit) across multiple dimensions.  A heat map would allow us use size for sales magnitude and color for profitability.

This heat map shows magnitude of sales and degree of profit

Which chart type you use depends on what you want to relate but I think the heat map dilutes the message that is so viscerally clear with the highlight table.

 

2) Jitterplot (aka, “Strip Plot”)

I only recently discovered  and blogged about the the joys of this viz type, and I’m still over the moon with just how many problems this approach solves for me (and I suspect for others).

Consider this profit distribution plot where we place Order ID on the level of detail.

With this distribution plot it’s difficult to see the concentration of overlapping marks

One can surmise from the standard deviation bars that most of the marks cluster in the center, but this visualization really doesn’t “sing”.  Contrast this with the visualization below where we leverage the x-axis and “jitter” the marks left and right of center.

By “jittering” the marks we can really see where the bulk of profits are concentrated

 

3) Bar-in-Bar

I first came across this viz type six years ago when I was using Tableau 2.0.  I was trying to compare two measures against each other and was miffed that I could not control the spacing between the major category groupings; i.e., the clustering between 2012 and 2011 within one category is the same as the spacing between bars across categories, as shown below.

Tableau’s lack of clustering control makes it hard to compare bars pairs

This makes for a tough read.  I complained to Tableau’s “Yoda”, Marc Reuter, and he suggested I create a bar-in-bar chart, like the one shown here.

The Bar-in-Bar chart makes it easy to compare value pairs

The chart is clear, easy-to-read, and it takes up a little less screen real estate.    We do, however, need to display a legend.

 

4) Divergent (or Staggered) Stacked Bar Chart

I’ve written about this viz type quite a bit (see this post and that post) and while this was initially conceived as something that would elegantly handle Likert scale survey questions it is proving to be a great way to see how sentiment / performance skew positive or negative across multiple dimensions.

Going back to our Superstore Sales data, suppose we wanted to see the percentage of orders that took a certain number of days to ship (0 days, 1 day, 2 days … up to 5 or more days).  A traditional stacked bar chart is easy to create, but very difficult to grok.

A collection of 100-percent stacked bar charts is very difficult to read

Compare the chart above with a divergent stacked bar chart where 0 to 2 days is considered good and 3 or more days is considered poor, and where the goal is to have 80% of orders shipped in two or fewer days.

A divergent stacked-bar chart showing all values

I’ve also included an option to just show good / bad in a more binary form.

A divergent stacked bar chart showing just good vs. bad values

I’ve long suspected that survey folks who ask to just see the percentage of respondents that chose the “top two boxes” request this because nobody had presented them with a divergent stacked bar approach.  With this type of chart you can see both the big picture and the details.

Jun 122013
 

Note: This post is dated but contains useful information. I’ve discovered some better ways to handle this but haven’t blogged about it yet. Feel free to nag me and I’ll either write the post or conduct a screen-sharing session.

Overview

Note: If you have not already done so, please review Part 1, Part 2, and Part 2 ½ of this series.  You can also download the source data from here.  The completed interactive dashboards can be found at the bottom of this post.

I continue to get questions about how to handle survey-related issues in Tableau.  The latest inquiry comes from Tony in the UK where Tony asks how to address respondents that are members of multiple organizations / categories.  Here’s an example of the type of “demographic” question that Tony has in mind:

In what countries does your organization maintain operations (check all that apply):

[ ] USA

[  ] Canada

[  ] Japan

[  ] Liechtenstein

etc.

Our goal is to have a dashboard that either looks like this:

Dashboard using action filters

or like this:

Dashboard using quick filters

Here’s how the country data might be encoded by the survey tool where 1 indicates yes and 0 indicates no.

First Approach — One Table

Depending on your willingness to use visual filters (actions) you can treat these Country fields like all other “Question” fields and reshape the data so that it looks like this:

You can now create a visualization that looks like this one:

There are a number of funky things going on here to make this work properly.  Let’s first look at what is on the filter shelf where we are filtering by Question and Value.

The Question filter is set to show just the so-called “Country” questions, as shown here.

Note that UK and USA are at the bottom of the list.  Also note that for the main visualization in the dashboard (the one that shows “Will you vote in the next selection”) the Question filter is set differently.

We also need to set the Response values to 1 so that we get a proper tally for each country as the survey was set up so that 1 = yes and 0 = no.

Level of Detail

You’ll notice that we have ID on the level of detail.  This is because for the main visualization (the one where we ask the question “Will You Vote In The Next Election”) the Question filter is set differently.  We need this level of detail for our action filter so that we can pass the IDs of folks that are in a particular country to the other visualizations on our dashboard.  Note that normally when you add this level of detail you would see a separate bar for every ID.  We get around this by turning Stack Marks off from the Analysis menu.

We also need to use a table calculation (we’ll call itCheckAll_Count) to sum up all the responses across ID:

TOTAL(SUM(Response))

Does This Work?

If you select the country name (so that all marks are selected) the visual filtering will work fine.

If, however, you select the bar itself you run into problems as you end up passing only one ID the other visualizations.

So, is it okay to go into production with this?  That is the reader’s call, but I can pretty much guarantee that if you show this your CEO he / she will click the bar and not the label, so…

 

Second Approach — Two Tables

The advantage of the next approach where we join two tables is that you won’t run into the possible user experience issues cited above and you will be able to use quick filters.  The only downside is that we end up with many more rows of data (but Tableau can handle it like a champ…Tableau Public, on the other hand, balked at allowing me to upload a workbook with more than 100K rows).

In this example I’ve created a second table that just contains the “Country” questions, reshaped.

We then craft the following join in Tableau.

Note that we could also have joined the main table (Reshaped) to itself to achieve similar results.

We now have Country data reshaped and separate from Question data, and we can filter by Country.

We can also craft a visualization using action filters without fear that somebody will select a bar rather than the entire category.

Summary and What’s Next

We now have a way to handle “OR” logic pretty easily and can handle queries like “show responses from people with operations in China, or Japan, or France”.

But what about “AND” logic where we only want to see responses from people with operations in China AND Japan AND France?

If there’s enough interest I’ll write another post.

 Posted by on June 12, 2013 2) Visualizing Survey Data, Blog 21 Responses »