# ecoTrace biogas-sensor pilot, Kiambu County, Kenya
Sensor telemetry, reference measurements and de-identified household survey from
a household-biogas monitoring pilot on the ABPL digester fleet in Kiambu County,
Kenya, together with the code that derives corrected flow and gas composition
from the raw device output.
**22 devices · 2,975 device-days · 5,499,810 rows · 2026-01-27 to 2026-07-19**
This repository is the **dataset and its derivation code, released together under
one licence**. Analysis and figure code for the papers lives in separate
repositories (see Related work).
## Quick start
```bash
pip install -r requirements.txt
python3 src/derive.py # raw Parquet -> data/derived_data/, ~15 s
python3 -m pytest src/test_sensor_correction.py
```
## Layout
```
data/
raw_data/SN_*/YYYY-MM-DD.parquet archival device telemetry (207 MB)
derived_data/ state-0 rows with corrected flow and composition;
regenerated by src/derive.py, not committed
metadata/ device inventory, state codes, calibration card
biogas_composition.json reference gas-composition spot measurements
survey.csv de-identified household survey (n = 20)
docs/field_correction.md the correction method and its limits
src/ derivation code and tests
```
Every directory has its own README describing its contents, units and limits.
Start with `data/README.md`.
## The field correction: read this before using the data
The deployed firmware crossed the two thermistor ADC channels. In the raw files
**`powerC` holds the FLOW thermistor and `powerF` holds the COMP thermistor**,
the opposite of what the names say. As a result the firmware's `flow` column is
magnitude-wrong and its `comp` column is inverted. No over-the-air update was
possible, so the fix is applied in post-processing.
`src/derive.py` keeps only rows in device state 0 (see below), undoes the swap
and recom …