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