Decide which frequent flyer program is best for your city

December 14, 2014

(This article was first published on Decision Science News » R, and kindly contributed to R-bloggers)


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 (and 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 pretty straightforward to generate for every US metro area the number of departures for each airline.

Try out the new tool here: Decide which frequent flyer program to by 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 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.


The post Decide which frequent flyer program is best for your city appeared first on Decision Science News.

To leave a comment for the author, please follow the link and comment on their blog: Decision Science News » R. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)