Learn R Programming

openSkies (version 1.0.0)

getAirportDepartures: Retrieve flight departures from a specified airport

Description

Retrieves the list of flights that departed from a specified airport during a certain time interval. The aiport must be specified using its ICAO identified. Beginning and end times must be specified as date-time strings in any format that can be unambiguously converted to POSIXct (such as YYYY-MM-DD HH:MM:SS).

Usage

getAirportDepartures(airport, startTime, endTime, timeZone=Sys.timezone(), 
                     username=NULL, password=NULL)

Arguments

airport

string with the ICAO identifier of an airport (for example, \"LEZL\" for Seville Airport.

startTime

date-time string indicating the starting time of the interval for which departures should be retrieved. Must be in a format that can be unambiguously converted into POSIXct time. Valid examples are \"2011-03-27 01:30:00\" and \"2011/03/27 01:30:00\".

endTime

date-time string indicating the ending time of the interval for which departures should be retrieved. Must be in a format that can be unambiguously converted into POSIXct time. Valid examples are \"2011-03-28 01:30:00\" and \"2011/03/28 01:30:00\".

timeZone

string with the name of the time zone for startTime and endTime. For details on supported time zones, see help(timezones). By default, the system time zone is used.

username

optional string with the username to use for authentication for the OpenSky API. By default, no authentication is performed.

password

optional string with the password to use for authentication for the OpenSky API. By default, no authentication is performed.

Value

A list of objects of class openSkiesFlight, where each object represents a flight that that departed from the specified airport during the specified time interval. See the openSkiesFlight documentation for details on the fields for the class.

References

https://opensky-network.org/apidoc/rest.html

Examples

Run this code
# NOT RUN {
# Obtain a list with information for all the flights that departed from Seville
# Airport on the 25th of July, 2019 between 9 AM and 11 AM, local time.

if(interactive()){
getAirportDepartures(airport="LEZL", startTime="2019-07-25 09:00:00", 
endTime="2019-07-25 11:00:00", timeZone="Europe/Madrid")
}
# }

Run the code above in your browser using DataLab