The reason I started geotagging these historic Toronto photos was to get a better sense of the photos in context - first geographically, then by date. A natural extension to that was to find a way to include weather details for photos that have specific dates. Time to extend the web with another mash-up.
|Simple Perl script to download weather data|
With a bit of research I found the Historic Climate Data pages at Environment Canada which had exactly what I was looking for!
I coded up a quick script that took the date as input, and returned the relevant weather details - maximum temperature, minimum temperature, along with rain and snow details. The script figures out the appropriate Environment Canada CSV file to download for the given month and year, then finds the details for the specific date within that file. I cache that file to quickly find weather data for other days in the same year and month. Once I have the details for a given date I store them in my Wholemap database ready to display each time it is needed.
The power of Open Data!
July 20th, 1971 looked like a perfect day to see the Toronto Symphony on the rotating stage of the the Ontario Place Forum by Lake Ontario - I miss that place!
But it is tough to tell in a black and white photo what the weather was like... Now that've I've added the weather details, you can see it was a comfortable 23 degrees.
|Extreme historic weather|
The two hottest days I have photos for, so far, are both July 1st - a maximum of 36.7 degrees in 1911, and 35.0 in 1913.
On the flip side, the coldest day I have a photo for is a low of -23.9 on Feb 12th, 1917.
(I find the maximum snowfall and rainfall isn't as interesting, as usually the photos are taken the days AFTER those extremes, like the days after Hurricane Hazel in 1954.)
|Reusing my script|
The whole point of Open Data is to make it as accessible as possible to as many people and projects as possible.
To that end, I’m sharing the Perl object weatherDataFromEnvironmentCanada.pm I created to read the data I needed from Environment Canada. You can download the latest version from my Github account: https://github.com/seemsartless/environment_canada_historic_weather_details_perl
See the Readme file for a simple demo, and a disclaimer! This work is in no way affiliated with Environment Canada.