---
title: "Social Progress Index"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Social Progress Index}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
```

Loads information on the social and environmental performance of the Legal Amazon. 

Data from the Amazon Social Progress Index, an initiative from Imazon with support from the Social Progress Imperative that measures the social and environmental progress of its locations. Namely, the 772 municipalities in the Amazon region. Survey is done at the municipal level and data is available in 2014 and 2018.

***
**Options:**

  1. **dataset**: 
      * `"all"`, `"life_quality"`, `"sanit_habit"`, `"violence"`, `"educ"`, `"communic"`, `"mortality"`, or `"deforest"`

  2. **raw_data**: there are two options:
      * `TRUE`: if you want the data as it is originally.
      * `FALSE`: if you want the treated version of the data. 
  
  3. **time_period**: can be 2014, 2018, 2021, or a vector with some combination thereof

  4. **language**: you can choose between Portuguese `("pt")` and English `("eng")`
  
***

**Examples:**
  
```{r, eval = FALSE}
# Download raw data from 2014
data <- load_ips(dataset = "all", raw_data = TRUE, time_period = 2014)

# Download treated deforest data from 2018 in portuguese
data <- load_ips(
  dataset = "deforest", raw_data = FALSE,
  time_period = 2018, language = "pt"
)
```

