Data Visualization
Tableau 201: How to Map a Sequential Path
By Concord

This is part one in a three-part series on mapping in Tableau.

Tableau Sequential Path Map Feature

As with most features in Tableau, maps are flexible enough to meet many different analysis needs.

One of the most popular uses of maps in Tableau that we have seen involves evaluating traffic through a certain travel hub, such as an airport or train station. These powerful visualizations are created using hub and spoke paths, with the airport or train station acting as the hub, and the paths to the destinations acting as the spokes.

See the Tableau Path Mapping article on Knowledge Base if you are interested in creating this type of map.

This is a great application of path maps in Tableau, but we recently had a need to display multiple destinations in sequential order instead of from a single origin to multiple destinations. This allows you to create a visualization that documents travel between stops.

This tutorial walks you through how to create sequential paths on a map in Tableau.

How to Map Paths in Tableau

Before we get started, let’s take a look at the interactive visualization that inspired this post:

Notice that within each trip, a path is displayed not only from our hometown of Kansas City to each destination, but from each stop in between. Here are the steps required to get this effect.

Step 1 – Prepare Your Data

Create your dataset so that each stop has a latitude, longitude, and path order. By looking up the latitude and longitude sets, you will have more flexibility when you create maps than you would if you use the automatically generated coordinates that Tableau applies to geographic fields.

The path order is what tells Tableau how to connect the dots. Here’s how our underlying data looks for one of our trips (“Stop” = Path Order):

Tableau Sequential Path Map Data

Note: When you open this data for the first time in Tableau, your Stop field will be classified as a measure because it is quantitative.

Make sure you change this field to a dimension by either dragging and dropping it from the measures window to the dimensions window, or by right clicking on the measure and choosing “Convert to Dimension”.

Step 2 – Start Your Map

Using the dataset from step 1, begin your map in Tableau by placing your longitude field on the columns shelf and your latitude field on the rows shelf.

It is important in this step to use the coordinates that you added to your dataset instead of the generated latitude and longitude in Tableau.

You can always tell the difference because generated fields in Tableau are italicized.

Step 3 – Change the Map Type

At this point, you should see a map with a single point. That single point represents the average for all of the coordinates in your data.

Change the mark type from Automatic, which is set to circles by default, to line.

This change will reveal a new marks card called “Path”.

The final step is to add the “Stop” (or path order) dimension to the Path marks card.

This should connect the dots in the proper order, creating a sequential path.

Using the sample dataset from above, your final product should look like this:

Tableau Sequential Path Map Finished

Remember, many Tableau Public authors allow you to download their workbooks by clicking in the bottom right corner of an embedded Tableau Public viz. This is a great way to reverse engineer techniques that you want to incorporate into your own work.

Sign up to receive our bimonthly newsletter!

Not sure on your next step? We'd love to hear about your business challenges. No pitch. No strings attached.

©2024 Concord. All Rights Reserved  |
Privacy Policy