Mapping the world’s longest plane fights

February 3, 2016
By

(This article was first published on Revolutions, and kindly contributed to R-bloggers)

If you're one of those people that dreads long plane flights, this map by Matt Strimas-Mackey will help you find routes to avoid. It shows Wikipedia's list of the top 30 scheduled commercial flights by distance (with code-share duplicates removed), represented as a map showing the routes colour-coded by the time spent in the air.Top 25 longest flights

Don't be distracted by the curved trajectories: these are all straight-line (technically, "great circle") routes, necessarily distorted by the use of the Kavrayskiy VII projection to fit the spherical globe onto the flat plane of your monitor. As a result, the length of the lines doesn't map exactly to the length of the route, which is why the color scale is helpful. 

It's interesting to see where the routes go: if you live in eastern China or the middle-East and plan to go to the States you may well be in for a long haul. It's also interesting to see where the routes are not: as someone who's made the trip to Australia a few times I'm surprised there are only two top-25 routes there, and there being none in South America is also a surprise. Remember, too, that this chart only includes direct flights: the flight from London to Adelaide takes 19.5 hours, but requires a stop in Dubai.

Matt created this chart entirely in the R language. He used the rvest package to scrape the source data from Wikipedia. He used the ggmap package to geolocate the cities, and to generate the world map. The routes themselves were calculated by the geosphere package, which converted the great circles for display on the map projection provided by the ggalt package. For all the details on how the map was made, including the R code, follow the link to Matt's blog post below.

Matt Strimas-Mackey: Mapping the Longest Commericial Flights in R (via the author)

To leave a comment for the author, please follow the link and comment on their blog: Revolutions.

R-bloggers.com 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.

Sponsors

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)