Project: Miraqua – Smart Water Optimizer

About the Project

Miraqua is a smart irrigation platform designed to help farmers make data-driven decisions about when and how much to water their crops. It delivers a personalized 5-day watering schedule based on crop type, soil conditions, and weather forecasts—helping reduce water waste and optimize irrigation efficiency.

What Inspired Us

We were inspired by the growing water crisis in agriculture, especially in drought-prone regions like California’s Central Valley. Farmers often rely on gut instinct or outdated methods to irrigate, which leads to either under-watering or massive water waste. We wanted to build something practical, scalable, and grounded in science that could support both small family farms and larger operations.

How We Built It

We developed a custom backend in Python using Flask, powered by:

  • Live weather and soil moisture forecasts via the Open-Meteo API
  • A trained machine learning model using UC Merced agricultural data
  • Scientific evapotranspiration equations for accuracy
  • A front-end interface that collects user input and presents a clean 5-day plan

We used pandas to organize and process forecast data, looping over each day to calculate evapotranspiration, adjust for crop type, subtract rain and applied water, and output daily water needs in liters.

Challenges We Faced

  • Combining two distinct approaches: a real-time algorithm based on farmer inputs (e.g., soil moisture, rainfall, root depth), and a machine learning model we developed using UC Merced's research data on crop water usage across California from 1998 to 2015.
  • The ML model requires access to historical weather data daily, which can only be reliably provided through specific subscription-based APIs—not yet fully integrated into the system
  • Ensuring consistency between the algorithmic logic and ML predictions to produce accurate and reliable irrigation recommendations
  • At present, only the algorithmic method is active; the ML model is intended for future use when paired with sensor data and automated logging for full system autonomy
  • Refining water usage formulas to reflect realistic, region-specific needs while minimizing overwatering
  • Creating robust fallback logic for incomplete inputs, such as when users don’t know their crop’s root depth or lack rain gauge data
  • Designing a dynamic user interface that adapts to the level of information the farmer provides—showing or hiding form fields as needed

What We Learned

  • How to use real environmental science in code, especially evapotranspiration and crop coefficients
  • How to structure and train a predictive model for water usage
  • How to connect machine learning, APIs, and user input into a functioning full-stack tool
  • The real-world challenges farmers face—and how important simple, actionable tools are

Built With

Share this project:

Updates