Showing Trends over Time and Space? Use Small-Multiple Maps

Jade Le Van's picture
Posted by Jade Le Vanon June 23, 2016

Politics month is a perfect time to learn about small-multiple charts. They are a great way to compare various indicators without saturating a visualization or having one element taking precedence over the rest. Mike Cisneros already wrote a brilliant blog post on the value of turning a line chart into a small-multiple chart. I'll show you how to create a small-multiple maps, building up on a blog post by Chris DeMartini that Yvan Fornes brought to my attention.

If you're new to Tableau Public, don't run away! Small-multiple maps might sound difficult, but they are actually really easy. And I'm going to explain the whole logic behind them, so read along! At the end of your read, you'll be able to recreate this viz on out-of-wedlock births in France with the data I've made available here.

Ready? Let's get started!

1. Create the Generic Visualization You Want to Multiply

Import your data set, and make sure a geographic role has been assigned to your geographic data. Then start creating your generic visualization. Here, we want a filled map that shows the percentage of out-of-wedlock births per county. A double-click on the "County" dimension will create the map, and a right-click drag-and-drop of the "Proportion of births out-of-wedlock" measure onto Color will let you choose whether you want the percentage to be a sum, an average, or other aggregates. Here, an average would be the most relevant.

Generic map
With this, you're only two steps away from your small-multiple maps!

2. Create the Structure for Your Small-Multiple Chart

In this second step, we will calculate how many columns and rows we need as the structure for our small-multiple maps. There is a map for every year for years ranging from 1990 to 2013, which means: (2013-1990) + 1 = 24.

To have all 24 maps displayed in our visualization, we must have: number of columns x number of rows = 24. Note that this 24 is a nice number as it allows several combinations (8 x 3, 6 x 4, 12 x 2 etc).

Let's choose to have six columns and four rows, in which we will fit our 24 years. The table below will help you visualize the structure (with 1990 = year 1, 2013 = year 24).

Your expected structure
Here is what our structure looks like.

To implement this structure, you will have to create three calculated fields (feel free to choose a name that speaks to you):

  1. "Ranking years": ranging from 1 to 24, where 1 represents 1990 and 24 represents 2013
  2. "Structure columns": ranging from 1 to 6, and using "ranking years" as a basis for calculation
  3. "Structure rows": ranging from 1 to 4, and using "ranking years" as a basis for calculation

First Calculated Field: Ranking Years

This one is the simplest:

[Year] - 1989

The logic?

Ranking years
The logic behind the "ranking years" calculated field.

Second Calculated Field: Structure Columns

This one is also easy:

CASE [Ranking years]%6
ELSE [Ranking years]%6

What's the logic? First, have a look at the orange table above to remember our structure: The first column contains years 1, 7 etc., the second column contains years 2, 8 etc. Now:

Structure columns
The logic behind "structure columns."

Third Calculated Field: Structure Rows

This is a bit more complex, but I'll explain the logic of it as well:

IF [Ranking years]%6 = 0 THEN [Ranking years]/6
ELSE ((6 - [Ranking years]%6) + [Ranking years])/6

Have a look again at the orange table: the first row contains years 1 to 6, the second row contains years 7 to 12 etc. Now:

Structure rows
That's not so easy, but hope you've got the logic!

Move the Calculated Fields

Drag and drop the three calculated fields you've just built from measures to dimensions. We want to avoid Tableau Public trying to sum or average those precious calculated fields.

Check Your Work

Make sure your structure works. Open a new worksheet. Drag and drop "structure columns" on Columns, "structure rows" on Rows, and "ranking years" on Text. If you get a table similar to the orange one above, you're only 30 seconds away from victory.


3. Add Those Structure Fields to Your Generic Map

Now comes the moment of truth! Go back to the map built in the first step. Drag and drop "structure columns" on Columns (before Longitude (generated)), and "structure rows" on Rows (before Latitude (generated)).

What do you get?

Alleluia bis!
Answer: These wonderful small-multiple maps!

Small-multiple maps can be useful to show the evolution of votes in a given country. As a matter of fact, I wrote this tutorial with this small-multiple visualization by the New York Times in mind. I was thinking how interesting it would be to visualize French votes for right-wing parties over time and space.

Hope this gives you some inspiration for the ongoing second Iron Viz feeder contest using politics data!

Got a viz or a tip you'd like to share? Share them in the comments below or tweet them to us @tableaupublic using the hashtag #PoliticsDataMonth.

Add new comment