getFlightGraph | R Documentation |
Convert the info from flights$flightCounts
to an igraph::graph
object.
getFlightGraph(IATAs = NULL, years = NULL, minNFlights = 1, directed = FALSE)
IATAs |
Character vector. IATA codes of airports to include |
years |
Character vector. Years to include (as strings). |
minNFlights |
Numerical scalar. Minimum number of flights on a connection to be included as an edge. |
directed |
Logical scalar. Whether flights A->B and B->A should be considered separately. |
An igraph::graph
object containing a vertex for each airport
and an edge whenever there are at least minNFlights
between two airports.
Other flight data related topics:
flightCountMatrixToConnectionList()
,
flights
,
getFlightDelayData()
,
plotFlights()
g <- getFlightGraph()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.