David H. Simangunsong
Back to Dashboard

Riau fire and deforestation analytics warehouse

A PostgreSQL warehouse and Metabase dashboard for fire and forest loss pressure across Riau's twelve regencies, built entirely in SQL and demonstrated on a synthetic sample.

Year
2025
Study area
Riau province
Methods
Data warehousingSQL analyticsDashboard design
Stack
PostgreSQLSQLMetabaseDockerPython
Fire and forest loss dashboard for the twelve regencies of Riau
  • 12Regencies covered by every view
  • 7Analytical SQL views the dashboard reads, all rebuilt on each load
  • 1 commandBrings up the warehouse and the dashboard with Docker

Purpose

A district fire task force or a plantation sustainability team usually needs a dashboard it can keep running after the consultant leaves, not a one-off notebook. This project builds that toolchain for a problem Riau lives with every dry season: peat fire, haze, and the link between fire and forest loss.

Questions it answers

The views are written to answer the questions a fire coordinator asks at the start of each season. Where and when are fires concentrated across the twelve regencies? How sharp is the July to September dry season peak? Do fire counts follow annual tree cover loss in each regency? Which regencies carry the most high confidence detections, and how do day and night detections compare, since persistent night detections are a sign of smouldering peat?

How it would be used

With real FIRMS detections loaded each morning, the regency ranking becomes a patrol list: the regencies with the most high confidence detections in the last week, and the ones where night detections are rising, get attention first. The monthly view shows whether this season is running ahead of earlier ones, which is the signal to raise the alert level before smoke reaches the cities. The fire and forest loss view helps a company or a district office see where burning keeps coinciding with clearing.

Design

The whole pipeline is SQL: schema, loading, cleaning, regency assignment and every analytical view. Metabase only reads the views.

Loads are idempotent. Fire detections have a natural unique key and insert with ON CONFLICT DO NOTHING, and forest loss upserts, so reloading never duplicates rows. Views rather than materialised tables keep the dashboard current with the latest load, and they can become materialised views if volume grows. A downloader pulls real detections from the FIRMS area API for any date range, and the same scripts reload them.

Interactive

Synthetic analytics workspace

Self contained HTML, served from this site 1.6 MB

Open in a new tab

Limitations

What these results should not be used for.

  1. The data behind the dashboard today is a synthetic sample generated by the project, so no chart shows what happened in Riau. Real findings require loading FIRMS detections with a free API key.
  2. Detections are assigned to the regency with the nearest centroid inside a rectangle that also covers parts of neighbouring provinces. Real use needs regency polygons and PostGIS point in polygon.