Real-Time Powdery Mildew Detection for Vineyard Microclimates
Helped ship a production pipeline that runs UC Davis's powdery mildew risk model per vine, every 15 minutes. My piece: the Python algorithm on AWS Lambda, feeding the React Native iOS app that vineyard owners use in the field.

The Story
The Powdery Mildew risk model from UC Davis was published in the 1960s. It's elegant but historically expensive to compute at field scale โ for decades it was calculated regionally using weather stations. Computing it per vine block became feasible only when sensor and cloud-compute costs collapsed 60 years later. Grape.ag was the first platform to do it.


What I Built
During my internship at Grape.ag (August 2020 โ April 2021) I implemented the UC Davis algorithm in Python. The script ran every 15 minutes on AWS Lambda, ingesting live sensor data and populating the React Native iOS app that vineyard owners carried into the field.
Powdery Mildew risk is elevated when daily mean temperature > 10ยฐC AND mean relative humidity has been > 85% for 10 consecutive days.
The Algorithm
- โIngest raw sensor readings (timestamp, temperature, humidity, sensor_id) from CSV exports
- โBucket into daily windows per sensor using pandas groupby
- โCompute daily mean temperature โ flag if > 10ยฐC
- โCompute rolling 10-day mean humidity โ flag if > 85%
- โJoin conditions into a per-sensor, per-day risk table

Impact
- โ~20% improvement in crop protection efficiency (per team measurement)
- โShipped to App Store, currently v2.1.0 โ still live and actively maintained in 2026
- โAlso contributed 15% revenue growth through market analysis identifying opportunities in Southern Mexico