6e Get Plot Deforestation Metrics
โถStep 6e: Get Plot Deforestation Metrics
Retrieve per-plot deforestation metrics for the asset ingestion task. This provides
noncompliance_area at the individual plot level, which is used to color-code
plots by compliance status on the map and compute the weighted risk score.
โถWhat this step does
It reads deforestation results at the plot grain from
/metrics/plots/deforestation, scoped by filter[assets.task_id]. Where
6c returns one aggregate figure per facility/shed, this returns one row
per plot, each keyed by attributes.plot_id for joining to the plot
geometries from Step 6b.
โถWhy it's needed
Facility-level deforestation (6c) tells you a supply shed's overall risk,
but colouring individual plots green/red on the map and flagging which
specific plots breach compliance requires the figure per plot โ that's
what this read supplies. It's also the plot-level input to the combined
risk score ((areaRatio * 0.7 + plotRatio * 0.3) * 100), so a plot is
treated as non-compliant when its noncompliance_area > 0.5 ha.
โถWhen you can skip it
Skip it when there are no plots to inspect at the plot level โ e.g. a facility-only summary view where the shed-level 6c figure is enough. For plot-heavy uploads it is the read that makes per-plot map colouring possible.
โถRequest
GET /metrics/plots/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 (default: 100) |
โถFrontend Usage
- Compliance status: A plot is non-compliant when
noncompliance_area > 0.5ha - Map coloring: Use per-plot metrics to color plot polygons (green/red/gray)
- Risk score: Combined with facility metrics using weighted formula
(areaRatio * 0.7 + plotRatio * 0.3) * 100 - Navigation: Use
attributes.plot_idto join metrics to plot geometries from Step 6b, or followlinks.plotdirectly