Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rpradosiqueira/sidrar
A R interface to IBGE's SIDRA API
https://github.com/rpradosiqueira/sidrar
api brasil brazil ibge r sidra
Last synced: 1 day ago
JSON representation
A R interface to IBGE's SIDRA API
- Host: GitHub
- URL: https://github.com/rpradosiqueira/sidrar
- Owner: rpradosiqueira
- Created: 2017-04-20T00:29:10.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-07-12T23:35:37.000Z (over 2 years ago)
- Last Synced: 2025-01-18T09:13:57.613Z (10 days ago)
- Topics: api, brasil, brazil, ibge, r, sidra
- Language: R
- Size: 168 KB
- Stars: 86
- Watchers: 6
- Forks: 11
- Open Issues: 10
-
Metadata Files:
- Readme: README.Rmd
Awesome Lists containing this project
README
---
output: github_document
---```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```# sidrar
The goal of *sidrar* is to provide direct access to the data of IBGE's (Brazilian Institute of Geography and Statistics) SIDRA API within the R environment in an easy and flexible way. SIDRA is the acronym to "Sistema IBGE de Recuperação Automática" and it is the system where IBGE makes aggregate data from their researches available.
## Installation
Install the release version from CRAN:
```{r , eval = FALSE}
install.packages("sidrar")
```or the development version from github
```{r , eval = FALSE}
# install.packages("devtools")
devtools::install_github("rpradosiqueira/sidrar")
```## Functions
For the time being, the "sidrar" package contains only three functions:
```{r, eval=FALSE}
get_sidra It recovers data from the given table
according to the parameters
info_sidra It allows you to check what parameters
are available for a table
search_sidra It searches which tables have a particular
word in their names
```## Example
Let's assume that we want the IPCA (Índice de Preços ao Consumidor Amplo) for the city of Campo Grande/MS. However, we want to recover only the overall percentage rate in the last 12 months. To do this simply execute:
```{r, eval = FALSE}
library(sidrar)get_sidra(x = 1419,
variable = 63,
period = c(last = "12"),
geo = "City",
geo.filter = 5002704,
classific = "c315",
category = list(7169),
header = FALSE,
format = 3)```
To more examples, see the vignette ["Introduction to sidrar"](https://CRAN.R-project.org/package=sidrar/vignettes/Introduction_to_sidrar.html).