All projects

A small experiment: can a tiny LSTM forecast local temperature 24h ahead?

PythonPyTorchLSTMGitHub ActionsOpen-Meteo
Temp Agent

Temp Agent is a weekend experiment in DIY weather forecasting. A GitHub Actions workflow pings Open-Meteo every 30 minutes, appends the current temperature to a JSON log, and commits the chart back to the repo. Months of half-hourly data later, there's a clean dataset to train on.

On top of that I trained a small LSTM (and a few alternates: GRU, MLP, TCN, an ensemble) to predict the next 24 hours of temperature from the last 48. Each model learns the residual against a persistence baseline, so it actually has to beat "tomorrow looks like today" to be worth anything.

It's not a serious forecaster (val RMSE around 1.9°C, which real numerical models embarrass), but it's a fun end-to-end loop: cron-driven collection, training, validation, live inference, and a dashboard, all from a laptop.

Temp Agent

Live, self-collecting dataset

GitHub Actions can't run sub-hourly cron reliably, so an external scheduler pings the workflow every 30 minutes. Each tick fetches Open-Meteo, appends to weather.json, regenerates the chart, and commits the result back to main. The dataset grows itself.

Temp Agent

Model architecture

A 2-layer LSTM with hidden size 128 and 0.2 dropout takes 48 hours of features and predicts the residual against persistence for the next 24 hours. The network is visualized as input features → LSTM 1 → LSTM 2 → 24h output, with line-thickness scaled by activation magnitude.

Temp Agent

Model showdown

Every architecture (LSTM, GRU, MLP, TCN, ensemble) is trained on the same data and ranked side-by-side on val RMSE, val MAE, train RMSE, and overfit ratio. The ensemble usually wins on RMSE; MLP wins on parameter efficiency. Sortable by any column.

Temp Agent

Click anywhere to predict from there

The dashboard lets you drop an anchor on any point in recorded history and watch every model forecast forward from that moment, overlaid on the actual recorded values that came after. Useful for eyeballing where each model gets fooled: overnight troughs, weather-front transitions, that kind of thing.

Live data

Right now over the agent

Loading…