Introduction to flightsbr

flightsbr is an R package to download flight and airport data from Brazil’s Civil Aviation Agency (ANAC). The package currently includes two main functions:

read_flights():

Data dictionary: a description of all variables included in the data is available at .

read_airports()

Data dictionary: the data dictionary for public airports can be found at . The data dictionary for private airports can be found at .

Basic usage

Before using flightsbr please make sure that you have it installed on your computer. You can download the most stable version from CRAN.

install.packages("flightsbr")

Now we can load some libraries we’ll use in this vignette:

library(flightsbr)
library(dplyr)

Download data of flights:

# in a given **month* of a given **year** (yyyymm)
df_201506 <- read_flights(date=201506, showProgress = FALSE)

# in a given year (yyyy)
df_2015 <- read_flights(date=2015, showProgress = FALSE)

Download data of airports:

airports_priv <- flightsbr::read_airports(type = 'private', showProgress = FALSE))
airports_publ <- flightsbr::read_airports(type = 'public', showProgress = FALSE)

dplyr::glimpse(airports_publ, width =2)