powered by
Convert the info from flights$flightCounts to an igraph::graph object.
flights$flightCounts
igraph::graph
getFlightGraph(IATAs = NULL, years = NULL, minNFlights = 1, directed = FALSE)
An igraph::graph object containing a vertex for each airport and an edge whenever there are at least minNFlights between two airports.
minNFlights
Character vector. IATA codes of airports to include
Character vector. Years to include (as strings).
Numerical scalar. Minimum number of flights on a connection to be included as an edge.
Logical scalar. Whether flights A->B and B->A should be considered separately.
Other flight data related topics: flightCountMatrixToConnectionList(), flights, getFlightDelayData(), plotFlights()
flightCountMatrixToConnectionList()
flights
getFlightDelayData()
plotFlights()
g <- getFlightGraph()
Run the code above in your browser using DataLab