I Tracked Weather Forecasts for 3 Weeks to See How Wrong They Really Are
Описание и применение
Построена система сбора и сравнения прогнозов погоды с реальными данными, выявлены закономерности точности в зависимости от времени и города, а также показано, что простая линейная модель лучше простого базиса.
Задача
Weather apps present a 7‑day forecast as fact, but the accuracy of day‑7 predictions is unclear.
Результат
Accuracy drops with lead time, varies by city, and rain predictions degrade; Ridge regression outperforms a simple baseline in error prediction.
Рабочий процесс
- Pull 8‑day forecast for Islamabad, London, New York via Open‑Meteo API
- Store forecast in Neon Postgres
- Check historical archive for actual weather using Open‑Meteo historical API
- Store actual values in database
- Create SQL view joining forecast and actual
- Run Python analysis to compute errors and build models
- Display results on Streamlit dashboard
Доказательства
Open‑Meteo API --> GitHub Actions (daily) --> Neon Postgres --> Python analysis --> Streamlit dashboard
Same‑day forecasts were off by 0.58°C on average. By 7 days out, that grew to roughly 1.5–2.0°C.
New York's forecasts were consistently the least accurate — close to double Islamabad's error at most lead times (3.22°C vs 1.35°C at day 6).
I tried to predict how wrong a forecast would be, using lead time and the forecast's own values as features. I compared a plain average-by-lead-time baseline against Ridge regression, Random Forest, and Gradient Boosting... Ridge won by about 28%.
- Дата записи: 2026-10-09T08:55:54.385Z