Import various FR24 flights CSV files.

import_flights_csvs(files)

Arguments

files

a list of FR24 flights CSV files

Value

a data frame of all imported flights. Use attr(df, "problems") for issues with the data read.

See also

Examples

# NOT RUN {
# read all package February 2017 flights files
flights_dir <- system.file("extdata", package = "trrrj")
flights_csvs <- dir(flights_dir, pattern = "201702.._flights\\.csv", full.names = TRUE)
flts <- import_flights_csvs(flights_csvs)
pbs <- attr(flts, "problems")
pbs
# the problematic rows have truncated values after the embedded NUL,
# so filter them out ...
bad_rows <- pbs %>% pull(row)
flts %>% filter(!(row_number() %in% bad_rows))

# ...or use fix_flights_csvs()
# }