Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read of aircraft data strange warning as from 2024 #44

Open
espinielli opened this issue Oct 24, 2024 · 5 comments
Open

read of aircraft data strange warning as from 2024 #44

espinielli opened this issue Oct 24, 2024 · 5 comments

Comments

@espinielli
Copy link

Data for registered aircraft seems to fail as from 2024.
I am using v1.0.0 of the package.

December 2023 is ok:

> aaa <- read_aircrafts(date = "202312", cache = TRUE)
Download status: 1 done; 0 in progress. Total size: 8.07 Mb (100%)... done!             
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s  

But 2024 starts to fail...maybe format has changed?

> aaa <- read_aircrafts(date = 202401, cache = TRUE)
Download status: 1 done; 0 in progress. Total size: 10.21 Mb (100%)... done!             
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s  
Warning message:
In data.table::fread(x, showProgress = showProgress, encoding = "UTF-8",  :
  Found and resolved improper quoting out-of-sample. First healed line 7631: <<"PTPSL";"ARRAIAL D"AJUDA EMPREENDIMENTOS IMOBILIARIOS LTDA";"null";"BA";"07.890.990/0001-20";"ARRAIAL D"AJUDA EMPREENDIMENTOS IMOBILIARIOS LTDA";"null";"null";"null";"null";"048";"TPP";"null";"MONTAER MC01";"MONTAER - MONTAGEM E MANUTENCAO AERONAUTICA LTDA";"null";"600";"null";"null";"null";"null";"null";"null";"null";"null";"null";"R";"null";"null";"null";"null";"RESERVADAS AS MARCAS";"">>. If the fields are not quoted (e.g. field separator does not appear within any field), try quote="" to avoid this warning.
> aaa <- read_aircrafts(date = "202402", cache = TRUE)
Download status: 1 done; 0 in progress. Total size: 10.23 Mb (100%)... done!             
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s  
Warning message:
In data.table::fread(x, showProgress = showProgress, encoding = "UTF-8",  :
  Found and resolved improper quoting out-of-sample. First healed line 7267: <<"PTPSL";"ARRAIAL D"AJUDA EMPREENDIMENTOS IMOBILIARIOS LTDA";"null";"BA";"07.890.990/0001-20";"ARRAIAL D"AJUDA EMPREENDIMENTOS IMOBILIARIOS LTDA";"null";"null";"null";"null";"048";"TPP";"null";"MONTAER MC01";"MONTAER - MONTAGEM E MANUTENCAO AERONAUTICA LTDA";"null";"600";"null";"null";"null";"null";"null";"null";"null";"null";"null";"R";"null";"null";"null";"null";"RESERVADAS AS MARCAS";"">>. If the fields are not quoted (e.g. field separator does not appear within any field), try quote="" to avoid this warning.
@espinielli espinielli changed the title read of aircraft data broken as from 2024 read of aircraft data broken Oct 24, 2024
@espinielli espinielli changed the title read of aircraft data broken read of aircraft data broken from 2024 Oct 24, 2024
@espinielli espinielli changed the title read of aircraft data broken from 2024 read of aircraft data strange warning as from 2024 Oct 24, 2024
@rafapereirabr
Copy link
Member

ANAC's data sets come in .csv files and oftentimes there is an issue or two with quotation marks. In this case, the value of the "prorietario" (owner) column is "ARRAIAL D'AJUDA EMPREENDIMENTOS IMOBILIARIOS", but R parses is as D"AJUDA and hence the annoying warning messages.

Nonetheless, please note that this issue is solved, as the message says "Found and resolved improper quoting out-of-sample". The function returns the expected result. Here is the row with the quotation issue.

 a202402 <- flightsbr::read_aircrafts(date = "202402")
  
 a202402[marca=='PTPSL',]

@espinielli
Copy link
Author

In fact it is not a problem of R: I downloaded the relevant file and the payload is using double quote instead of a quote.

"PTPSL";"ARRAIAL D"AJUDA EMPREENDIMENTOS IMOBILIARIOS LTDA";"null";"BA";...

@rafapereirabr
Copy link
Member

ah, indeed, it's a problem with the data then. In such case, there isn't much we can do from our side. Thanks for the heads up anyway!

@espinielli
Copy link
Author

Do you think reporting the issue back to the data owner would help?

@rafapereirabr
Copy link
Member

I've contacted a colleague who might be able to help ,but I'm not very optimistic will make a difference, unfortunately

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

No branches or pull requests

2 participants