Data Engineering & Systems
DataFlow MW
National Survey Data Pipeline & Agricultural Feature Store
Problem
Malawi national agricultural survey datasets (NSO IHS microdata) are distributed across fragmented, high-dimensional CSVs with non-standardized crop volume units, missing geospatial tags, and survey reporting anomalies. Manually cleaning this data for regional yield models introduces severe training/serving skew and data leakage.
Solution
Engineered an end-to-end data pipeline implementing schema validation with Great Expectations, automated anomaly filtering, standardized crop yield conversions (kg/hectare normalization for smallholder plots), and automated district aggregation feeding a structured PostgreSQL feature store.
Architecture
Ingestion layer extracts raw IHS microdata; validation engine applies schema contracts and unit conversions; transformation engine (Polars) computes district-level agricultural aggregates; feature store serves structured tensors and tabular features for ML training via FastAPI.
Real-World Impact
Standardized 5,000+ smallholder survey records across 28 Malawi districts with zero schema discrepancies, directly providing clean feature representations that improved downstream holdout model R2 from 0.76 to 0.89.
Challenges Faced
Resolving non-standardized local metric units across rural districts without losing statistical variance; optimizing aggregation joins over millions of microdata rows in memory.
Key Learnings
Production data validation principles, data contract enforcement, schema versioning, and eliminating the silent failures that occur when dirty data enters ML training pipelines.