A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/xmc811/flightplot below:

xmc811/flightplot: R package to plot the paths of flights on the world map

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

flightplot is not under active development. However, pull requests and suggestions are always welcomed.

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)

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.

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)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4