How to create flight path maps in Tableau? Example
If you have a task to create a flight path map to show the impact of COVID-19 on air traffic or show your company delivery chain —brace yourself, it’s a tricky one!

Perhaps the biggest challenge you would face is not the Tableau syntax but the chores around the data — data cleaning, data union, finding missing values, and data join.
Let me tell you about the process.
STEP 1. Prepare the data. To create a flight path map, you need the following information in your databases:
(1) start and end locations (for example, departure and destination airports),
(2) airport coordinates (latitudes and longitudes for both arrival and departure),
(3) and trend information, for example, an arrival delay.
Surprisingly, there are a lot of databases over the Internet that don’t contain enough dimensions.
In this example, we will use Flight routes across the USA in 2015 Historical data, simply because this database contains all necessary information. You need to download all three .csv files — flights.csv, airports.csv, airlines.csv.
In most cases, the information is represented in separate tables (for example, airlines, airports, flights), and you need to use union and join functions.
Visualization should be meaningful and answer the user’s question, right? This free data provided by The US Department of Transportation’s Bureau tracks the performance of domestic flights operated by large air carriers. Hopefully, we could display the arrival delays to show the end-user an average arrival delay by the location.

STEP 2. Really important step: create a SELF-UNION.
Remember: in order to draw two lines, Tableau needs a start point and an endpoint.
So, when you uploaded the data, it’s time to make a union. Why? Usually, a table contains only one record in your datasets. Tableau can create a route only with two records. You need to DUPLICATE your initial table to make it work. Whereas JOINS work with columns, UNIONS work with rows.
2.1. Create a self-UNION
- Drag flight.csv file under the first one flight.csv ‘Drag table to union’

You can see the following changes:
(1) the name changes to routes.csv+,
(2) when you click on the arrow, the function ‘Edit Union’ opens, make sure there are two tables inside

(3) a new field called ‘Table name’ has appeared in your table

STEP 3. Create a Root / Path
3.1 Create a Route Identifier
- Go to the ‘Origin Airport’ column— click on ‘Create Calculated Field’

- Create a Route identifier with a function [Origin Airport] + “_” + [Destination Airport]

You can see a new column, ‘Route Identification’, with the starting and endpoints. For example, ANC_SEA of LAW_PBI.

3.2. Create a Route order
Tableau needs to know the path orders between locations so that the next step would be creating the route order.
- Go to the ‘Table Name’ column— click on ‘Create Calculated Field’
- Use the following function IF [Table Name] = ‘flights.csv’ THEN ‘1’ ELSE ‘2’ END

3.3. Create a Route location
We are applying the same logic as in 2.2. paragraph, we need to create a route location.
- Go to the ‘Table Name’ column— click on ‘Create Calculated Field’
- Use the following function IF [Table Name] = ‘flights.csv’ THEN ‘Origin Airport’ ELSE ‘Destination Airport’ END
STEP 4. Create a JOIN between tables
- Drag airports.csv to your panel

- Click ‘Calculated field’ from the drop-down menu to choose a data source.
- Use the following function IF [Table Name] = ‘flights.csv’ THEN ‘Origin Airport’ ELSE ‘Destination Airport’ END.
- Choose Iata Code as a dimension from the Airports.csv side. Iata Codes the special three letters codes used in the aviation industry to mark airports and airfields, airlines, and aircraft types. You can use ‘Airport’ instead of ‘Iata Code’ as well.

So, JOIN has been created. We’ve covered the most time-consuming and challenging part of flight path map creation.
I am not going to dive deep into the issues of data visualization — that’s easy. In a nutshell, you create a map, then drag ‘Route identifier’ into Detail and ‘Route Location’ in Path mark. That’s all, and then you can play with the functions as you want, depending on the goal — if you wish to show route locations, or specific routes, or filter by states/airlines, etc.



