Flight Log Version 2.0: Flight Historian

(updated )

It’s been over three years since I began working on my flight log. In that time, it’s gone from an interesting side feature of my personal website to a major project large enough to stand on its own. For the past month, I’ve been spending my free time working on spinning it off into its own site. Now announcing:

Paul Bogard’s Flight Historian.

www.flighthistorian.com

Along with the new domain, I’ve worked on adding a bit of new functionality to the site.

Premium Economy

A table of classes, showing First, Premium Economy, and Economy, and the number of flights for each.

I started the flight log with the capability for three classes: first, business, and economy. (I’ve then somehow managed to never fly business class.1) Over the last few years, many airlines have been adding a class of service that’s a little better than a standard coach class seat, but not quite to the level of a business class seat. At the very least, premium economy seats offer a few inches more legroom than a standard coach seat, and occupy a favorable part of the plane (often between the economy bulkhead and the over-wing exit rows).2 Many airlines are now charging for these seats or reserving them for passengers with frequent flyer status.

The experience is different enough from standard economy, and present on enough airlines, that I feel comfortable tracking premium economy as its own class.

Fortunately, I’ve been scanning and saving my old boarding passes for the past few years, so I was able to determine which of my recent economy flights were actually premium economy.

IATA Codes

You may be familiar with the three-letter airport code you see printed on your boarding passes (for example, LAX for Los Angeles). This three-character code is assigned by the International Air Transport Association (IATA).

Airports aren’t the only thing that the IATA has codes for; they also have two-character codes for airlines (DL for Delta) and three character codes for aircraft types (M83 for MD-83), both of which you may see when booking flights online.

A table of airlines. For each airline, the logo, IATA code, and number of flights are shown.

The IATA technically has one-letter codes for travel classes, but most airlines use their own fare codes instead. However, many travelers still informally use these IATA codes (F for first, J for business, Y for economy) to refer to the class they’re flying.

I’ve added these IATA codes to all airlines (including operators and codeshares), aircraft types, and travel classes.3

Faster Loading Speeds

My old flight log often took a long time to load. For a while, I’d been assuming that I was simply hosting my site on a slow server.

I realized there was more of a problem when doing all these updates required me to spend a lot of time with the site running on my local computer. Since I was the only user, it shouldn’t have been slow—yet it was.

Looking at my local server logs, I noticed that some pages were taking nearly seven seconds to render, and had thousands of database queries.

Screenshot of Excel, showing the before and after loading speeds and number of database queries for a sample of Flight Historian pages. The after speeds are substantially better.

By optimizing some of my code, I was able to make most of the Flight Historian’s pages load much faster than they did in the old Flight Log. In particular, the home page (“root”), which is the page most people will see first, went from loading in 3.74 seconds to loading in 0.20 seconds—about 18 times faster!

Changelog

New

Changed


  1. On 24 Sep 2017, I switched to counting domestic first class (or the highest class on a two-class plane) as business class, so my flight log now has quite a few business class flights and not many first class flights. ↩︎

  2. On 6 Oct 2018, I added an Economy Extra class for seats that are only extra legroom (but are the same width as an economy seat) so that I could use Premium Economy for seats that were both wider and had more legroom, but were not quite business class. Generally, these Premium Economy seats are only found on long-haul flights. ↩︎

  3. But I’ve since removed the IATA codes from travel classes, since they weren’t really standardized. Travel classes are annoyingly inconsistent and complicated to categorize. ↩︎

Tags: