Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
77 lines (49 sloc) 2.06 KB
title: "How to Access OpenSky Network Data"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{How to Access OpenSky Network Data}
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
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.
wef <- "2019-04-22 10:00:00"
til <- "2019-04-22 12:00:00"
# ICAO ID for Frankfurt Airport
apt <- "EDDF"
dd <- departures_impala_osn(session, "EDDF", wef, til)
## 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.
You can’t perform that action at this time.