In 2006, Hans Rosling presented a TED talk in which he shared the story of an improving world by means of a series of scatter plots and other charts that helped viewers more easily see and understand the data being presented by using animated transitions. The presentation captivated the audience and the recording has gone on to be viewed more than 14 million times.
Preattentive Attribute of Motion
Preattentive attributes are an important consideration for a successful visualisation and various collections of these attributes have been shared (for example, this one by Stephen Few in his paper on “Tapping the Power of Visual Perception“) most of which are based on form (such as height, width, size and so on).
However, I was reminded that motion is also a preattentive attribute recently when I saw a talk by Jonathan Schwabish in London in late 2019 on “Observations on Animation in Data Visualization“, where he shared a collection of preattentive attributes from this paper on Gestalt psychology in visual perception.
Hans’ talk used motion to great effect as it allowed the viewer to visually follow the countries as they moved around the scatter plot, showing a decrease in births per women and an increase in life expectancy, as the years passed from 1962 to 2003.
Tableau Introduces ‘Animations’
With their ability to convey meaning more clearly, I was excited to see that animated transitions had made it to the official beta release for 2020.1. Two Tableau Conference 2019 talks went into some detail on the new feature and provided some great examples of how they could be used to help increase understanding when communicating information:
- Data Stories and Animation – by Jock Mackinlay
- Tableau in Motion | Tableau’s new Viz Animations – by Paul Isaacs and Phil Naranjo
I was inspired by the examples shared in the above videos and wanted to replicate as best I could some of the examples that Jock walked through.
Without Animated Transitions
Take a look at the series of charts below as they change, without any animated transitions, between different views of the same data:
If you knew the data well and had seen these graphs before, you might find it no problem to follow along with the various changes in views. However, if the data was new to you and/or you were seeing these charts for the first time, it could well be challenging.
Some of the challenges you might face are:
- Changing granularity of time
- From Year to Month
- Changing from Continuous to Discrete dates
- Showing sequential years to years in parallel
- Changing granularity of dimensions
- From sales by year to total sales to sales by category
Something that can help overcome these challenges is object constancy, which is described by Mike Bostock (the creator of D3) as when:
A graphical element that represents a particular data point can be tracked visually through the transition. This lessens the cognitive burden by using preattentive processing of motion rather than sequential scanning of labels.Mike Bostock (https://bost.ocks.org/mike/constancy/)
Animated Transitions in Tableau
With the addition of Animations (or mark transitions), Tableau has enabled object constancy to be utilised in the product for the first time.
IMPORTANT: any details of the Animations feature described below are based on the 2020.1 beta in Jan 2020 and are therefore subject to change.
Below is the Animations controls pane in Tableau:
In summary, these settings allow you to:
- Switch the animation on or off for the workbook as a whole
- Change the duration of a transition with defaults of: 0.3, 0.5, 1 and 2 seconds, or a custom setting from 0.01 to 10 seconds.
- Change the style from simultaneous to sequential. More on that later.
- Change the above 3 settings at the individual view level – thereby allowing, for example, different views on the same dashboard to have different animation styles and speeds.
With Animated Transitions
Revisiting the set of graphs shown earlier without animated transitions – here they are again with animations switched on:
Hopefully, you found it much easier to follow along and to better understand the transitions between the changing views of the data.
Below are some more examples of how animated transitions can help in communicating your data story.
Sorting without Animated Transitions
Try picking one of the Sub-Categories on the left and follow it as the view is sorted using different measures:
Difficult, isn’t it? Almost impossible, in fact, as the sub-categories don’t ‘move’, they disappear and then reappear in a different position and the only way for you to find the one you picked is to start at the top of that list and work your way down – which takes precious time.
Sorting with Animated Transitions
Try again with animations turned on:
Much easier! Now we can actually visually follow a mark as its sort position changes.
Simultaneous versus Sequential Transitions
Tableau have split the stages of a transition into four parts:
- Exit – marks exiting the view (e.g. being filtered out)
- Move – this relates to a change in value. For example, on a bar chart, if sales for Phones goes from 5,000 to 10,000 then the bar will move (increase in size) to represent that change
- Sort – marks in the view then re-sort based on any new values
- Enter – finally, any new marks enter the view (e.g. being filtered in)
In a simultaneous transition the above four steps all happen at the same time over the duration of the transition. In a sequential transition the steps happen one after the other.
Simultaneous transitions are quicker, but to emphasise specific events you may want to use sequential. Following are examples of each.
Filtering with Simultaneous Transitions
In the below animation, you will notice the bars moving (resizing) and sorting (steps 2 and 3), but it’s difficult to notice that two sub-categories exited the view (step 1) when Consumer is filtered out, or the same two sub-categories entering the view (step 4) when Consumer is filtered back in.
Filtering with Sequential Transitions
When each of the four steps occur sequentially, these exit and entering phases become much easier to see:
Recreating Hans Rosling’s Scatter Plots
When I talked at the start of this blog post about the audience being captivated when they saw Hans Rosling’s TED talk, I include myself in that group. Not in the actual audience, sadly, but when I was watching the TED talk online many years ago.
Of course, Hans’ commentary over the charts is what really brought them to life and what made the story he was revealing so captivating. Nevertheless, commentary aside, I was enthusiastic about trying to recreate as best I could some of the scatter plots Hans showed.
After downloading and combining the relevant data files from gapminder.org, below is the final result in Tableau:
If you are keen to try out this new feature (and others!), please head over to Tableau’s Pre-Release site and download the latest beta.
I recently gave a talk on animated transitions at a Tableau User Group, the slides of which are available here.
Thanks for reading!