Code Monkey home page Code Monkey logo

bets's People

Contributors

fernote7 avatar greedblink avatar luccasr73 avatar talithafs avatar yihui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bets's Issues

dbGetQuery Error

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

Série de Incerteza

Olá, pessoal, tudo bem?

A série de incerteza não está mais disponível?

BETS sem conexão

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

Why BETS is so much slower than similar packages?

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.

Erro no download das séries

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?

download séries do SIDRA

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

Sistema Expectativas BACEN

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)
}

Erro no comando BETSsearch()

Ao fazer o comando BETSsearch() só me retorna 16 codes. E tem mais de 16 codes no package. Alguma atualização?

Dados desatualizados

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.

Elevação da versão mínima TLS BCB

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.

Error in gzfile(file, "rb") : cannot open the connection

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'

bcbExpectA returning error

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:

  1. run BETS::bcbExpectA(indicator = "IPCA", limit = 100, variables = c("Media"), '2019-01-01', '2020-01-01')

key.rds

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.

problemas no BETSsearch

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

BETS não funciona

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.