Quick tip: label ALL and HIGHLIGHTED marks in Tableau

ALL and HIGHLIGHT labels on one view. Scroll down for interactive view.
ALL and HIGHLIGHT labels on one view. Scroll down for interactive view.

A light bulb moment this morning. When you label marks in Tableau you can choose ALL or HIGHLIGHTED.  Sometimes you want to label the marks by default and highlight the labels when making some selection on another part of a dashboard. But you can’t by default – the “Marks to Label” option only allows one choice:

Label properties in Tableau
Label properties in Tableau

Can you work around this?

Yes – you can, with a dual axis chart. Duplicate the Measure on the Rows shelf and make it Dual Axis, with synchronised axes. In my example, I duplicated Profit:

Duplicate the mark on the Rows shelf
Duplicate the mark on the Rows shelf

Then I set one label to be All and the other to Highlighted:

two labels

Now you can build a dashboard which shows all Labels and has a highlight lable when you interact with other views in the dashboard.

Check out the interactive dashboard below to see it in action:

Future Media Forum, Moscow, November 2014

US Road Fatalities

US Road Fatalities (click to see interactive version)

I spoke at the Future Media Forum in Moscow this week. I was speaking about the key role data visualisation is playing in the media. I also showed Tableau Public to the audience.  This post contains the resources I used.

To follow me and keep up with updates, you can find me on Twitter: @acotgreave.

Here are the slides I used:

The images below are the dashboards I featured in the talk. Click the images to see the interactive versions.

Ebola: Illustrates trends

ebola

Hunger: Facilitates comparison

global hunger

 

French road mortality: hits close to home

french road deaths

Other links

How is medal count affected by population at the Olympics?

USA and Russia dominate the Olympic Medal tables but is that simply because they are large countries? Are there countries who get more medals per million people in their country? Yes. Check out the dashboard below:

This dashboard is being used as part of my presentation about data visualisation in the media at Future Web Forum in Moscow on 28 November where I will be speaking with John Burn Murdoch.

Click here to see a bigger version of the dashboard.

NOTE: the population figures are for 2011/2012. When you filter and search for a different Olympic year, it continues to calculate medals per millions based on the most recent data for that country.

Tableau Design Month, post 12 of 12: the big recap

Over the past month, I’ve deconstructed a dashboard I made for Tableau’s internal VizWhiz competition. Below is an attempt to quantify the Impact and Difficulty of each of the design choices I made. You can click on each one to go read the post describing the design choice:

If you’ve enjoyed these posts and want to continue reading my blog, please subscribe to my RSS feed or connect with me on Twitter (@acotgreave)

Why did I bother changing a dashboard that looked pretty fine in the first place? Why did I write 14 posts about this single dashboard?

Simple: I wanted to really think about the design choices and share the process of taking a perfectly functional dashboard and trying to make it into a thing of beauty.

The original (top) to the final result (bottom)
The original (top) to the final result (bottom)

Stepping back made me realise how many and what type of choices I make. Each choice has a highor low impact and is easy or hard. I quantified that in the viz above. As Michael Mixon pointed out in a comment, as we become experts we take this stuff for granted.

Take note: my posts are not a manifesto for all visualisations. As I’ve written elsewhere, there’s no right answer when designing visualisations.

I recommend you download the final workbook. There’s lots of extra views that didn’t make the final version. You’ll be able to see for yourself how I did everything.

Note the vertical lines
The end result

For reference, here’s the full list of posts:

Which design features should I implement
Click the image to see an interactive version

Titles, tooltips and annotations : 4 neglected design considerations

I don’t consider this an encyclopedic post. Instead, I want to cover the text-based choices in the dashboard I’ve been dissecting as part of Tableau Design Month. This is 14th of 15 posts in the series.

Titles: the unsung hero of your visualization

You are fighting for viewers’ attention with any visualization you produce. One of the few things you can guarantee they will look at and process is the main title. Therefore you better be 100% sure this is both:

  • Enticing
  • Relevant
  • Explains the chart or asks a question

Your title is your one chance to grab the reader and convince them it is worth focusing on. This is not a new lesson: Willard Brinton was talking about this 100 years ago:

A 100yr old viz with an illustration to entice the user

Subtitles are just as important. Consider the titles on each view:

Titles convey the message
Titles convey the message
  • I’ve numbered them. This helps guide the user through the view. Sure, the left-to-right nature determines the flow but numbering the titles helps.
  • I bolded the pertinent data-related facts. I’m using the title to communicate the data itself.
  • I’ve also added contextual text. Notice the “All” in the second view title. If you filter down to a single year in the highlight table (you can do this in the interactive version), “All” changes to the relevant year:
    ALL in a title To learn  how to make dynamic titles in Tableau, click here to see a post on The Information Lab’s blog.

Annotate marks to add context

No annotations: a tease not an insight
No annotations: a tease not an insight

Imagine I’d left the annotations off the charts. You can see the effect above. What are you left with? A chart with a really interesting trend that gives no clues as to what causes it. The viewer is left with their interest piqued but with no answer. This is a serious failure. Adding the annotations answers those initial questions.

My first iterations of this dashboard did not have any annotations. It was only when I got feedback from people that they pointed out the problem. That’s the importance of getting feedback!

Below is the annotated time series: it’s much more useful:

Annotations help me understand the chart
Annotations help me understand the chart

My final word on these annotations – I deliberately aligned the annotation arrows to be vertical to give them consistency

Tooltips – ALWAYS be customizing your tooltips

Tooltips explain the mark right next to the mouse, where the viewer's eyes are.
Tooltips explain the mark right next to the mouse, where the viewer’s eyes are.

Followers of this blog will not be surprised that all the tooltips are customized. If you want to know more about the importance of tooltips, and techniques to use them in Tableau, check out this series of posts. Summary: ALWAYS customise your tooltips; it is the easiest way to improve your dashboard.

Finally, don’t forget to turn off the command buttons: these are great for exploration in Tableau but a distraction for end users.

Command buttons: great for analytics. Not great for published dashboards.
Command buttons: great for analytics. Not great for published dashboards.

 Conclusion

I’ve only considered a tiny set of considerations when using text in your visualizations. What else do you consider important for text on your visualizations?

Come back tomorrow for the final post in the Tableau Design Month series – a big wrap up of everything I’ve covered.

Data visualisation and process

What was the process that lead to this?*

What is your process when doing visual design? This was asked at David McCandless’ talk this week. It’s also something I and others get asked a lot.

David McCandless starts with a question and then finds the data to answer the question. Often he ends up finding many other questions to answer along the way!

In my job, I more often start with the data and then need to find the story.

Both are valid ways to start. Sometimes the approach is decided for you.

I wanted to go through my process, based on reflections of my US Fatalities dashboard. In this case, I’m explaining a situation where I have a ready-made dataset that I have not seen before. It’s my job to find and communicate anything interesting I can find.

The dashboard is available for download if you want to dissect it and see lots of my workings and early iterations.

Get a sense of the data

How many records and for how long?

The first thing I always do is look at the number of records and what they look like over time:

fatalities over time

Why? So I can see how much data I have and what the trends are. Looks like things are trending downward and something odd happened in 2009/9. Economic crash, perhaps? Missing data?

I’ll delve into seasonality, at this stage. If you’ve been reading my Design Month posts, you’ll know that I ultimately focussed on seasonality.

What dimensions do I have?

Second step is to break out the bar charts. I look for the ones that are interesting and have good data in them. “Light Conditions” was a pretty clean Dimension:

light conditions

I need to focus on a few things at this stage:

  • Is there a lot of Unknown/Null data? If so, it’s unlikely to be of interest
  • Does the data need me to go find myself more data? Looks like most accidents happen during the day. But I would guess most driving is done during the day, so it’s risky just reporting the raw numbers
  • Am I interested in the Dimension? If I’m not, I’m unlikely to care much about exploring it further

Do dimensions and measures compare interestingly?

Next up, I’ll begin comparing dimensions. Is there a relationship between Light Conditions and Road Type and fatalities, for example? (answer: no)

show me

At this stage, I could not do without Show Me. If there’s one thing that puts Tableau above everything else, it’s this part of the process. Even by now, I’ve probably drawn 50 or so views, most of which I have looked at for less than 3 seconds. Each one gives me a sense of the data at virtually no cost of effort or time. For example, the chart below is a bit of a shocker but was a valuable part of my exploration. It existed only fleetingly.

Awful. But useful.
Awful. But useful.

As I begin to really dive into the data to find the links, the ability to cycle through views, drop dimensions in new places is just amazing. It doesn’t matter if 99% of the views I make reveal nothing or are visually awful, I’m getting a sense of the data and I will eventually find the gems that form the story.

Geography?

Stories that answer where questions are engaging so I’ll check out the quality of the geographic data. In this dataset, we had State available but it was pretty clear it reflected population.

The wonderful XKCD (http://xkcd.com/1138/)

What level of detail is there?

I need to explore the level of detail. Is the story more interesting at aggregate level of down in the detail? In this dataset I didn’t find anything I wanted to proceed with. An example where the granular detail was of great interest was my Gooaaaal! viz during the world cup.

Focussing on the story

By this stage I might have cycled through 250+ views of the data in maybe 30 minutes or so. I’ll now have  a good sense of the data and will begin to find the story.

I kept some of the charts as you can see below.

find the story

Early on I had noticed that seasonality had a great story. The only dimension I’d find that really interested me was about road type (rural/urban).

At this stage, I decided to go with seasonality.

Make a painting

From Queens University (link)

By now, I know what my data feels like and I have a sense of the story I want to tell: I wanted to focus on fatalities during the holiday seasons.

The next stage is like painting. I start again with a blank canvas and begin to add elements here and there. For a while there’s a mix of analysis, exploration, making calculations, tweaking designs, choosing fonts, colours, and changing layout. They all happen simultaneously, intuitively. These decisions are fully documented in my Design Month posts.

Finishing touches

Feedback

Finally I’ll be almost there. Now to open the door and share with others. I asked for feedback on dataviz communities, on Twitter, from my wife and kids, from colleagues. You cannot get enough feedback! You don’t need to listen to all of it, but if 80% of people tell you the same thing, you know that thing is a problem.

Walkaway and come back

It’s important to walk away from your work for a day or so (as long as you afford). This allows you to return to it with fresh eyes.

Know when to stop

Sometimes you will just know. Other times you could keep on tweaking forever. There’s often deadline which will make the decision for you but in the end you need to know when to stop.

Have a gin and tonic

Publish it and reward yourself.

Note the vertical lines
My finished dashboard

What’s your process like? I would love to know how you do things.

* the image at the top is an infamous US diagram portraying the Afghan war. It was widely lambasted for being incomprehensible. I’ve always thought that was kind of the point, and they deliberately designed it like this to make the point.

Choosing the right colours for your visualizations

Colour in data visualisation: apparently easy but filled with pitfalls. There are volumes of posts about colour on the web. I’ve written about it before when discussing the Iraq’s Bloody Toll chart. And here’s a recent post about exploring and choosing potential palettes.

My entry - click to see it bigger
There were no accidents in the colour choices for this dashboard (click to see the interactive version)

For this post, one of a series supporting Tableau Design Month, I’ll explain the colour choices made in design the dashboard above. There are three points I will highlight in this post:

  1. Simplify the colour scheme as much as you can
  2. Choose a colour that relates to your topic
  3. Soften the darker tones

Simplify the colour scheme

Let’s see what Tableau’s default colour scheme would have been:

100% default formatting
100% default formatting

Tableau, or any visualisation tool, cannot know what the purpose of your vizualisation is. Therefore its choices should be appropriate to the chart being built. But in the above, the end result is overwhelming. There are colours everywhere.

It turns out that using just 2 colours: red and grey, you can tell the exact same story more clearly. You can even test your dashboard by trying it in greyscale: is the story still visible in the version below:

Get it right in black and white
Get it right in black and white

Choose a colour that represents your topic

I chose red to evoke the emotional aspect of this dataset. Red is powerful and emphasises the reality of fatalities. What if I’d have chosen a different colour? Blue, for example:

Going for neutrality
Going for neutrality

In this case the dashboard is much more neutral. It’s less provocative. It’s less opinionated.

Your colour choice should depend on your audience and your goal.

Soften the darker tones

You can choose palettes to emphasise just the parts of the data you want to.  Tableau defaults to a perfectly serviceable green gradient palette.

My goal was to make the 3 most lethal seasons (Jan 1, Jul 4, Dec 25) pop out. A simple red palette didn’t do it so I tried red-black, but the black was too prominent. I settled on a red-white diverging as this really popped the days I wanted to focus on. All my choices can be seen below:

Iterating through different colour choices
Iterating through different colour choices

I went a lot further in this dashboard to soften the dark tones. For example, all the fonts are softened from black to a lighter grey. As I write this post, I’m unsure now whether that was a successful choice. Check out the image below. Which do you think is more successful – the dark font or the light font?

Which do you prefer? The lighter tones on the left or the darker ones on the right?
Which do you prefer? The lighter tones on the left or the darker ones on the right?

Conclusion

Colour isn’t easy. In this post I’ve covered just 3 choices. You also need to consider cultural implications, colour-blidness, publication type, and much much more. As always, I am very interested in your thoughts – let me know in the comments.

How do you communicate that people can interact with your designs?

If you publish something interactive to the web, how is your audience supposed to know it is interactive? And how do you instruct them what to do to interact?

what you write and what they read

When a user sees a dashboard for the first time, they need to learn how to read it and how to interact with it.

You can do this in many ways. Often I see people put the instructions somewhere on the viz or on an instructional tooltip. Here’s an example from a recent Viz of the Day:

"Click on a party" (click here to see the original)
“Click on a party” (click here to see the original)

That’s fine but there is one major problem: most people don’t read the text on your viz. They’ll probably read the title but not much else.

One way you can inform a user they can interact is through tooltips and that’s what I will cover here.

Interactivity can be divided into 3 types, all of which are available in Tableau. Something can be triggered when a user:

  • …hovers their mouse over something (how does this replicate on mobile? That’s a question for another post)
  • …clicks on a data point
  • …lassos and selects some marks of the interactive

In Tableau, these are defined a “Hover”, “Select” and “Menu”. If you’re new to actions, I recommend this post by Peter Gilks.

The menu action is always in Hyerlink blue
The menu action is always in Hyerlink blue (click to see interactive version)

For my Design Month dashboard, I chose to go with a Menu action. I like the fact that when a user hovers their mouse over a mark, a nice customised tooltip with a call to action appears right where their eyes are looking.

I used a Menu action but a similar trick can be achieved with a Select action. Using a Select action gives you more control over the format of the Call to Action. I like this example from another recent Viz of the Day:

Select as Menu

This technique is not perfect:

  • There isn’t a Hover equivalent on a mobile interface.
  • What if the user DOESN’T move their mouse over the viz?

Which actions do you prefer in your dashboards? What else do you consider when instructing people about interactivity?

Less is more: improve chart clarity by removing borders and lines

Lines reduced as far as possible.
Lines reduced as far as possible. Click to see and interact with the full dashboard.

When you design a chart, just how many borders and lines can you remove to maintain clarity? Do you improve clarity by removal?

Could I have gone any further? Sometimes I will hide the y-axis completely and just label the max value but I think that’s pushing it a little too far:

tick mark too far
Removing the y-axis completely: a step too far?

That’s what we’ll look at in this post. I’ll cover axis ranges and tick marks separately. In this post, I’m going to focus on what’s available from the formatting pane.

In the image above, you can see that my formatting approach is to reduce the lines as far as possible while retaining the meaning.  Did I go too far? I think I got it about right.

Let’s look at how my end result compares with the defaults: Default formats on the right, extreme reduction on the left.

Default formats on the right, extreme reduction on the left. There’s nothing wrong with the defaults – the gridlines and borders are very sensible choices for a default setting. I do think I have emphasised the data more by reducing the lines.

Here’s how you can reduce the borders and grid lines in Tableau:

Borders

Remove all of the outer borders by selecting Format…Borders from the menu and then turning off all dividers at the sheet level:

How to remove outer borders
How to remove outer borders

 Grid lines

I owe a hat-tip to Nelson Davis (@nelsondavis) for suggesting that it’s great to show only the horizontal grid lines in a view.

To achieve the effect, just go to the Format…Lines pane and set the Columns Grid Lines to None:

This setting leaves horizontal gridlines only
This setting leaves horizontal grid lines only

Conclusion

I like the end result, it’s very crisp. One bonus is that because there’s no border at the bottom, it makes it less likely someone will think the y-axes start at zero.

You can see and download the full Fatalities dashboard here.

My entry - click to see it bigger
My entry – click to see it bigger

 

Are there terms for these two measure types?

Here’s a new-to-me problem: a dataset has two measures, and they’re both different types, but is there a term for the two types?

Here’s my data:types of measures

“Sales” can be shown broken down by year or as a total because a sale is only counted in one year

“Staff” cannot be totalled across all years because some of the staff are being counted in all years. I don’t have 135 staff, I have 60.

Is there a term for these two measures as they appear in a dataset? I’m thinking that “Staff” is cumulative, maybe? Sales are discrete? But that doesn’t sound right…

Help!