Weather exploratory analysis
Checking an Analysis Against Its Own Generator
A weather analysis that checks itself.
- Role
- Author
- Classification
- Synthetic demonstration
Problem
Charts of synthetic data look like findings.
How it was solved
I compared what the analysis recovered with what was planted.
- Generate
- Analyse
- Compare
Result
0.09 °C
largest error across six cities
Built with
- Python
- pandas
- matplotlib
- seaborn
Synthetic demonstration / Exploratory analysis
Every number in this project was generated, so nothing it finds is evidence about weather. What can an exploratory analysis of invented data honestly be held to - and what does it catch when you do?
Temperature, set against recoveredwithin 0.09 °C
Invented data, and the one thing it can still be checked against
This diagram in words
- Seeded generator source — 21,900 daily records for six cities, at a fixed seed.
- Seasons reversed process — For the southern cities - applied in the generator and again in the comparison.
- Per-city summary store — Tracked as an artefact rather than printed and lost.pandas
- Four figure families artifact — Distributions, seasonal comparisons, exceedance curves, correlations.matplotlib · seaborn
- Recovered against configured gate — Every statistic compared with the number it was generated from.NumPy
- What the check caught artifact — Temperature scatters around zero. Humidity misses the same way in every city.
Read the full background
Problem
Why this work exists
An exploratory analysis of synthetic data is easy to present and hard to justify. Every chart looks like a finding and none of them is one, because the patterns were put there on purpose. The question worth answering is what such a project can be held to at all.
Contribution
What I can claim
Built the generator and the analysis, then used one against the other. Because the configured parameters are in source and the summary statistics are a tracked artefact, every recovered value has something to be wrong about - which turns a gallery of plots into a check that can fail.
Method
What an analysis of invented data can be held to
Everything in this dataset was put there on purpose, so every pattern in it is a pattern someone chose.
Temperature lands within 0.09 °C of the figure it was set to, either side of zero. Humidity misses high in all 6 cities, by 2.20 to 2.53 points — one sign, one size, which is the generator rather than chance. None of it is weather.
Configure
Each city is a handful of parameters: a base temperature, a seasonal swing, a precipitation scale, a humidity level.
Generate
Ten years of daily observations follow from those parameters at a fixed seed.
Explore
The exploratory pass does what such a pass does: distributions, seasonal comparisons, exceedance curves, correlations.
Recover
So each summary statistic is put beside the parameter that produced it.
Catch
Humidity does not come back.
What this does not show
None of this is weather. The dataset, the findings and the figures are produced by a seeded generator and are not station observations, climate evidence, forecasts, or a basis for any operational, scientific or policy decision. The humidity offset is a fact about the generator and of no consequence outside it; it is shown because it demonstrates that the check is capable of failing.
How it was built
System
Workflow and decisions
Two modules: a seeded generator with per-city temperature, amplitude, precipitation and humidity parameters, and one exploratory pass that writes 12 figures plus a per-city summary table. The summary is tracked, which is what makes the configuration-versus-recovery comparison possible from outside the repository.
- 1Generate 21,900 daily records for 6 cities at seed 42
- 2Reverse the seasons for the southern-hemisphere cities
- 3Summarise per city and track the result as an artefact
- 4distributions and a monthly temperature heatmap per city
- 5seasonal comparisons, with the southern hemisphere reversed
- 6precipitation exceedance curves
- 7a correlation matrix and pairwise scatter
- 8Compare every recovered statistic with the value it was configured with
- Python
- pandas
- NumPy
- matplotlib
- seaborn
Evidence
What is actually versioned
Across all 6 cities the mean daily temperature in the tracked summary lands within 0.09 degrees of the base temperature the generator was configured with, scattered either side of it. The recovered spread also ranks the cities in exactly the configured order of seasonal amplitude. Both are statements about the generator, not about any city.
Every one of the six cities recovers a mean humidity above its configured base, by a similar amount each time. One sign and one size across six independent cities is a property of how the generator builds humidity rather than sampling noise, and it is the only thing in this project that nobody put there deliberately.
10 years of daily values from 2014-01-01 to 2023-12-29, produced at a fixed seed. The repository states that the dataset, findings and figures are not weather-station observations, climate evidence, forecasts, or a basis for operational, scientific or policy decisions.
How the work is checked
Quality controls
How the work is checked
- The configured parameters live in source and the summary statistics are committed, so the comparison on this page is computed from both rather than asserted
- Southern-hemisphere cities have their seasons reversed in the generator, so a seasonal plot is not quietly wrong for two of the six
- The README puts the synthetic-data warning in its first lines, and repeats that city-level conclusions describe configured distributions rather than measured climates
- The figures are regenerated from the tracked artefact rather than pasted, so a changed run changes what is shown
Limitations
Where the evidence stops
- There is no weather here. A generator that is recovered accurately has demonstrated that the analysis is correct, not that anything is true
- The humidity offset is a finding about the generator's own construction. It is interesting as a demonstration that the check works, and it is of no consequence to anyone
- Six cities at one seed. Nothing here is repeated across seeds, so the comparison is a single observation rather than a distribution
- The features are illustrative. They carry real units, which makes the plots readable and makes it correspondingly easy to misread them as measurements
What this changed in my practice
What this changed in my practice
A synthetic dataset is usually treated as a reason to lower the standard. It is the opposite: because the answer is in the repository, the analysis is one of the few that can actually be marked. Doing that turned up an offset in every city in the same direction, which no amount of looking at the twelve plots had shown me.