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

Is it possible to retrieve metadata as BETS package does? #38

Closed
GitHunter0 opened this issue Oct 22, 2020 · 4 comments
Closed

Is it possible to retrieve metadata as BETS package does? #38

GitHunter0 opened this issue Oct 22, 2020 · 4 comments

Comments

@GitHunter0
Copy link

Hey @wilsonfreitas , is it possible to retrieve metadata as BETS package does via BETS::BETSsearch() ?
It is an important feature and it would be great to have in rbcb.

As a side issue do you know why rbcb is so much faster than BETS? As discussed in here: nmecsys/BETS#17

Thank you very much.

@wilsonfreitas
Copy link
Owner

Using the API, unfortunately no, it does not, but rbcb has a workaround. It scrapes the https://dadosabertos.bcb.gov.br/ website and return the searches results with rbcb::search_series

Try

rbcb::search_series("IPCA")

@GitHunter0
Copy link
Author

Great to know @wilsonfreitas , is it possible to adjust the encoding type? Because the results with special characters get desfigured, e.g.: "�ndice nacional de preços ao consumidor - Amplo (IPCA) - Núcleo por exclusão"

@GitHunter0
Copy link
Author

Great to know @wilsonfreitas , is it possible to adjust the encoding type? Because the results with special characters get desfigured, e.g.: "�ndice nacional de preços ao consumidor - Amplo (IPCA) - Núcleo por exclusão"

@wilsonfreitas , I believe I know the solution. In your file "rbcb_search.R", replace doc <- xml2::read_html(x) with doc <- xml2::read_html(x, enconding="UTF-16")) .

Please, would you mind to implement that to see if it works?

@wilsonfreitas
Copy link
Owner

I've made a small change using your suggestion and I believe that now it is working.

07fb9b1

Tks.

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