← All work

07 / 08 · Forecasting · Nov 2025

Rain Forecaster

A web app that predicts whether it will rain a week from now.

At a glance
50+
weather signals used per prediction
5
models in the ensemble
2
tasks: classify + regress

Built with

CatBoost · XGBoost · LightGBM · FastAPI · Streamlit · Docker · Render · Open-Meteo

Task A · classification

Will it rain in exactly 7 days?

CatBoostXGBoostLightGBMGradBoostGaussianNB

ensemble · tuned for recall

Task B · regression

How many mm over the next 3 days?

ensemble regressor

50+ features · Open-Meteo · time-based CV · FastAPI on Render · Streamlit

Case study

Ensemble models that predict whether it will rain in 7 days and how much will fall over the next 3, served through a live API and web app.

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.