7 Combined Visualization

Step 7: Combined Visualization

A presentational step: it re-reads the processed task (GET /ingestions/assets/{{process_task_id}}?include=normalised_data,assessments), fans out to the location and metric endpoints for the same task, and renders two HTML views in Bruno's Visualize tab — a compliance summary table and a map. No new server state is created.

What this step does

It stitches together everything the earlier steps produced into a single human-readable dashboard. In one pass it fetches the task's facilities, sheds, plots, and plot-deforestation metrics; when facilities exist it also pulls facility-level deforestation + emissions and builds the facility→shed→plot groupings for drill-down cards. It then keys every metric to its location by location_id and calls bru.visualize('html', …) twice: once for the summary/table page, once for the map. The same code path handles facility, shed, and plot uploads — plot-only uploads simply render without the facility cards.

Why it's needed

The individual confirmation reads (steps 6/6a–6e) each return one slice of the picture as raw JSON. This step exists to compose those slices into the view a person actually wants — locations on a map, metrics joined to them, a compliance summary — without hand-joining several API responses. It's the "did this upload land correctly, at a glance?" checkpoint.

When you can skip it

Purely optional and purely presentational — nothing downstream depends on it. Skip it entirely if you're driving the API programmatically and only need the JSON from the confirmation reads; run it when you want a quick visual sanity-check of the finished upload. It reuses {{process_task_id}} from the processing step, so it only renders once metric processing has completed.