6c Get Deforestation Metrics
โถStep 6c: Get Deforestation Metrics
Retrieve deforestation metrics for all facilities in the task.
Join these to the assets table and map tooltips by attributes.facility_id.
โถWhat this step does
It reads the per-shed deforestation results computed in Step 4 from
/metrics/sheds/deforestation, scoped by filter[assets.task_id]. Each
metric carries the risk figures โ noncompliance_area, forest_area,
annual_defor, area โ and an attributes.facility_id for joining back
to the facilities from Step 6a.
โถWhy it's needed
The facilities from 6a are just geometry and identity; the deforestation
risk that colours them and populates their tooltips lives on this
separate metric resource. This read is what turns the map from a set of
grey polygons into a risk view โ join facility_id to the facility ids
and derive the risk ratio (noncompliance_area / area). Without it there
are no deforestation values to display.
โถRequest
GET /metrics/sheds/deforestation?filter[assets.task_id]=eq:{process-task-id}
Query parameters:
| Parameter | Description |
|---|---|
filter[assets.task_id] | Process task ID from Step 4 |
filter[commodity] | Filter by commodity type |
filter[country_code] | Filter by country code |
page[number] | Page number |
page[size] | Items per page |
โถData Joining
- Match
attributes.facility_idto facility IDs from Step 6a - Metric ID format:
{shed_id}:{monitoring_end_date} - Use
links.facilityto navigate directly to the related facility
โถAssets Table Columns
| Column | Source | Description |
|---|---|---|
| Deforestation Risk | noncompliance_area / area | Risk ratio (0โ1) |
| Forest Area (ha) | forest_area | Total forest area in hectares |
| Annual Deforestation | annual_defor | Annual deforestation rate |
โถMap Tooltip Data
noncompliance_area: Non-compliant area in hectaresforest_area: Forest area in hectaresagreement: Model agreement scorearea: Total analyzed area in hectares