6 Get Assets with Metrics
โถStep 6: Get Assets with Metrics
Retrieve the processed entity results. This is the base data for the combined visualization. Use steps 6aโ6d to fetch facilities, plots, and metrics data, then join them together for the full table and map view.
โถWhat this step does
It re-reads the entity rows for the task โ same shape as Step 3, now that
processing has completed โ with normalised_data and assessments
included. These entities are the spine of the visualization: the row
set you render in the table, onto which the location geometries (6a/6b)
and metric values (6c/6d) are joined.
โถWhy it's needed
The processed metrics live on separate resources (/metrics/*) and the
geometries on the locations endpoints โ none of them is the entity list
itself. This step fetches that entity list so the later joins have
something to attach to: each metric carries a facility_id / shed_id /
plot_id that matches back to these entities and their locations. It is
the base table the combined visualization builds on top of.
โถWhen you can skip it
If you only need the aggregate metrics or the map โ not a per-entity
table โ you can go straight to the locations and metrics reads (6aโ6e)
scoped by filter[assets.task_id]. Step 7's combined visualization
actually issues those reads for you, so this explicit call is mainly for
when you want the entity rows in hand yourself.
โถRequest
GET /ingestions/assets/:id?include=normalised_data,assessments
โถAdditional Endpoints for Visualization
To build the full visualization, call these endpoints with the same process_task_id:
| Step | Endpoint | Data |
|---|---|---|
| 6a | GET /locations/facilities?filter[assets.task_id]=eq:{id} | Facility polygons for map |
| 6b | GET /locations/plots?filter[assets.task_id]=eq:{id} | Plot polygons for map |
| 6c | GET /metrics/sheds/deforestation?filter[assets.task_id]=eq:{id} | Deforestation metrics |
| 6d | GET /metrics/sheds/emissions?filter[assets.task_id]=eq:{id} | Emissions metrics |
โถData Joining
- Fetch assets (this step), facilities (6a), plots (6b), deforestation (6c), emissions (6d)
- Metrics include
attributes.facility_id,attributes.shed_id, andattributes.plot_idfor joining - Match
attributes.facility_idto facility IDs from location endpoints - Metric ID format:
{shed_id}:{monitoring_end_date} - Each resource includes
linksfor direct navigation to related resources
โถCombined Assets Table
| Column | Source |
|---|---|
| Name | normalised_data.normalized_name |
| Location | normalised_data.normalized_country + lat/lng |
| Commodity | normalised_data.commodity_type |
| Confidence | validation.confidence_level |
| Deforestation Risk | noncompliance_area / area from deforestation metrics |
| Forest Area (ha) | forest_area from deforestation metrics |
| LUC Emissions | luc from emissions metrics |
| Non-LUC Emissions | nonluc from emissions metrics |
โถNext Step
โ Step 7: Combined Visualization (chains 6aโ6d automatically)