Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nmecsys/BETS
Package to obtain and analyze thousands of Brazilian economic time series
https://github.com/nmecsys/BETS
package r
Last synced: 3 months ago
JSON representation
Package to obtain and analyze thousands of Brazilian economic time series
- Host: GitHub
- URL: https://github.com/nmecsys/BETS
- Owner: nmecsys
- License: gpl-3.0
- Created: 2017-09-04T14:34:48.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-04-03T20:57:07.000Z (almost 4 years ago)
- Last Synced: 2024-10-28T17:32:46.067Z (4 months ago)
- Topics: package, r
- Language: R
- Size: 5.21 MB
- Stars: 38
- Watchers: 9
- Forks: 13
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
BETS
====[](https://travis-ci.org/nmecsys/BETS)

[](https://CRAN.R-project.org/package=BETS)
[](http://cran.rstudio.com/web/packages/BETS/index.html)

[](https://github.com/nmecsys/BETS)


:exclamation: **Please read this carefully before using the latest BETS version (0.4.4)**
*The package went through considerable changes.*
BETS - Brazilian Economic Times Series
======================================Installation
------------``` r
# cran version
install.packages("BETS")
# dev version
devtools::install_github("nmecsys/BETS")
```Usage
-----``` r
library(BETS)
```:exclamation: Important (update 0.4.2)
--------------------------------------1. BETS package underwent major changes in response to R Journal's reccomendations:
- New function names (see table below)
- Database onnection credentials are now encrypted
- Sample data was included in `/data`, to allow the user to run examples even when offline, or when our server is down.| Old name | New name |
|:------------------|:------------|
| BETS.search | BETSsearch |
| BETS.get | BETSget |
| BETS.chart | chart |
| BETS.save.sas | saveSas |
| BETS.save.stata | saveStata |
| BETS.save.spss | saveSpss |
| BETS.corrgram | corrgram |
| BETS.dashboard | dashboard |
| BETS.deflate | deflate |
| BETS.dummy | dummy |
| BETS.grnn.test | grnn.test |
| BETS.grnn.train | grnn.train |
| BETS.normalize | normalize |
| BETS.predict | predict |
| BETS.report | report |
| BETS.sidra.get | sidraGet |
| BETS.sidra.search | sidraSearch |
| BETS.std\_resid | std\_resid |
| BETS.t\_test | t\_test |
| BETS.ur\_test | ur\_test |1. Package `forecast`'s newest version (8.3) contains a bug in `ndiffs`. An error arises when trying to run Augmented Dickey-Fuller (ADF) tests. Therefore, BETS' `report` function does not work properly if the user opt for SARIMA analysis with ADF tests. A solution is to install `forecast 8.2`:
``` r
remove.packages("forecast")
install.packages("devtools")
devtools::install_version("forecast", version = "8.2", type = "source")
```## Using BETS in python
```
import rpy2.robjects as ro
import pandas as pd
from rpy2.robjects.packages import importr
from rpy2.robjects import pandas2ri
from rpy2.robjects.conversion import localconverter# Getting Industrial Production (2002 = 100) - Rio de Janeiro
bets = importr("BETS")
dados = bets.BETSget(code=11081, data_frame=True)with localconverter(ro.default_converter + pandas2ri.converter):
pim_rj = ro.conversion.rpy2py(dados)print(pim_rj)
```