nmecsys / bets Goto Github PK
View Code? Open in Web Editor NEWPackage to obtain and analyze thousands of Brazilian economic time series
License: GNU General Public License v3.0
Package to obtain and analyze thousands of Brazilian economic time series
License: GNU General Public License v3.0
Every time i try to use the package i got the following error:
Quitting from lines 37-42 [unnamed-chunk-3] (business_cycle_dashboard.Rmd)
Error:
! unable to find an inherited method for function 'dbGetQuery' for signature '"NULL", "character"'
Backtrace:
1. BETS::chart(ts = "iie_br", open = F, file = "iie_br")
2. BETS:::draw.iie_br()
3. BETS::BETSget("ST_iiebr")
4. BETS:::get.series(code, from, to, data.frame = data.frame, frequency = frequency)
5. DBI::dbGetQuery(...)
6. methods (local) `<fn>`(`<list>`, `<stndrdGn>`, `<env>`)
The command I ran:
BETS::dashboard(type = "business_cycle", saveas = "survey.pdf")
My R Version:
R version 4.3.1 (2023-06-16 ucrt) -- "Beagle Scouts"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)
BETS 0.4.9
Thanks
Olá, pessoal, tudo bem?
A série de incerteza não está mais disponível?
Olá pessoal, tudo bem?
Estamos tentando baixar séries com o BETS, mas ele está dando problema. Vem a mensagem:
ipca = BETS.get(433)
You want to install a development version of RMySQL and DBI package packages?
(This may solve the connection problem)[Y/n]
Tentamos baixar as versões mais novas desses pacotes, mas não resolveu.
Se puderem verificar, ajudará bastante!
Abs
Hey @GreedBlink , @luccasr73 . I really like BETS but one big issue that I noted is that it is around 10 times slower than other packages like wilsonfreitas/rbcb , Quandl, fredr, ...
Taking this simple example for comparison, while rbcb takes 0.25 seconds, BETS is taking 30 seconds:
library(tictoc)
tic()
BETS::BETSget(24369)
toc()
tic()
rbcb::get_series(24369)
toc()
Any idea why such a difference?
Thank you.
Olá!
Frequentemente quando tento fazer download de alguma série obtenho o seguinte erro:
BETS-package: Sorry. This series is not yet available. Series is empty in the BACEN databases
Sendo que a série de fato existe na base de dados do BACEN. Se eu ficar repetindo o comando, eventualmente o pacote consegue fazer o download da série. É algum problema com o API do BACEN?
Olá, gente linda.
Estou tentando baixar algumas séries do SIDRA usando a função sidraGet (que está com nome diferente no README do pacote por sinal) e está retornando NA
na coluna de valor. Dá uma ajuda?
Segue meu código:
st <- sidraGet(x = 3416, from = "200001", to = "201805", variable = "all", territory = "brazil")$`serie_3416`
head(st)
Não acho q o meu código está errado (mas pode estar) pois as outras informações da tabela 3416 vêm corretas. Acho q o problema tá só na captura do valor.
Obrigada pela ajuda.
É nóis. #pas
Olá,
É possível acessar as séries do sistema Expectativas de Mercado do Banco Central pelo BETS? Eles lançaram uma API de acesso recentemente.
https://dadosabertos.bcb.gov.br/dataset/expectativas-mercado
Eu fiz rapidamente uma função para a base com dados anuais:
#' @param variables Possible options: "Media", "Mediana", "DesvioPadrao",
#' "CoeficienteVariacao", "Minimo", "Maximo".
#' @param data_inicial Initial date at which the data was projected, in ISO format.
#' @param data_final Final date at which the data was projected, in ISO format.
#' @param ...
#'
#' @import jsonlite
#' @return A data.frame.
#' @export
#'
#' @examples
#'
bcbexpect_annual <- function(variables = "Mediana", start_date, end_date, ... ){
# Required packages
require(jsonlite)
# variaveis
variaveis_c <- paste("Indicador", "IndicadorDetalhe", "Data",
"DataReferencia", variables, sep = ",")
# datas
timespan <- paste0("Data%20gt%20'", start_date, "'%20and%20", "Data%20lt%20'", end_date,"'")
# montar a URL de query
baseurl <- "https://olinda.bcb.gov.br/olinda/servico/Expectativas/versao/v1/odata/"
query_url <- paste(baseurl, "ExpectativasMercadoAnuais", "?%24select=",
variaveis_c, "&%24filter=", timespan, sep = "", collapse = "")
data <- fromJSON(query_url)$value
return(data)
}
Ao fazer o comando BETSsearch() só me retorna 16 codes. E tem mais de 16 codes no package. Alguma atualização?
Olá, pessoal, tudo bem?
Fui utilizar o BETS agora para pegar a série do ipca anualizado (13522) e só vieram dados até março de 2018.
Algum problema?
Desde já agradeço.
Olá, alguém pode me ajudar, estou querendo reproduzir os exemplos do site: https://cran.r-project.org/web/packages/BETS/vignettes/BETS_basic_usage.html
Aparece a seguinte mensagem de problema de conexão:
You want to install a development version of RMySQL and DBI package packages?
(This may solve the connection problem)[Y/n]
BCB informou ontem que em 16/08/2021 será encerrado o suporte ao acesso às aplicações web via TLS 1.0, que é o que eu tenho quando uso o BETS, e será exigida a 1.2 como versão mínima. Não sei se isso é na minha minha ponta ou na de vocês, mas deixo informado caso seja algo que valha ser investigado.
obs.: não testei, mas acho que substituindo http por https na get.series.bacen
resolve.
Boa tarde. Estou tentando usar o BETS mas aparece esse mensagem de erro. Está acontecendo algum problema no servidor?
Error in gzfile(file, "rb") : cannot open the connection
In addition: Warning message:
In gzfile(file, "rb") :
cannot open compressed file 'C:/Users/andersonferreira/Documents/R/R-3.4.2/library/BETS/data/examples.rds', probable reason 'No such file or directory'
The function bcbExpectA is returning this error: Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE, : arguments imply differing number of rows: 1, 0
with the same signature discribed on https://github.com/nmecsys/BETS/blob/master/R/bcbExpectA.R
Steps to get error:
BETS::bcbExpectA(indicator = "IPCA", limit = 100, variables = c("Media"), '2019-01-01', '2020-01-01')
Pessoal, estou tendo o seguinte erro:
Error in gzfile(file, "rb") : não é possível abrir a conexão
Além disso: Warning message:
In gzfile(file, "rb") :
não foi possível abrir o arquivo comprimido '/Library/Frameworks/R.framework/Versions/3.5/Resources/library/BETS/data/key.rds', motivo provável 'No such file or directory'
Alguma ajuda?
Obrigado.
Estou tentando fazer uma busca pelo número do dólar mas não encontra nada. Está ocorrendo algum problema ou a sintaxe está errada?
BETSsearch(description = "dolar",view = F, lang = "pt")
obrigado
Olá, pessoal, o BETS parece que parou novamente...
ipca = BETS.get(433)
You want to install a development version of RMySQL and DBI package packages?
(This may solve the connection problem)[Y/n]n
Error in value[3L] : Connetcion fail!
BETS.get(433, data.frame = F) e BETS.get(433, data.frame = T) estão retornando a mesma coisa: um data.frame
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.