Minor changes:
read_aircrafts() now throws an error, as it has been deprecated in favor of read_aircraft() simply to fix a typo in the function name. The behavior and outputs are identical.read_airfares() and read_flights() now cache the list of dates/files available from ANAC to a session-scoped temp file, governed by the existing cache parameter. This avoids re-scraping ANAC's website on every single call within the same R session.httr2::req_perform_parallel(), replacing curl::multi_download().Bug fixes:
select parameter in read_airfares(), which was silently ignored and had no effect on the columns returned. It now behaves the same way as select in read_flights().get_airfares_dates_available() (used internally by read_airfares()) to retry requests to ANAC that fail transiently (timeouts, connection errors, HTTP 429/503) instead of silently dropping the affected year and returning an incomplete list of available dates.get_airfares_dates_available() and latest_airfares_date() to fail cleanly with NULL when ANAC can't be reached, instead of occasionally producing a nonsensical "data available between Inf and -Inf" error, or -Inf as a date.nchar == 55) used to filter valid international airfare files listed by ANAC with an explicit filename-pattern check, and added the equivalent check to the domestic airfare listing (which previously had no filter at all). This guards against malformed, duplicate, or misplaced files that ANAC occasionally publishes (e.g. typo'd names, files uploaded to the wrong year, re-uploads with (1) appended) corrupting the list of available dates.New contributors
Major changes:
read_ functions now is to download data from the latest date available.read_aircrafts() is now deprecated in favor of read_aircraft() simply to fix a typo in the function name. The behavior and outputs are identical. Closes #45CRAN policy:
Breaking changes:
read_airports() now downloads v2 version of public airports data. Closes #41Major changes:
Minor changes:
yyyymm OR a 4-digit format yyyy.latest_airfares_date()read_aircraft() for multiple months when the number of collums differed across months. Fixed using data.table::rbindlist(fill = TRUE)Major changes:
read_flights(), read_airport_movements(), and read_aircraft() now accept vectors of dates like c(202201, 202301) or c(2022, 2024)read_airports() and read_aircraft() now has a cache parameter.curl::multi_download() to download files in parallel. This brings the advantage that the package now automatically detects whether the data file has been updated and should be downloaded again.Minor changes:
read_flights() function now uses fread(encoding = 'Latin-1') internally to avoid issues with encoding. Closed #35.get_airport_movement_dates_available() does not throw warnings of NA values anymore.read_aircraft() function now used fread(skip = 1) internally to read column names correctly.Major changes:
read_flights() and read_airport_movements() now have a new parameter cache, which indicates whether the function should read cached data downloaded previously. Defaults to TRUE. Closed #31.read_aircraft() now has a date parameter, which allows one to download the data on aircraft registered at ANAC at particular years/months. Closed #33.Minor changes:
numeric class. Closed #32.Bug fixes:
Major changes:
Minor changes:
read_flights() now accepts a vector of dates. Closed #29.Bug fixes:
get_airfares_dates_available() because of ".CSV" in ANAC url. Closed #27.get_airport_movement_dates_available()read_flights() due to changes in ANAC data links.intro_flightsbr vignetteMajor changes:
Minor changes:
read_flights() and read_airport_movements() no longer have side effects on objects named month and year on the global environment. The split_date() support function was removed from the package. Closed #17.read_ functions now try to download for a 2nd time if the 1st attempt failed. This will help overcome a small issue with the instability of ANAC data links. Closed #18.latlon_to_numeric() with suppressed warnings.Major changes:
read_aircraft() to read data on all aircraft registered in the Brazilian Aeronautical Registry (Registro Aeronáutico Brasileiro - RAB) Closed #14.read_airports() to read data on all public and private airports. Closed #4 and Closed #9.latest_flights_date() to check the date of the latest flight data available. Closed #16.read_airport_movements() to download data on airport movements. Closed #15.read_flights() now takes date input in the format yyyymm or yyyy. When the date input is a 4-digit number, the function now downloads data of all months in that year. Closed #1.read_flights() now automatically detects and checks the latest flights data available. Closed #13.split_date(): Split a date from yyyymmm to year yyyy and month mmcheck_date(): Check whether date input is acceptablegenerate_all_months(): Generate all months with yyyymm format in a yearlatlon_to_numeric(): Convert spatial coordinates of airports to lat longet_flights_url(): Put together the url of flight data filesget_flight_dates_available(): Retrieve from ANAC website all dates available for flights datadownload_flights_data(): Download and read ANAC flight dataget_airport_movements_url(): Put together the url of airport movement data filesget_airport_movement_dates_available(): Retrieve all dates available for airport movements datadownload_airport_movement_data(): Download and read ANAC airport movement dataread_flights and read_airports().Minor changes: