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

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

The MapBiomas project gathers data reporting the type of land covering each year by area, that is, for example, the area used for a temporary crop of soybeans. It also reports the transitions in land coverage between years.

The data has yearly frequency and is available starting from the year 1989.

For all datasets, areas are measured in hectares (ha). 

***
**Options:**

  1. **dataset**: there are 7 possible choices:

      * `"mapbiomas_cover"`: types of land cover.
      * `"mapbiomas_transition"`: changes in land cover.
      * `"mapbiomas_deforestation_regeneration"`: deforestation and forest regeneration.
      * `"mapbiomas_irrigation"`: irrigated areas.
      * `"mapbiomas_mining"`: areas used for mining.
      * `"mapbiomas_water"`: areas of water surface.
      * `"mapbiomas_fire"`: areas of wildfire burn scars.

  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. **geo_level**: 
  
      * For dataset `"mapbiomas_cover"`, can be `"municipality"` or `"state"` (faster download)
      * For dataset `"mapbiomas_transition"`, can be `"municipality"` or `"state"` (faster download)
      * For dataset `"mapbiomas_deforestation_regeneration"`, can only be `"municipality"`
      * For dataset `"mapbiomas_mining"`, can be `"indigenous_land"` or `"municipality"`
      * For dataset `"mapbiomas_irrigation"`, can be `"state"` or `"biome"`
      * For dataset `"mapbiomas_water"`, can be `"municipality"`, `"state"` or `"biome"`
      * For dataset `"mapbiomas_fire"`, can only be `"state"`

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

**Examples:** 
 
```{r eval=FALSE}
# download treated Mapbiomas Cover data in English
data <- load_mapbiomas(
  dataset = "mapbiomas_cover",
  raw_data = FALSE,
  geo_level = "municipality",
  language = "eng"
)

# download treated data on mining on indigenous lands
data <- load_mapbiomas("mapbiomas_mining",
  raw_data = FALSE,
  geo_level = "indigenous_land"
)
```


