read_airfares {flightsbr} | R Documentation |
Download data on air fares of domestic and international flights in Brazil. The data is collected by Brazil’s Civil Aviation Agency (ANAC). A description of all variables included in the data for domestic airfares is available at https://www.anac.gov.br/acesso-a-informacao/dados-abertos/areas-de-atuacao/voos-e-operacoes-aereas/tarifas-aereas-domesticas/46-tarifas-aereas-domesticas. A description of all variables included in the data for international airfares is available at https://www.gov.br/anac/pt-br/assuntos/dados-e-estatisticas/microdados-de-tarifas-aereas-comercializadas.
read_airfares(
date = 202001,
domestic = TRUE,
showProgress = TRUE,
select = NULL,
cache = TRUE
)
date |
Numeric. Date of the data in the format |
domestic |
Logical. Defaults to |
showProgress |
Logical. Defaults to |
select |
A vector of column names or positions to keep. The rest of the columns are not read. The order that the columns passed determines the order of the columns in the result. |
cache |
Logical. Whether the function should read cached data downloaded
previously. Defaults to |
A "data.table" "data.frame"
object. All columns are returned with
class
of type "character"
.
## Not run: if (interactive()) {
# Read air fare data
af_201506 <- read_airfares(date = 201506, domestic = TRUE)
af_2015 <- read_airfares(date = 2015, domestic = TRUE)
}
## End(Not run)