Computer Science 30
4.0-Programming & Design
 

Weather Statistics Assignment Part 3

In today's world of automation, meteorologists do not hand enter temperature readings at the computer keyboard. Environment Canada keeps track of weather statistics from hundreds of stations located from coast to coast. The Saskatoon John G. Diefenbaker Airport and the University of Saskatchewan Kernen Farm Research Station are two of such locations in the Saskatoon vicinity.

Statistics about Saskatoon are available on the web at the Environment Canada Weather Office. Environment Canada records temperatures every hour, 24 hours a day, 365 days of the year.

There is a file on our web server that contains data for the year 2004. Note that 2004 is a leap year so there are 366 days listed. The file has a .csv extension meaning it is in a Comma Separated Value file format. If we opened the file with a text editor, we would find the data looking like the following string of numbers.

4057120,2004,1,1,78,-195,-210,-202,-205,-195,-191 ...
4057120,2004,1,2,78,-212,-207,-208,-213,-221,-232 ...
4057120,2004,1,3,78,-270,-289,-303,-309,-301,-311 ...
4057120,2004,1,4,78,-316,-323,-292,-294,-289,-314 ...
4057120,2004,1,5,78,-332,-327,-303,-296,-283,-277 ...
4057120,2004,1,6,78,-160,-153,-148,-160,-141,-138 ...
4057120,2004,1,7,78,-227,-226,-243,-231,-249,-250 ...

The table above shows a partial view of the data file. We need to interpret the numbers and mine the data contained in the file.

  • 4057120 is an identification number for Saskatoon.
  • The next three fields are the year, month and day.
  • 78 is a reference number.
  • The rest of the numbers that follow, 24 in the sequence for each day, represent the temperatures taken every hour starting at 12:00 A.M.. Note that the number is an integer and that for actual temperatures you must divide the number by a factor of 10.

©Copyright Saskatoon Public Schools 2005 --- Page updated Friday, 2006-05-12 9:53 AM