The problem
Farmers, logistics teams and event planners don’t need tomorrow’s forecast so much as next week’s. Two questions: will it rain in exactly 7 days? and how many millimetres will fall over the next 3?
The data
Historical weather from the Open-Meteo API, with 50+ features: temperature, humidity, wind, cloud cover, soil moisture and more.
The approach
- A classification ensemble (CatBoost, XGBoost, LightGBM, Gradient Boosting, Gaussian NB) for rain or no rain, tuned for high recall, because a missed storm costs far more than a false alarm.
- A regression ensemble for 3-day cumulative precipitation.
- Time-based cross-validation so the models never see the future during training.
- A FastAPI service on Render (with Swagger docs) and a Streamlit app, both containerised with Docker.
The result
A working forecasting product with a public API other systems can call, and a clear lesson in choosing the metric that matches the cost of being wrong.
What I’d do next
Calibrate the probabilities and show forecast uncertainty in the app instead of a single number.