# Ping River Live Monitor

> Live water levels, discharge, rainfall and machine-learning flood forecasts for
> the Ping River basin in Northern Thailand, centered on Chiang Mai (gauge P.1,
> Nawarat Bridge). Open-source, hourly data since 2018, operated by B4L
> (https://buildfor.life).

Flood context: Chiang Mai city flooding begins when P.1 reaches 3.70 m
(official inundation stage 1); the record peak was 5.30 m on 2024-10-05.

## Data

- Hourly water level (m) and discharge (m³/s) from 16 Royal Irrigation
  Department (RID) telemetry gauges in the Ping basin, 2018-present.
- Hourly rainfall and water level for 400+ ThaiWater/HII stations (Ping basin),
  including historical water levels back to 2019.
- ML flood-risk forecasts (probability of warning/danger level within 6/12/24 h)
  per station, plus Chiang Mai inundation-stage probabilities.

## API (no key required)

- https://water.buildfor.life/docs : interactive OpenAPI reference
- /stations : station metadata (code, names, coordinates)
- /measurements/latest?limit=N : latest readings
- /measurements/history/{station_code}?hours=N or ?start=YYYY-MM-DD&end=YYYY-MM-DD : history
- /forecast : flood-risk forecasts for all stations
- /api/stats : database coverage statistics
- /api/hii/rainfall/latest : latest rainfall per ThaiWater/HII station
- /api/hii/waterlevel/latest : latest water level per ThaiWater/HII station (m MSL)

## Source

- https://git.b4l.co.th/B4L/Northern-Thailand-Ping-River-Monitor : code, docs,
  and the full data-source catalog (docs/DATA_SOURCES.md).
