Project 2 of 9, for Yahya
Weather Data Investigation
Yahya's challenge: one question put to 150 years of real Met Office readings from Stornoway, and answered honestly. Loaded, checked, charted and written up.
Act 9 needs a free account, so your work is saved as you go. Act 1 is open to everyone.
The brief
- YahyaThe weather station outside the Archive only goes back a few years, but Stornoway's goes back to 1873.
- YahyaAsk it one question, and answer it so well that someone who disagrees with you would still believe it.
- CaitlinIs it getting rainier? I'll have it by lunch.
- YahyaYou'll have an answer by lunch, that's what worries me.
stornowaydata.txt is the Met Office's monthly record for Stornoway Airport, on the Isle of Lewis, from July 1873 to September 2026: for each month, the mean daily maximum and minimum temperatures, the days of air frost, the rainfall and the hours of sunshine. It's exactly as the Met Office publishes it, marks and all, and SOURCE.md says where it came from and what each mark means.
The data is Crown copyright, from the Met Office, used under the Open Government Licence v3.0. Anything you publish from it carries this line: "Contains public sector information licensed under the Open Government Licence v3.0. Source: Met Office."
- Load it.
station.pyreads the file into an agreed table, keeping the marks as columns. The Make step checks it. - Ask one question the data can answer, and plan your checks before you see the answer.
- Clean and check. Your own tests, in
test_station.py, on everything your answer stands on. - Analyse it, and chart it honestly, in
investigation.py. - Write it up: the answer, how sure you are, and what this data can't tell anyone.
>>> station = load_station("stornowaydata.txt")
>>> station.shape
(1839, 10)
>>> station[["year", "month", "rain", "sun", "sun_sensor", "provisional"]].tail(2)
year month rain sun sun_sensor provisional
1837 2026 8 104.8 95.6 True True
1838 2026 9 140.6 94.0 True TrueWhat you learn
What's in it
- Where the numbers came from
- A gap is not a zero
- Load the station
- Milestone 1: the question and the plan
- Milestone 2: the cleaned data, checked
- Milestone 3: the analysis, and honest charts
- Milestone 4: the write-up
- Ship it