Loads the registry of mining processes maintained by Brazil's National Mining Agency (ANM). Each record is a polygon. "sigmine_active" covers active processes in any phase (research authorizations, mining concessions, licensing, among others), not only mines in operation; "sigmine_inactive" covers processes that are no longer active.

load_sigmine(
  dataset = "sigmine_active",
  raw_data = FALSE,
  geo_level = "state",
  language = "eng"
)

Arguments

dataset

A dataset name ("sigmine_active" or "sigmine_inactive"). Note that "sigmine_inactive" has fewer columns available than "sigmine_active" (no mineral, company, phase, last event, or state information at the source) – this reflects what ANM publishes for closed/inactive processes, not a limitation of this function.

raw_data

A boolean setting the return of raw (TRUE) or processed (FALSE) data.

geo_level

A string that defines the geographic level of the data. Can be "state" or "municipality". With "state" (the default) there is no aggregation and no spatial join: the function returns one row per polygon, with the state reported at the source. With "municipality" each process is assigned to the municipality that contains the centroid of its polygon, and the result has one row per process and no geometry. Ignored when raw_data = TRUE.

language

A string that indicates in which language the data will be returned. Portuguese ("pt") and English ("eng") are supported.

Value

An sf object (one row per polygon, with a geometry column) when raw_data = TRUE or geo_level = "state"; a tibble without geometry (one row per process) when geo_level = "municipality". At the municipality level, area_m2 is the area of the polygon kept for each process, not the sum of all its polygons, and processes whose centroid falls outside every municipality are kept with missing municipality fields. Because only the first polygon is kept, the total area of the active processes is understated by about 1.2% (the area of the other polygons of the same process is dropped), and in the October 2026 data 2,691 of the 261,025 active processes (about 1%) have a missing municipality.

Details

With raw_data = TRUE the function returns the ANM shapefile as published (an sf object), with only the column names cleaned; geo_level and language are ignored. With raw_data = FALSE the columns are renamed according to language, the area is converted from hectares (area_ha) to square meters (area_m2) and, for "sigmine_active", fields registered as "DADO NAO CADASTRADO" at the source become NA. The process description column (ds_processo in the ANM file) is returned as process_description when language = "eng" and as descricao_processo when language = "pt". A process can appear in more than one polygon of the ANM file: in the October 2026 data, 4,028 of the 261,025 active processes (1.5%) and 7,447 of the 652,652 inactive ones (1.1%) have more than one polygon. With geo_level = "state" every polygon is a row; with "municipality" only the first polygon of each process is kept (see Value).

Examples

if (FALSE) { # interactive()
### DO NOT RUN ###
# download treated active mining data in portuguese, by state
mining_active <- load_sigmine(
  dataset = "sigmine_active",
  raw_data = FALSE,
  geo_level = "state",
  language = "pt"
)

# download treated active mining data in portuguese, by municipality
mining_active_munic <- load_sigmine(
  dataset = "sigmine_active",
  raw_data = FALSE,
  geo_level = "municipality",
  language = "pt"
)

# download treated inactive (closed) mining data, by municipality
mining_inactive_munic <- load_sigmine(
  dataset = "sigmine_inactive",
  raw_data = FALSE,
  geo_level = "municipality",
  language = "pt"
)

# download the raw ANM shapefile for the inactive processes
mining_inactive_raw <- load_sigmine(
  dataset = "sigmine_inactive",
  raw_data = TRUE
)
}