ipeaGIT / flightsbr

R Package to Download Flight and Airport Data from Brazil
https://ipeagit.github.io/flightsbr/
Other
41 stars 6 forks source link

Function read_airfares() not working #30

Closed rafapereirabr closed 1 month ago

rafapereirabr commented 1 year ago

The function read_airfares() currently not working because ANAC has changed the url address where the data files are stored.

In the recent past, fares data on domestic and international flights were stored in:

The data is now only available other webinterfaces which work with point and click:

However, haven't been able to extract from the new site the url to the data files:

base_url = 'https://sas.anac.gov.br/sas/downloads/view/frmDownload.aspx?tema=14'

h <- try(rvest::read_html(base_url), silent = TRUE)

# filter elements of basic data
elements <- rvest::html_elements(h, "a")

any help here would be much appreciated.

rafapereirabr commented 1 year ago

It seems ANAC has a data API we could use

rafapereirabr commented 1 month ago

This should be fixed in the next release.