Site icon R-bloggers

Decide which frequent flyer program is best for your city

[This article was first published on Decision Science News » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

INTERACTIVE TOOL TO SEE THE NUMBER OF DEPARTURES


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.

CODE

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.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.