|
I decided that the first step in designing a graph is to learn
more about the data. Toward this end, I wrote a Perl program to extract
the date and count data and write it in a comma separated form for use by a
spreadsheet (MS Works). The spreadsheet plots dates correctly, and
provides any easy way to plot "interesting" subranges of the data or to add data
known to be missing from the log. My work on the first example convinced
me that I already had an excellent solution to the underlying problem even if I
did not meet the requirement of producing a graphic file.
Let me return to the data extraction problem. I decided
that I could safely ignore all time (as opposed to date)information. Data
points from the same day would still be in the correct order. When a
data point did not have a timestamp, I used the previous timestamp from the file
whether or not I had used the rest of the record that it came from.
I generated the count by incrementing it for every "subscribe"
entry and decrementing it for every "unsubscribe" or "procbounce" entry. (I
wish that I had spotted the problem with this that David Jones reported)
Adjusting the final count was left for the spreadsheet.
Bill Smith
|