Deforestation (PRODES/DETER)¶
Deforestation data from INPE via TerraBrasilis — PRODES (annual consolidated) and DETER (near real-time alerts).
desmatamento.prodes()¶
Annual consolidated deforestation data by polygon.
Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
bioma |
str |
No | Biome: "Amazonia", "Cerrado", "Caatinga", "Mata Atlantica", "Pantanal", "Pampa". Default: "Cerrado" |
ano |
int |
No | Year (e.g. 2022). If None, all years, up to the max_registros cap |
uf |
str |
No | Filter by state (e.g. "MT") |
max_registros |
int \| None |
No | Cap on features read; default 50,000. None reads the whole selection. If the cap cuts the selection, a UserWarning reports the WFS total and the number returned |
tamanho_pagina |
int \| None |
No | Features per WFS page; default 500, maximum 2,000 |
as_polars |
bool |
No | Return as polars.DataFrame |
return_meta |
bool |
No | If True, returns (DataFrame, MetaInfo) |
Returned Columns¶
| Column | Type | Description |
|---|---|---|
ano |
int | Deforestation year |
uf |
str | State code (e.g. "MT") |
classe |
str | Coverage class (e.g. "desmatamento") |
area_km2 |
float | Deforested area in km2 |
satelite |
str | Satellite used |
sensor |
str | Satellite sensor |
bioma |
str | Queried biome |
Each row is one published feature. Besides these, the output carries feature_id, uuid, fid, estado_original, path_row, class_name, def_cloud, julian_day, image_date, scene_id, publish_year, source and pub_date (20 columns, desmatamento_prodes_feicoes 2.0 contract). uf is null when the published state is not recognized; the original text is kept in estado_original.
Available Biomes (PRODES)¶
| Biome | GeoServer Workspace | Layer | Historical Series |
|---|---|---|---|
| Amazonia | prodes-amazon-nb | yearly_deforestation_biome | 2000+ |
| Cerrado | prodes-cerrado-nb | yearly_deforestation | 2000+ |
| Caatinga | prodes-caatinga-nb | yearly_deforestation | 2000+ |
| Mata Atlantica | prodes-mata-atlantica-nb | yearly_deforestation | 2000+ |
| Pantanal | prodes-pantanal-nb | yearly_deforestation | 2000+ |
| Pampa | prodes-pampa-nb | yearly_deforestation | 2000+ |
desmatamento.prodes_geo()¶
PRODES data with geometry (polygons). Returns a GeoDataFrame with a geometry column (MultiPolygon EPSG:4326).
Requires the optional dependency: pip install agrobr[geo]
import agrobr
gdf = await agrobr.desmatamento.prodes_geo(
bioma="Cerrado",
ano=2022,
uf="MT",
)
# Geospatial join with CAR/SICAR
import geopandas as gpd
car = gpd.read_file("imoveis_car.geojson")
desmatamento_em_car = gpd.sjoin(gdf, car)
Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
bioma |
str |
No | Biome: "Amazonia", "Cerrado", "Caatinga", "Mata Atlantica", "Pantanal", "Pampa". Default: "Cerrado" |
ano |
int |
No | Year (e.g. 2022). If None, all years |
uf |
str |
No | Filter by state (e.g. "MT") |
max_registros |
int \| None |
No | Cap on features read; default 10,000. None reads the whole selection |
tamanho_pagina |
int \| None |
No | Features per WFS page; default 100, maximum 500 |
return_meta |
bool |
No | If True, returns (GeoDataFrame, MetaInfo) |
Returned Columns¶
| Column | Type | Description |
|---|---|---|
ano |
int | Deforestation year |
uf |
str | State code (e.g. "MT") |
classe |
str | Coverage class (e.g. "desmatamento") |
area_km2 |
float | Deforested area in km2 |
satelite |
str | Satellite used |
sensor |
str | Satellite sensor |
bioma |
str | Queried biome |
geometry |
geometry | MultiPolygon EPSG:4326 |
Each row is one published feature, with the same 20 columns as prodes() plus geometry.
Notes¶
- Default
max_registros=10000, in pages oftamanho_pagina=100; use filters (uf, ano) ormax_registros=None - If
max_registroscuts the selection, aUserWarningreports the WFS total and the number returned - The geometry column in GeoServer is
geomfor all 6 biomes (uniform)
desmatamento.deter()¶
Near real-time daily deforestation alerts.
import agrobr
df = await agrobr.desmatamento.deter(
bioma="Amazônia",
uf="PA",
inicio="2024-01-01",
fim="2024-06-30",
)
Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
bioma |
str |
No | Biome: "Amazonia", "Cerrado". Default: "Amazonia" |
uf |
str |
No | Filter by state (e.g. "PA") |
inicio |
str, date or datetime |
No | Start date: date, datetime (the time is dropped) or text YYYY-MM-DD or DD/MM/YYYY |
fim |
str, date or datetime |
No | End date, in the same formats; before inicio raises InvalidParameterError |
classe |
str |
No | Filter by alert class |
max_registros |
int \| None |
No | Cap on features read; default 50,000. None reads the whole selection. If the cap cuts the selection, a UserWarning reports the WFS total and the number returned |
tamanho_pagina |
int \| None |
No | Features per WFS page; default 500, maximum 2,000 |
as_polars |
bool |
No | Return as polars.DataFrame |
return_meta |
bool |
No | If True, returns (DataFrame, MetaInfo) |
Returned Columns¶
| Column | Type | Description |
|---|---|---|
data |
date | Alert date |
classe |
str | Alert type (DESMATAMENTO_CR, DEGRADACAO, MINERACAO, etc.) |
uf |
str | State code |
municipio |
str | Municipality name |
municipio_id |
str | IBGE municipality code as published (text; null in DETER Cerrado) |
area_km2 |
float | Area in km2 |
satelite |
str | Satellite used |
sensor |
str | Satellite sensor |
bioma |
str | Queried biome |
Each row is one published feature. Besides these, the output carries feature_id, gid, uf_original, quadrant, path_row, areauckm, uc, publish_month, created_date and areatotalkm (19 columns, desmatamento_deter_feicoes 2.0 contract). uf is null when the published state is not recognized; the original text is kept in uf_original.
DETER Classes¶
| Class | Description |
|---|---|
DESMATAMENTO_CR |
Clear-cut deforestation |
DESMATAMENTO_VEG |
Deforestation with secondary vegetation |
DEGRADACAO |
Forest degradation |
MINERACAO |
Mining activity |
CICATRIZ_DE_QUEIMADA |
Burn scar |
CS_DESORDENADO |
Disordered selective logging |
CS_GEOMETRICO |
Geometric selective logging |
desmatamento.deter_geo()¶
DETER alerts with geometry (polygons). Returns a GeoDataFrame with a geometry column (MultiPolygon EPSG:4326).
Requires the optional dependency: pip install agrobr[geo]
import agrobr
gdf = await agrobr.desmatamento.deter_geo(
bioma="Amazônia",
uf="PA",
inicio="2024-01-01",
fim="2024-06-30",
)
# Geospatial join with the CAR rural properties (SICAR, also in EPSG:4326).
# SICAR provides the property boundary (type IRU, AST or PCT), not the legal reserve.
import geopandas as gpd
imoveis = await agrobr.alt.sicar.imoveis_geo(
"PA", municipio="Altamira", tipo="IRU", max_registros=None
)
alertas_em_imoveis = gpd.sjoin(gdf, imoveis[["cod_imovel", "geometry"]], predicate="intersects")
Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
bioma |
str |
No | Biome: "Amazonia", "Cerrado". Default: "Amazonia" |
uf |
str |
No | Filter by state (e.g. "PA") |
inicio |
str, date or datetime |
No | Start date: date, datetime (the time is dropped) or text YYYY-MM-DD or DD/MM/YYYY |
fim |
str, date or datetime |
No | End date, in the same formats; before inicio raises InvalidParameterError |
classe |
str |
No | Filter by alert class |
max_registros |
int \| None |
No | Cap on features read; default 10,000. None reads the whole selection |
tamanho_pagina |
int \| None |
No | Features per WFS page; default 100, maximum 500 |
return_meta |
bool |
No | If True, returns (GeoDataFrame, MetaInfo) |
Returned Columns¶
| Column | Type | Description |
|---|---|---|
data |
date | Alert date |
classe |
str | Alert type (DESMATAMENTO_CR, DEGRADACAO, MINERACAO, etc.) |
uf |
str | State code |
municipio |
str | Municipality name |
municipio_id |
str | IBGE municipality code as published (text; null in DETER Cerrado) |
area_km2 |
float | Area in km2 |
satelite |
str | Satellite used |
sensor |
str | Satellite sensor |
bioma |
str | Queried biome |
geometry |
geometry | MultiPolygon EPSG:4326 |
Each row is one published feature, with the same 19 columns as deter() plus geometry.
Notes¶
- Default
max_registros=10000, in pages oftamanho_pagina=100; use filters (uf, inicio/fim, classe) ormax_registros=None - If
max_registroscuts the selection, aUserWarningreports the WFS total and the number returned - Approximate volume: ~1.1 KB per feature with geometry
Synchronous Usage¶
from agrobr import sync
df = sync.desmatamento.prodes(bioma="Cerrado", ano=2022, uf="MT")
gdf_prodes = sync.desmatamento.prodes_geo(bioma="Cerrado", ano=2022, uf="MT")
df_deter = sync.desmatamento.deter(bioma="Amazônia", uf="PA", inicio="2024-01-01")
gdf = sync.desmatamento.deter_geo(bioma="Amazônia", uf="PA", inicio="2024-01-01")
Data Source¶
- PRODES: Satellite Monitoring Program for the Amazon Forest and other Brazilian Biomes
- DETER: Near Real-Time Deforestation Detection System
- Provider: INPE — National Institute for Space Research
- API: TerraBrasilis GeoServer (WFS)
- License: CC BY-SA 4.0 (INPE), classified as
livre: commercial use allowed with attribution to INPE; shared adaptations follow ShareAlike. See Licenses