[ View menu ]
Main

Decide which frequent flyer program is best for your city

Filed in Programs ,R
Subscribe to Decision Science News by Email (one email per week, easy unsubscribe)

INTERACTIVE TOOL TO SEE THE NUMBER OF DEPARTURES

dc
Click to access the tool

We’ve posted in the past about which airline you should be loyal to, but we always felt guilty because we only showed results for the New York metro area and there are Decision Science News readers all over the USA. (Actually, there are DSN readers all over the World too, though in most countries it’s an easy decision: go with the national airline).

Since then, we’ve learned about data for every flight in the USA that makes it rather straightforward to generate for every US metro area and airline, the number of departures.

Try out the new tool here: Decide which frequent flyer program to be loyal to.

Just type in the name of your metro area in the search box and you’ll see the number of departures by airline for your metro area only. The data comprise every flight taken in the USA in 2013.

There will be airlines you don’t recognize (like ExpressJet, etc.). They are just regional carriers that fly for the big airlines. To find out who they’re flying for, just look them up in the Wikipedia. Add things together to get the totals for the big frequent flyer programs. We’d do it for you, but, well, we’ve spent long enough on this.

This tool was made with the DataTables plugin for jQuery, R, and Hadley Wickham’s dplyr powertool.

Here’s the code. You can use my pre-made 2013 flights data file.

Get the L_CARRIER_HISTORY file from the US government.

Get the L_CITY_MARKET_ID file from the US government, too.

H/T To the mighty Jake Hofman for thinking with me about how to think about this.

CODE

2 Comments

  1. Yihui says:

    You may also try this package for DataTables: https://github.com/rstudio/DT

    December 15, 2014 @ 3:41 pm

  2. Stan Tyan says:

    Love this R Interface to the jQuery Plug-in DataTables.

    March 29, 2018 @ 8:07 am

RSS feed Comments

Write Comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>