Introduction
If you work with travel data in Tableau, you might find this technique useful. This article explains how to add custom geocoding to Tableau for airport IATA (International Air Transport Association) codes. Once you do this, the airport IATA codes in your data sets will be geographically encoded so that Tableau places your data directly at the airports.
Custom Geocoding Method
Tableau gives us instructions on how to implement custom geocoded fields. You can read how to do this by clicking here. For this example, you don’t have to read this article, however, because I show you how to do it in a video. In fact, if you try to read the material and do this yourself, you might get confused (fair warning given).
What Are Airport IATA Codes?
Figure 1 shows some airport IATA codes that are included in an Excel file you can download by clicking here. Embedded in the Excel file are two files that you will need to do this work.
The first file is called “Airport Codes8.csv”. There are six fields including the IATA code, the airport name, the airport city, the airport country, and latitude and longitude of the airport itself included in this file. The contents for this file are stored on the second Excel worksheet, which you must save as a *.csv file to reproduce what you see in Figure 1.
The second file you will need is called “schema.ini”. It is stored on the third Excel worksheet. Figure 2 shows the content of this file. The “schema.ini” file is required before you can import the custom geocoded data into Tableau. The purpose of the “schema.ini” file is to define the data types of the six fields Tableau will import to create this custom geocoded information.
Both of these files are stored in the Excel worksheet that you just downloaded. You just need to follow the two-step directions in the Excel worksheet to save the files to your hard drive before attempting the procedure shown below in the video.
The Instructional Video
This video shown below demonstrates how to implement the IATA codes as custom geocoded entities in Tableau 8.2.3. The actual procedures are very quick to complete but offer you a lifetime of time-savings if you work with IATA data.
The video also shows you an example of how to work with the IATA codes in Tableau. If you have any questions, please feel free to ask me by using the comment section below.
Making Airport Maps
Figure 3 and 4 show a couple of airports that were included in the example travel file shown in the video. If you want to know how to have Tableau make those pretty maps for you, click here for another blog post that shows you how that is done.
Final Thoughts
Creating custom geocoded information in Tableau is a powerful technique. It is also a technique that I haven’t used much over the years. This article would not have been written if it weren’t for my talented colleague Lew Goldstein. Lew’s determination to make this method work is the only reason this article exists.
There were various issues we had to overcome to complete this work and the Tableau-supplied documentation for creating custom geocoded examples is confusing. Many thanks to Lew for his dogged determination in seeing this method through to its completion.
Very cool! Thanks for the data, not just the directions 🙂 One thing: I was just playing with the Airport Codes8 file, and noticed that the codes EEN, DVT, and MYF seem to have positive longitudes when they should be negative.
Hi Lari,
Thanks for the quick feedback on the IATA codes. I haven’t done any data QA on the lats/longs. I think I’m going to do a comprehensive QA check of the lat/longs using Alteryx. Once I get the errors fixed, I’ll repost the data.
I snagged this original file from:
The Global Airport Database
Release Version 0.0.1
Author: Arash Partow 2003
Copyright notice:
Free use of The Global Airport Database is permitted under the guidelines
and in accordance with the most current version of the Common Public License.
http://www.opensource.org/licenses/cpl.php
Introduction
The Global Airport Database is a FREE online downloadable database of aiports
big and small from around the world. The database is presented in a simple
token separated format.
For more information please visit:
http://www.partow.net/miscellaneous/airportdatabase/index.html
Very cool Ken. I still don’t use maps or geo-coded data much in my work (maybe I need to find creative ways to incorporate that kind of data), but I’ve got some colleagues who do and I’ve sent them your post.
superb article about Custom Geocoding in Tableau
http://www.tekclasses.com/courses/bl/tableau-training-in-bangalore/
Thanks! A big shout-out to south-central India.
Pingback: Investigating India With Tableau 10 Custom Regions | 3danim8's Blog
Pingback: 3danim8's Blog - How To Use Hadoop With #Tableau and #Alteryx