---
title: "1. Introduction to brfinance"
output: 
  html_document:
  path: docs/intro_brfinance.html

vignette: >
  %\VignetteIndexEntry{intro_brfinance}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r, include = FALSE}
# Definir mirror do CRAN primeiro
options(repos = c(CRAN = "https://cloud.r-project.org/"))

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
```

## A Simple Solution for Brazilian Financial Data

The **brfinance** package provides simplified access to Brazilian macroeconomic and financial indicators from official sources like IBGE and Central Bank of Brazil.

### Core Functions

- `get_selic_rate()` - Daily SELIC interest rate
- `get_unemployment()` - Quarterly unemployment rate  
- `get_inflation_rate()` - Monthly IPCA inflation
- `plot_selic_rate()` - SELIC rate visualization
- `plot_unemployment()` - Unemployment rate visualization

### Language Support

All functions support both English (`"eng"`) and Portuguese (`"pt"`) through the `language` parameter:

```{r language-example, eval=FALSE}
# English (default)
data_eng <- get_selic_rate(2020, 2024, language = "eng")

# Portuguese
data_pt <- get_selic_rate(2020, 2024, language = "pt")
```

### Installation:

```{r install, eval=FALSE}
# From CRAN
install.packages("brfinance")

# Development version
devtools::install_github("efram2/brfinance")

library(brfinance)
```

