Skip to content

Fix read_flights() after changes to ANAC data access - #53

Merged
rafapereirabr merged 4 commits into
ipea:pr-testfrom
baarthur:main
Aug 8, 2026
Merged

Fix read_flights() after changes to ANAC data access#53
rafapereirabr merged 4 commits into
ipea:pr-testfrom
baarthur:main

Conversation

@baarthur

@baarthur baarthur commented Aug 8, 2026

Copy link
Copy Markdown

Proposed changes:

  • Use httr2 to retrieve the ANAC data page.
  • Retrieve file URLs directly from ANAC tables instead of constructing them from date and type
  • Parse table columns by their headers to accommodate changes in the page structure.

The new function get_flights_files_available() returns a data.table with columns date, type, and url, whereas get_flights_dates_available() is now a simple wrapper around it for backward compatibility ---I suggest removing it from the pipeline entirely.

Furthermore, the result of get_flights_files_available (minus the URL column) could be a useful output for the users, like a metadata/catalog table.

Fixes #52

@rafapereirabr
rafapereirabr changed the base branch from main to pr-test August 8, 2026 18:56
@rafapereirabr

Copy link
Copy Markdown
Contributor

this looks promising! I'll merge it into the pr-test branch and try to fix the errors from there

@rafapereirabr
rafapereirabr merged commit 25c70b9 into ipea:pr-test Aug 8, 2026
0 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ANAC website blocking flights data

2 participants