addDistanceCovars: Find shortest distance and duration for routes

Description Usage Arguments Value

View source: R/CompareFlights.R

Description

Loop through the routes in flightgeo, find the existing flight path with the shortest duration, shortest distance("shortestDistFlight"), as well as the direct geo distance between airports ("shortestDist"), the number of flights within this route ("routeCount"). Also returns starting and ending airports latitude for data quality analyses. This function needs to be run after parsing flight data and adding covars, called within compareFlights() for a shorter pipeline.

Usage

1
addDistanceCovars(flightgeo)

Arguments

flightgeo

A sf dataframe containing flight data and geodata

Value

A sf dataframe with additional columns containing routeCount, shortest dist and dur


DatascribeConsulting/MonaRk documentation built on May 4, 2021, 5:28 a.m.