StackMoth/Work/Rainfall tracker
Public tool
Coordinate-matched rainfall against measured river levels
A public tool for Sri Lanka's monitored river systems, pairing modelled rainfall with the river levels actually measured at gauges. I designed and built this one end to end.
- Type
- Public, no account required
- Stack
- Vanilla JavaScript, Leaflet, Node.js
- Data
- Generated and validated by a Node pipeline
- Dependencies
- One, vendored locally
- Hosting
- Cloudflare Pages
Rainfall alone does not tell you much
Modelled rainfall is widely available and river gauge readings are published separately, but the two are only useful together, and only once each gauge has been matched to the coordinates the rainfall model actually covers. That matching is the work. The interface then shows the pair side by side for a chosen gauge and period.
The pipeline validates its own output
Generating the data and trusting the data are separate steps, on purpose.
Separate commands generate the river level and river map datasets, and separate validators check them. Both validators are gates rather than advisories, and a single verify command chains the test suite and both of them, so bad data cannot reach the published site just because generation exited zero.
No framework, one dependency
The interface is vanilla JavaScript. Leaflet is the only runtime dependency and it is vendored into the repository rather than pulled from a CDN, so the tool does not break when someone else's hosting does, and it makes no third-party requests on behalf of the people using it.
Next case study
Reservation platform