Computer Sciences Department logo

CS 368-3 (2012 Summer) — Day 14 Homework

Due Monday, August 6, at the start of class.

Weather Forecast Analysis, Part III

The purpose of this three-part project is to compare weather forecasts against actual weather observations. In this third and final part, the goal is to do the comparisons and print a report of the findings.

Tasks

By now, you should have daily forecast data and hourly observation data from the past two assignments. If you need data to work with, you may download my files here: forecasts, observations.

Now, we want to write a new script that prints a report like this:

WEATHER REPORT

DATE               HIGHS                   LOWS (early next AM)
================   =====================   =====================
2011-07-29 (Fri)   87-89 => 86.5 (below)   61-63 => 71.2 (above)
2011-07-30 (Sat)   87-89 => 88.1 (good)    67-69 => 72.1 (above)
2011-07-31 (Sun)   87-89 => 89.1 (good)    67-69 => 74.7 (above)
2011-08-01 (Mon)   89-91 => 86.9 (below)   71-73 => 76.0 (above)
2011-08-02 (Tue)   91-93 => 90.5 (below)   67-69 => 72.6 (above)
2011-08-03 (Wed)   -------- only 7 weather observations --------
2011-08-04 (Thu)   ---------- no weather observations ----------

Of the 10 forecasts, the actual temperatures were below the
forecast 3 times, above the forecast 5 times, and accurate 2
times.	Overall accuracy was 20%.

Once again, you may start with a partial script, available here.

Background

Although we are starting with data that is much simpler than the original, source data, there are still some complications to deal with:

Subroutines to Write

If you start with my partial script, here are the subroutines that you must write for credit on this assignment. Obviously, if you write your own script, you may organize it as you wish, and so this subsection is less relevant to you.

Optional Work

Reminders

Do the work yourself, consulting reasonable reference materials as needed. Any resource that provides a complete solution or offers significant material assistance toward a solution not OK to use. Asking the instructor for help is OK, asking other students for help is not. All standard UW policies concerning student conduct (esp. UWS 14) and information technology apply to this course and assignment.

Hand In

A printout of your code, ideally on a single sheet of paper. Be sure to put your own name in the initial comment block. Identifying your work is important, or you may not receive appropriate credit.