-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
70 lines (49 loc) · 2.28 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# tidyipea
<!-- badges: start -->
[![](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
[![R-CMD-check](https://github.com/schoulten/tidyipea/workflows/R-CMD-check/badge.svg)](https://github.com/schoulten/tidyipea/actions)
[![](https://img.shields.io/github/last-commit/schoulten/tidyipea.svg)](https://github.com/schoulten/tidyipea/commits/master)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://cran.r-project.org/web/licenses/MIT)
<!-- badges: end -->
The goal of **tidyipea** is to provide access to Instituto de Pesquisa Econômica Aplicada (IPEA) dataset, available by the [IPEADATA API](http://www.ipeadata.gov.br/api/).
This is a work still in a very preliminary stage and probably does not cover all the possibilities of API features or provides adequate robustness against errors, but it can be an alternative to other packages currently archived on CRAN (see [related works](#related-works) below).
## Installation
<!-- You can install the released version of tidyipea from [CRAN](https://CRAN.R-project.org) with: -->
<!-- ``` r -->
<!-- install.packages("tidyipea") -->
<!-- ``` -->
You can install the development version from [GitHub](https://github.com/schoulten/tidyipea) with:
``` r
# install.packages("devtools")
devtools::install_github("schoulten/tidyipea")
```
## Example
This is a basic example which shows you how to get IPEADATA series:
```{r example, warning=FALSE, message=FALSE}
library(tidyipea)
library(dplyr)
# Get CAGED data
my_tbl <- tidyipea::get_ipea(code = c("CAGED12_SALDON12", "CAGED12_DESLIGN12"))
dplyr::glimpse(my_tbl)
```
To see all available IPEADATA series codes, run this:
```{r codes}
all_codes <- tidyipea::codes_ipea()
dplyr::glimpse(all_codes)
```
## Related works
Check out some similar works:
- [ipeadatar](https://github.com/gomesleduardo/ipeadatar): An R package for Ipeadata API database
- [ecoseries](https://github.com/fernote7/ecoseries): function to capture BACEN, Ipeadata and Sidra series using their APIs