https://github.com/ipea/ipeadata
https://github.com/ipea/ipeadata
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ipea/ipeadata
- Owner: ipea
- Created: 2018-03-22T12:27:40.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-07-04T00:57:40.000Z (almost 7 years ago)
- Last Synced: 2023-05-01T03:28:36.934Z (about 3 years ago)
- Language: R
- Size: 22.5 KB
- Stars: 11
- Watchers: 4
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# IpeaData
# ipeaData [](https://travis-ci.org/ipea/ipeaData) [](https://www.r-pkg.org/badges/version/ipeaData) [](https://cranlogs.r-pkg.org/badges/grand-total/ipeaData) [](https://img.shields.io/codecov/c/github/ipea/ipeaData/master.svg) [](http://www.rdocumentation.org/packages/ipeaData)
This package has functions to access series on [IPEADATA](http://www.ipeadata.gov.br/)
## Installation
The package is on CRAN, so to install it just use the command:
```{r eval=FALSE}
install.packages("ipeadata")
````
## Use
The package has three functions: get_fonts, get_metadata, and get_values.
get_sources returns data from fonts on IPEDATA.
get_metadata returns metadata from a serie.
ipeadata returns values from a given serie.
Ipeadata and get_metada work passing a SERCODIGO's serie as required parameter. Is also
can receive as optional parameter the type of return: data.table or tibble.
The follow examples can make clear the usage:
```{r eval=FALSE}
get_sources()
````
```{r eval=FALSE}
get_metadata('ADMIS')
````
```{r eval=FALSE}
ipeadata('ADMIS')
````
## Contributing
To add new functions to this package, it is needed to create a new branch with the new code and submit a
pull request to branch dev.
To create the new branch using git command line use the command:
```{r eval=FALSE}
git checkout -b name_of_new_branch
````
To do it on RStudio just click on Tools >> Shell. On the new opened window type the command above.
After adding the new code and [**tests**](http://r-pkgs.had.co.nz/tests.html#test-tests) commit the changes to the git repository and check on [travis](https://travis-ci.org/ipea/utilsIPEA)
if it has been build correctly.
Now, the code is ready to be incorporated to master branch. To do so, a [pull request](https://help.github.com/articles/about-pull-requests/) has to be made to branch dev. The branch dev contains all code that is not released on CRAN.
# Manual
## Instalação
o pacote encontra-se no CRAN, portanto para instala-lo basta usar o comando:
```{r eval=FALSE}
install.packages("ipeadata")
````
## Uso
o pacote tem três principais funções: get_fonts, get_metadata, and get_values.
get_sources retorna dados sobre as fontes do IPEA.
get_metadata retorna os metadados de uma serie.
ipeadata returns retorna os valores para uma dada serie.
Ipeadata e get_metadata necessitam de um parâmetro obrigatório que é o SERCODIGO da
serie. As funções ainda possuem um parâmetro não obrigatório que informa o tipo
de retorno desejado: data.table ou tibble.
Os exemplos abaixo permitem visualizar melhor o uso dessa funções:
```{r eval=FALSE}
get_sources()
````
```{r eval=FALSE}
get_metadata('ADMIS')
````
```{r eval=FALSE}
ipeadata('ADMIS')
````