## Introduction

This R package is an easier alternative to use the data set of Brazilian Institute for Applied Economic Research (Ipea). It allows directly access to the macroeconomic, financial and regional databases. This package helps you to find the series you’re looking for without the need to go on the Ipeadata website to find it and downloading it. This is a practical way to use the Ipea databases on R.

#### Via CRAN

install.packages("ipeadatar")
library(ipeadatar)

#### Via Github

library(devtools)
library(ipeadatar)

## Functions

Functions Outputs
available_countries List with available countries
available_series List with available series
available_subjects List with available subjects
available_territories List with available territorial divisions
search_series List with searched series

## Examples

### 1. available_series

This function will show the available series in the Ipeadata site. One of the output variable of this function is the code. So, this is one way of getting the code for the the functions metadata and ipeadata.

### 2. search_series

To simplify, this function will help you to find the series you’ve been searching for faster. Let’s say that you are looking for databases about nominal exchange rate (or taxa de câmbio nominal, in Portuguese). All you have to do is to type a keyword on the parameter terms:

ipeadatar::search_series(terms = 'Taxa de câmbio nominal', fields = c('name'))

Or maybe, you’re looking for all active series:

ipeadatar::search_series(terms = 'Active', fields = c('status'))

Let’s say you want information about IPCA (Broad Consumer Price Index – official inflation index in Brazil) and you’ve found that the code of this series is 'PRECOS12_IPCA12'. Therefore, that’s how you get the metadata of this series:

metadata('PRECOS12_IPCA12')

With the help of this function, we get the values of the IPCA. Its frequency is monthly. So, let’s see with the help of the following graphic:

Now, you search for information about the homicide rate (per 100.000 inhabitants) in Brazilian states from 1995 to 2010. This is what you should do:

homic_rate1995 <-
filter(uname == "States" & date == "1995-01-01")

homic_rate2000 <-
filter(uname == "States" & date == "2000-01-01")

homic_rate2005 <-
filter(uname == "States" & date == "2005-01-01")

homic_rate2010 <-
filter(uname == "States" & date == "2010-01-01")

Let’s see a graphic with this information:

Finally, you looking for the evolution of the average years of schooling for people 25 years of age or older in Brazilian Mesoregions between the 90’s and 00’s:

avg_yschol1991 <-
filter(uname == "Mesoregions" & date == "2000-01-01")