SAPTA · v0.1 · field-ready heuristic

Decide which pit to empty before the rain decides for you.

SAPTA scores rural pit latrines on groundwater-contamination risk and dispatches vacuum trucks under real capacity limits. Built for WASH teams in climate-stressed regions.

30 pits scored·10 dispatched·48h window·0.87 max priority
Hand-pump borehole on red-earth savanna at golden hour, Upper East Region of Ghana

Upper East Region · synthetic dataset v0.1

The problem

“A single contaminated well can sicken a village faster than any truck can reach it.”
01 · LEACH

Pit latrines sit meters from hand-pump wells. Pathogens migrate through sandy vadose soils long before anyone notices a foul taste.

02 · RAINFALL

A single 40 mm event can raise the water table and flush latrine contents toward the nearest aquifer overnight.

03 · CAPACITY

WASH teams have a handful of vacuum trucks for an entire district. Routing is done from memory, phone calls, and gut feel.

Vacuum trucks can service ≈ 10 pits / 48h. A district has hundreds.

The solution

A priority index, not a guess.

One number per pit. Deterministic, explainable, and tuned by people who have walked the routes.

01 · INPUT
Telemetry + Static Data

Fill level, rainfall forecasts, soil class, distance to nearest well, pit condition.

02 · SCORE
SaniFlowCore (0–1)

Deterministic, auditable scoring function. Six weighted factors collapsed to a single risk index per pit.

03 · ROUTE
Greedy Dispatch

Capacity-aware selection of top-N pits within the 48h service window, with truck distance constraints.

Diagram showing satellite telemetry feeding a scoring engine and a vacuum truck route

How it works

Six factors, one weighted score.

Each pit is reduced to a single value between 0 and 1. The dispatch engine reads only this number — but every number is traceable to its inputs.

Fill levelf / f_max
Closer to the brim, sooner overflow.
Rainfall (48h)1 − e^(−r/15)
Imminent precipitation amplifies leach risk.
Distance to wellexp(−d/30)
Proximity to drinking water raises urgency.
Soil leach classk_soil ∈ [0,1]
Sandy soils transmit pathogens faster than clay.
Vadose depth1 / (1 + z)
Thin unsaturated zone = shorter travel time.
Pit conditionc ∈ {0.5, 1}
Cracked liners short-circuit the calculus.

Note · v0.1

v0.1 is a calibrated heuristic — auditable, deterministic, hackathon-honest. v0.2 learns weights from labeled overflow events.

Live demo

From scores to routes.

The pipeline produces two artifacts a district WASH officer can actually open: priorities.csv ranked by risk, and an interactive map.html with the dispatch route already drawn.

No cloud login. No PowerBI license. Open the file, print the route, drive the truck.

Run it yourself
Stylized satellite map showing pit-latrine markers and a planned vacuum-truck route
map.html · 30 pits · route_v0.1
$ python -m sapta.run --config config/upper_east.yaml
[load]   pits=30  wells=12  rainfall=48h
[score]  SaniFlowCore  min=0.11  max=0.87
[dispatch] capacity=10 window=48h  selected=10
[write]  priorities.csv  map.html
✓ SAPTA pipeline complete in 2.4s.
Prototype IoT node on a workbench: PCB, antenna, ultrasonic sensor, LiPo battery, RTC module
Hardware by Padigo & team · in development

The IoT layer

Sensing the pit, surviving the network.

The node assumes the worst: weak signal, dropped power, no NTP. Each field is captured locally and buffered until the next successful uplink.

LEVEL
ultrasonic distance to scum line
POWER
battery voltage + current draw
LINK
RSSI, retry count, last-seen
TIME
RTC fallback when network is dark
UPLINK
WiFi / GSM toggle, store-and-forward

Impact

Public health under climate stress.

Equitable sanitation operations.

Built to be handed to a district WASH officer on Monday.

SDG 6 · SDG 13 · WASH · Climate Resilience

Team

Four people, one pipeline.

Portrait of Lansah

01 · Team Lead

Lansah

Owns ingestion, schemas, and reproducibility. Makes sure every score can be traced back to a row of source data.

Portrait of Abdulai Yorli Iddrisu

02 · ML Dev & Frontend Dev

Abdulai Yorli Iddrisu

Builds SaniFlowCore scoring and the dispatch engine. Owns the path from raw telemetry to a deployable map.

Portrait of Najat

03 · WASH Expert

Najat

Grounds the heuristic in real sanitation practice. Translates between district WASH officers and the model.

Portrait of Padigo

04 · IoT Engineer

Padigo

Designs the in-pit telemetry node — level, power, RTC, WiFi/GSM. Hardware that runs where the network doesn't.

Partner with us

Have pits to score, or data to share?

We're looking for district WASH partners, soil & hydrology datasets, and field-test sites for the IoT node.