The OpenSky Network organization provides access to the historical data stored in its database via a SQL-like query interface based on Cloudera’s Impala.

The trrrj package provides R functions to access predefined datasets such as arrival and departure flights (and relevant tracks) or state vectors.

Open a Session to OSN Impala

The first step to access OSN historical data is to set a connection up to the Impala shell. The connect_osn function returns an SSH session to the OSN infrastructure which has to be passed to all function when retrieving historical data.

We assume your credentials are store in the environment variables OSN_IMPALA_USR for the user name and OSN_IMPALA_PWD for the password.

session <- connect_osn(usr    = Sys.getenv("OSN_IMPALA_USR"),
                       passwd = Sys.getenv("OSN_IMPALA_PWD"))

Retrieve OSN Historical Data

you can now retrieve for example all departures from Frankfurt airport on 2019-04-22 between 10:00 and 12:00.

Note that this time interval is NOT the one for the scheduled flight departures, but rather the interval within which OSN network has first seen those flights.

Disconnect from OSN Impala

Once finished working it is good practice to disconnect from the OSN infrastructure via the disconnect_osn function. This simply closes the underlying SSH session.