SkillAgentSearch skills...

Tidyipea

(WIP: do not use; use gomesleduardo/ipeadatar) Get data from IPEADATA using R

Install / Use

/learn @schoulten/Tidyipea
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<!-- README.md is generated from README.Rmd. Please edit that file -->

tidyipea

<!-- badges: start -->

R-CMD-check License:
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.

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 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 with:

# install.packages("devtools")
devtools::install_github("schoulten/tidyipea")

Example

This is a basic example which shows you how to get IPEADATA series:

library(tidyipea)
library(dplyr)

# Get CAGED data
my_tbl <- tidyipea::get_ipea(code = c("CAGED12_SALDON12", "CAGED12_DESLIGN12"))

dplyr::glimpse(my_tbl)
#> Rows: 30
#> Columns: 3
#> $ date  <date> 2020-01-01, 2020-02-01, 2020-03-01, 2020-04-01, 2020-05-01, 202~
#> $ value <dbl> 66818, 188869, -207401, -860503, -331901, -10984, 131010, 249388~
#> $ code  <fct> CAGED12_SALDON12, CAGED12_SALDON12, CAGED12_SALDON12, CAGED12_SA~

To see all available IPEADATA series codes, run this:

all_codes <- tidyipea::codes_ipea()

dplyr::glimpse(all_codes)
#> Rows: 8,874
#> Columns: 7
#> $ code       <chr> "ABATE_ABPEAV", "ABATE_ABPEBV", "ABATE_ABPESU", "ABATE_ABQU~
#> $ name       <chr> "Abate - aves - peso das carcaças", "Abate - bovinos - peso~
#> $ theme      <fct> Macroeconomic, Macroeconomic, Macroeconomic, Macroeconomic,~
#> $ source     <fct> IBGE/Coagro, IBGE/Coagro, IBGE/Coagro, IBGE/Coagro, IBGE/Co~
#> $ freq       <fct> Yearly, Yearly, Yearly, Yearly, Yearly, Yearly, Monthly, Mo~
#> $ lastupdate <date> 2021-03-18, 2021-03-18, 2021-03-18, 2021-03-18, 2021-03-18~
#> $ status     <fct> Active, Active, Active, Active, Active, Active, Inactive, A~

Related works

Check out some similar works:

  • ipeadatar: An R package for Ipeadata API database
  • ecoseries: function to capture BACEN, Ipeadata and Sidra series using their APIs

Related Skills

View on GitHub
GitHub Stars5
CategoryDevelopment
Updated1y ago
Forks0

Languages

R

Security Score

60/100

Audited on Aug 24, 2024

No findings