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

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

SIGMINE (Sistema de Informações Geográficas da Mineração - Mining Geographic Information System) is Brazil's official mining registry maintained by the [National Mining Agency (ANM)](https://www.gov.br/anm/pt-br), the regulatory body that succeeded the former National Department of Mineral Production (DNPM).

This dataset provides:

- **Active mining operations**: All legally authorized mining projects across Brazil
- **Mine locations**: Geographic coordinates and spatial extent
- **Product information**: What minerals/resources are being mined
- **Operational status**: Whether mines are active, suspended, or recovering
- **Area data**: Size of mining concessions and operating areas
- **Company information**: Operator and ownership details
- **Environmental permits**: Status of environmental authorization
- **Geographic coverage**: National coverage including Legal Amazon region

SIGMINE data is critical for understanding Brazil's mining sector impact on the environment, economy, and land use, particularly in sensitive regions like the Amazon.

### Data Source and Information

SIGMINE data comes from:
- Brazilian mining authorization and regulatory system
- Geological Service of Brazil (SGB-CPRM)
- Environmental licensing agencies
- Updated continuously as mining permits are issued/revoked
- Publicly accessible through government databases

For more information, visit the [National Mining Agency (ANM)](https://www.gov.br/anm/pt-br) and mining databases.

***

## Available Dataset

### **sigmine_active (Active Mining Operations)**

Comprehensive registry of legally operating mining projects in Brazil.

- **Coverage**: All active, legally authorized mining operations
- **Status**: Currently operating, suspended, or in recovery phases
- **Geographic levels**: National coverage with state and municipality identification
- **Key variables**: Mine name, operator, location, mineral type, area, authorization status
- **Mineral types**: Precious metals, industrial minerals, energy minerals (coal, uranium), others
- **Environmental data**: Environmental license status, compliance information
- **Spatial data**: Polygon boundaries of mining concessions/operations
- **Use cases**:
  - Assess mining impacts in regions of interest
  - Identify mining activity in conservation areas
  - Analyze relationships between mining and deforestation
  - Economic analysis of mining sector
  - Environmental impact assessment
  - Conflict identification (mining vs. indigenous lands, protected areas)

***

## Function Parameters

### 1. **dataset**

Only one dataset is available:

```r
dataset = "sigmine_active"  # Active mining operations
```

### 2. **raw_data**

Controls whether to download original or processed data.

- `TRUE`: Returns raw SIGMINE/DNPM data format with original coding
- `FALSE`: Returns treated data with English variable names and standardized formatting

```r
raw_data = FALSE  # logical
```

### 3. **language**

Output language for variable names and documentation.

- `"pt"`: Portuguese
- `"eng"`: English

```r
language = "eng"  # character string
```

***

## Data Structure

SIGMINE data typically includes:

- **Mine identification**: Name, registration number, operator
- **Location**: State, municipality, geographic coordinates
- **Resource**: Mineral type being mined
- **Area**: Size of mining concession (square meters)
- **Status**: Active, suspended, recovery, or other operational status
- **Authorization**: Mining and environmental permits
- **Geometry**: Spatial polygon of mining area (when available)

***

## Examples

### Example 1: Active mining data in portuguese

```{r eval=FALSE}
# download treated active mining data in portuguese
mining_active <- load_sigmine(
  dataset = "sigmine_active",
  raw_data = FALSE,
  language = "pt"
)
```

### Example 2: Active mining data in english

```{r eval=FALSE}
# download treated active mining data in english
mining_eng <- load_sigmine(
  dataset = "sigmine_active",
  raw_data = FALSE,
  language = "eng"
)
```

## Data Notes

### Mining Authorization Status

SIGMINE tracks mines at various stages:
- **Active**: Currently operating, producing minerals
- **Suspended**: Temporarily halted operations
- **Recovery**: Reclamation and environmental restoration phase
- **Other**: Various other regulatory statuses

### Minerals Covered

SIGMINE includes:
- **Precious metals**: Gold, silver, platinum
- **Industrial minerals**: Iron, copper, aluminum, tin, others
- **Energy minerals**: Coal, uranium
- **Gemstones**: Diamonds, emeralds, others
- **Construction minerals**: Sand, gravel, granite

### Data Updates

- SIGMINE is continuously updated as new permits are issued/revoked
- The dataset you access reflects the most current government registry
- Historical changes available from government archives

### Geographic Information

- **Coordinates**: GPS coordinates of mine locations
- **Polygons**: Spatial boundaries of mining concessions (when available)
- **Accuracy**: Depends on government survey quality

### Important Limitations

1. **Only legal operations**: Artisanal/informal mining not included
2. **Status lags**: Official status may lag actual operational status
3. **Environmental permits**: May not reflect real-time compliance
4. **Spatial accuracy**: Boundaries may have uncertain precision
5. **Definition changes**: Mining classification/categories may evolve

***

