--:--
--
My Crafts Space
Ongoing

Jaldhara AI

Short-horizon flood anticipation for small river basins — buying downstream communities hours of warning.

hero shot — drop a product image here
TimelineOngoing
StackPythonPyTorchxarrayFastAPIDocker
Overview

Large flood models miss small, fast-rising basins. Jaldhara fuses local rain-gauge and upstream-level data into a light model that runs on modest hardware and pushes a simple rising / high / critical signal to the people downstream.

The challenge

National forecasts are coarse and slow for small tributaries where water rises in hours. The communities most at risk have the least infrastructure to run heavy models.

The constraint: run on a Raspberry-Pi-class box, tolerate missing sensor readings, and be understandable by a non-technical operator.

Approach

A compact temporal model ingests rolling gauge and upstream-level windows and outputs a three-level risk with a lead-time estimate.

Everything ships as one Docker image; a plain webhook fans the signal out to SMS and local sirens.

What I built

01

Edge-ready

Runs on a Pi-class box; no cloud dependency for the core forecast.

02

Gap-tolerant

Handles dropped sensor readings without silently failing.

03

Three-level signal

rising / high / critical with a lead-time estimate — no jargon.

04

Webhook fan-out

One signal drives SMS, dashboards and local sirens.

Under the hood

a slice of the core logic
forecast.pypy
1def risk(window: RollingWindow) -> Signal:2    # window = last 6h of gauge + upstream level, gaps imputed3    x = normalize(impute(window))4    p = model(x)                 # P(critical) in next 6h5    lead = estimate_lead(window) # hours until threshold6    level = ("critical" if p > .7 else7             "high"     if p > .4 else "rising")8    return Signal(level=level, lead_hours=lead, prob=p)

Screens

basin dashboard — level & risk over time
operator view — single risk signal

Results

~4hmedian lead time
Pi 4runs on-device
MITfully open source

Links & resources