Spatial!

Spatial functionality in both Tableau and Alteryx refers to the ability to work with geographical or location-based data within these data analytics and visualization tools.
In this blog, we are going to use Airline Routes dataset to create a Spider maps showing the points for each origin and destination and connect it by lines as below.

Original Dataset

Step one:
Input the dataset into Alteryx Designer, bring the RecordID tool so that each row has a unique ID (we can then use the RecordID to join the row back later on). After inputting the data, we need to us select tool to change those string datatype back to numeric because Alteryx would change all the datatype in csv files to string by default.

Alteryx flow

Step two:
We then need to us Create Points tool to create the points for both Origin airport and Destination airport. Note that X field is for longitude and Y field is for latitude. Now we should be able to see all the airport location on the window configuration.

Step three:
Now we will have two new columns created (Centroid, Centroid2). To avoid confusion, i would rename the fields into Origin Centroid and Destination Centroid. As we want to create lines for each route, we need to bring these two new Centroid columns into one field. We can achieve this by using transpose tool.

Step four:
After that, we can use Poly-Build tool to create sequence line as below. By doing this, we will lose most of the other fields from the table. By grouping the RecordID, we could be able to join the lost information back by using join tool.

Step five:
Now we can output the file as Tableau format and connect the data on Tableau.

Step six:
Now double click the Origin Centroid to create a map. Add the Dest Centroid and makeline to the second layer and third layer in the map.

Step seven:
Format the map by change the map background style to outdoor, also change the mark type of Origin Centroid into custome shape and change mark type of Dest Centroid to circle.

Here we go!

Author:
Abby Poon
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab