Jasmin Ritchie - Nov 9, 2015

Using hub and spoke to show paths in Tableau

One of the reasons I love being a data analyst and creating visualizations is that it combines my love of data with my natural interest in marketing (it was my college emphasis). Tableau software is perfect for this -- helping you learn more about your customers in a his application. The software itself is intuitive and allows for quick out-of-the gate analysis.  Another bonus of Tableau is the community of people sharing practical advice and inspiration. I recently saw a beautiful dashboard on Tableau public about cab rides in NYC.  This view shows the the duration and distance of cab rides originating from the Empire State Building.


Travel distance is a common concern for association event planners.  Often, they’re asking questions such as Where are our event registrants coming from? How far do they travel? If we locate our event on the east coast will we lose the west coast people? Typically I would answer these questions with dots on maps (love maps with Tableau!) along with some other charts. This week, inspired by the NYC cab dashboard, I decided to try a hub & spoke diagram to show the path between where people are coming from and the location of the event.

The key component to creating this type of analysis is realizing that it requires your data source to have a specific structure.  You will need one record for the destination and one for the origin. For example, in the case of registrations, you’ll typically have one row that contains the registrant, their address and the address of the event location.  For a path analysis, you’ll need a data pair. These rows can be referred to as the "From" row and the "To" row. Both will contain all of the previously mentioned information and will also include additional fields to identify the path name and path order along with the latitude and longitude.

Once the data source is properly formatted, you can create the visualization in Tableau. To do this, you'll use the latitude and longitude fields along with a line mark type. Then you’ll put the Path Order on the Path mark and the magic happens!

The dashboard below is a simple example I put together using typical event registration information.


Colors represent the event location (hub) while the length of the line (spoke) and color intensity represent travel distance.  Travel distances can then be compared to overall attendance and other metrics for events at each location.  This may raise additional questions, starting our conversation with the data.  Does job title or company revenue influence willingness to travel longer distances?  For all events?  If not, which ones?

The hub and spoke chart provides a nice foundation to explore this data further.  It is not used as widely as some other chart types but its perfectly suited to any kind of relative distance analysis from a specific location.   I hope this has given you a little inspiration to try something new.

Written by Jasmin Ritchie