<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Abdullah Bin Masood</title>
    <description>The latest articles on DEV Community by Abdullah Bin Masood (@abdullahbinmasood702).</description>
    <link>https://dev.to/abdullahbinmasood702</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4135938%2F958826f8-88be-48b3-a8b6-99803231da27.png</url>
      <title>DEV Community: Abdullah Bin Masood</title>
      <link>https://dev.to/abdullahbinmasood702</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abdullahbinmasood702"/>
    <language>en</language>
    <item>
      <title>I Tracked Weather Forecasts for 3 Weeks to See How Wrong They Really Are</title>
      <dc:creator>Abdullah Bin Masood</dc:creator>
      <pubDate>Fri, 09 Oct 2026 07:21:34 +0000</pubDate>
      <link>https://dev.to/abdullahbinmasood702/i-tracked-weather-forecasts-for-3-weeks-to-see-how-wrong-they-really-are-35id</link>
      <guid>https://dev.to/abdullahbinmasood702/i-tracked-weather-forecasts-for-3-weeks-to-see-how-wrong-they-really-are-35id</guid>
      <description>&lt;h2&gt;
  
  
  The idea
&lt;/h2&gt;

&lt;p&gt;Weather apps show a 7-day forecast like it's a fact. But how accurate is day 7, really, compared to tomorrow's forecast? I wanted real numbers, not a guess, so I built a small pipeline to find out — and to practice the kind of end-to-end data work I want to do professionally.&lt;/p&gt;

&lt;p&gt;The plan: collect daily weather forecasts for several cities, wait for the real weather to happen, compare the two, and see what patterns show up.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;Open-Meteo API --&amp;gt; GitHub Actions (daily) --&amp;gt; Neon Postgres --&amp;gt; Python analysis --&amp;gt; Streamlit dashboard&lt;/p&gt;

&lt;p&gt;Every day, a GitHub Actions workflow runs on a schedule and does two things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Pulls a fresh 8-day forecast (today + 7 days ahead) for three cities — Islamabad, London, and New York — and saves it to a Postgres database (Neon).&lt;/li&gt;
&lt;li&gt;Checks which older forecasts now have real weather to compare against, using Open-Meteo's historical archive, and saves those actual values too.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A SQL view joins the two, so every forecast is automatically paired with what actually happened on that date, once it's available. (The "actual" values are ERA5 reanalysis data — a model blended with real observations — not a station reading, which is worth being upfront about.)&lt;/p&gt;

&lt;p&gt;Everything runs on free tiers: Open-Meteo needs no API key, Neon's free Postgres is plenty for this volume (about 24 rows a day), and GitHub Actions' free scheduler runs the collector without a server.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I found, after 3 weeks and 324 scored forecasts
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Accuracy drops the further out you look — but not evenly.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Same-day forecasts were off by 0.58°C on average. By 7 days out, that grew to roughly 1.5–2.0°C. Expected, but it was useful to see exactly how much worse, and that the growth wasn't perfectly linear — day 7 actually came in slightly better than day 6 in this sample, which (with only 30 rows at that lead time) looks more like noise than a real effect.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Location matters as much as lead time.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I didn't expect this one to be so stark. 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). A forecast "7 days out" doesn't mean the same thing in every city.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Rain predictions degrade too.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The forecast correctly called rain-or-no-rain 90% of the time same-day, dropping to around 70% by day 6–7.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. A simple model beat a naive baseline — but not the ones I expected.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;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, using a time-based train/test split (no shuffling — this is time series data, so the test set has to be later in time than the training set).&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Test MAE (°C)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Ridge regression&lt;/td&gt;
&lt;td&gt;0.495&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Random Forest&lt;/td&gt;
&lt;td&gt;0.670&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gradient Boosting&lt;/td&gt;
&lt;td&gt;0.676&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Baseline&lt;/td&gt;
&lt;td&gt;0.692&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Ridge won by about 28%. The tree-based models didn't beat the baseline — my guess is 261 training rows just isn't enough data for them to find an edge over a simple linear model. I'd expect that to change as more data accumulates.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd do differently
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Start collecting more cities from day one. Three is enough to see a pattern, not enough to generalize.&lt;/li&gt;
&lt;li&gt;Log a few more weather variables (humidity, pressure) — they might explain some of the city-to-city gap.&lt;/li&gt;
&lt;li&gt;The free hosting has real limits worth knowing before you rely on it: Streamlit Cloud and Neon both sleep when idle, so the first load after inactivity is slow.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;The dashboard is live: &lt;a href="https://forecast-tracker.streamlit.app" rel="noopener noreferrer"&gt;forecast-tracker.streamlit.app&lt;/a&gt;&lt;br&gt;
Code is on GitHub: &lt;a href="https://github.com/abdullahbinmasood702/forecast-tracker" rel="noopener noreferrer"&gt;github.com/abdullahbinmasood702/forecast-tracker&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's still running and collecting data daily, so the numbers above will keep shifting as more weeks come in.&lt;/p&gt;

</description>
      <category>api</category>
      <category>automation</category>
      <category>data</category>
      <category>python</category>
    </item>
  </channel>
</rss>
