NOT_CRAN <- identical(tolower(Sys.getenv("NOT_CRAN")), "true")
knitr::opts_chunk$set(purl = NOT_CRAN)

This is just a small vignette to show how to load and run openskyr functions. In the future, I will include a shiny app to show the capabilities of the library to display real-time flight data. You have to consider that if you want to test the library with these commands, you will need to provide your own credentials (username/passwords) and probably need to change the time parameters of the functions since there are some time limitations in the API, and when you run the functions those data will probably not be accessible anymore.

Load the library

library(openskyr)

Get state vectors

Retrieve any state vector of the OpenSky data without authentication:

state_vectors_df <- get_state_vectors()

Retrieve any state vector of the OpenSky data with authentication (you need to register in opensky-network):

state_vectors_df <- get_state_vectors(username="your_username",password="your_password")

Get airport data

Retrieve flights for a certain airport which departed within a given time interval [begin, end]:

data_airport_df <- get_airport_data(username="your_username",password="your_password",
                                     option="departures",airport="EDDF",
                                     begin=1517227200,end=1517230800)

Get flights data

Retrieve flights for a particular aircraft within a certain time interval:

data_specific_flight <- get_flights_data(username="your_username",password="your_password",
                                         icao24="3c675a",begin=1517184000,end=1517270400)

Retrieves flights for a certain time interval [begin, end]:

data_all_flight <- get_flights_data(username="your_username",password="your_password",
                                    begin=1517227200,end=1517230800)

Get tracks data

Retrieve the trajectory for a certain aircraft at a given time:

data_flight_track <- get_track_data(username=username,password="your_password",
                                    icao24="494103",time=1587126600)


lgascosa/Ropensky documentation built on May 10, 2020, 5:57 a.m.