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 (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-04-03T20:57:07.000Z (over 3 years ago)
- Last Synced: 2024-07-23T12:39:59.774Z (4 months ago)
- Topics: package, r
- Language: R
- Size: 5.21 MB
- Stars: 39
- Watchers: 9
- Forks: 13
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
BETS
====[![Build Status](https://travis-ci.org/nmecsys/BETS.svg?branch=master)](https://travis-ci.org/nmecsys/BETS)
![Build Status](https://ci.appveyor.com/api/projects/status/github/nmecsys/BETS?branch=master&svg=true)
[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/BETS)](https://CRAN.R-project.org/package=BETS)
[![downloads](http://cranlogs.r-pkg.org/badges/BETS)](http://cran.rstudio.com/web/packages/BETS/index.html)
![](http://cranlogs.r-pkg.org/badges/last-week/BETS?color=blue)
[![Github Stars](https://img.shields.io/github/stars/nmecsys/BETS.svg?style=flat&label=Github)](https://github.com/nmecsys/BETS)
![GitHub repo size in bytes](https://img.shields.io/github/repo-size/nmecsys/BETS.svg)
![CRAN](https://img.shields.io/cran/l/BETS.svg)![Screenshot](https://gist.githubusercontent.com/GreedBlink/e47bce2c1f31ca138885eab5a704a98f/raw/2364ac84350c54fff9acb923877c2f2b88babc08/BETS.png)
: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)
```