Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
R
 
 
 
 
 
 
man
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

flightplot

R Package to Plot the Paths of Flights on the World Map

Build Status Build status Version Download

Installation

Please use the following code to install and load the package:

install.packages("flightplot")
library(flightplot)

If you would like to install the most up-to-date version on GitHub:

if (!require("devtools")) {
  install.packages("devtools")
}

install_github("xmc811/flightplot")
library(flightplot)

Please use GitHub Issues to report bugs or leave any comments and suggestions. Contributions through pull requests are also welcomed!

Examples

The main plot function plot_flights() accepts a two-column dataframe as input, with one column as departure airports and the other as arrival. The values of airports should be IATA 3-letter codes. sample_trips is an example dataframe that can be readily used for plotting. The columns names can be any valid names.

sample_trips
Departure Arrival
LAX IAH
IAH LAX
SFO IAH
IAH ORL
ORL IAH
IAH DEN
DEN IAH
... ...

To call the main plot function:

plot_flights(sample_trips)

The map can be set to be cropped to presets:

plot_flights(sample_trips, crop = "48States")

Some additional parameters can be adjusted:

plot_flights(sample_trips,
             crop = "48States", 
             land_color = "#fdae6b", 
             water_color = "#9ecae1", 
             dom_color = "white", 
             int_color = "black", 
             alpha = 1,
             times_as_thickness = FALSE)

About

R package to plot the paths of flights on the world map

Resources

License

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.