Airplane routes: Alteryx & Tableau

Alteryx

To explain how I can create a flight route in Alteryx, you can follow the steps using the workflow history.

The green ones except of the Browse-Tool are Spatial ones.

After reading the data, I first set a filter on Airline (DL=Delta Air Lines, Inc) to compress the data set, and then set a second filter on the departure airport to SEA (Seattle). The Formula tool then generates a new "Route" column that outputs the departure and arrival airport information together ([Origin airport]+"-"+[Destination airport]). In addition, a departure point "Origin-Point" is defined (ST_CreatePoint([Origin Longitude],[Origin Latitude])) and the geographic information for the arrival point "Destination Point" (ST_CreatePoint([Dest Longitude],[Dest Latitude]) is written together into a new column. The Select tool is used here to hide columns that are not needed.

Now comes a very important part for the creation of the airport route on a map in Alteryx: the origin point and the destination point are pivoted and so Alteryx has in a row the information of the airline, the route (airport origin point - airport arrival point), a column in which in the rows is written whether it is the start or end point and a column in which this point is geographically determined, a long format of the data is created.

After that the tools from Spatial were used. In the Poly-Build tool, the route can be grouped and as sequence the name is chosen. To get the information how many kilometers are covered from the departure to the destination airport, the Spatial-Info-Tool can be used. Here "Lenght (Kilometers)" is selected. Using the browse tool I can now display the map:

And in the output window, view the distance of the flight path.

Tableau

To get a map with the display of the route and the distance in kilometers with Tableau, a new field "Route" is calculated after reading the data set. The same formula is used as in the Alteryx formula tool. In contrast to the Alteryx version, where the transpose tool writes the information into new columns, Tableau calculates a field that outputs the flight path using the makeline command (MAKELINE([Origin], [Destination] )). For the makeline command, the data must be in wide format. To get the distance in kilometers, we create a calculated field with the command DISTANCE([Origin],[Destination],'km'). à MAKELINE and DISTANCE are commands from the Spatial segment when you create a calculated field. You can simply go to the dropdown menu and click on Spatials and get the options.

Now the Latitude can be dragged to due Rows and Longitude to the Columns. (The filters are adapted to the Alteryx example) The Flight Path, the Route and the Distance are dragged to Detail in the Mark field to fill the map with information, so that the Gante looks like this:

To be able to see a whole map in the background, this can be added via the background maps from the toolbar. If you want you can also add some color, so I have colored the flight paths according to states where the flight arrives.

The distance of the flights in kilometers can be seen by clicking on a path or moving the mouse over it.

This is how easy Spatial Tools can be used in Alteryx or Tableau 😉

Author:
Romina Wiechern
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