From e0d8f291a7fdf1ddf761c54967e2c0e3f8a8f281 Mon Sep 17 00:00:00 2001 From: Craig Oates Date: Fri, 24 Mar 2023 04:02:43 +0000 Subject: [PATCH] rename day-to-day-comparisons.py script and fix its bugs. It seems I got my wires cross when I was working on this script. It looks like I was mixing two aims up. The first half of the script wanted to compare the two Light Meter reading from the same day. The second half wanted to compare the same Light Meter (I.E. just Light Meter 1) on the 'same day' across June and July. In other words, the second half want to compare the readings taken by Light Meter 1 on the 17th June and July, for example. I guess this is what happens when you're programming after not sleeping for close to fourty-eight hours. Because this script could go in one of two ways, I decided to stick with the comparing both Meters on the same day -- compare Meter 1 and 2 on the 16th June, as an example. The changes in this commit reflect this decision. --- day-to-day-comparisons.py => daily-comparisons.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename day-to-day-comparisons.py => daily-comparisons.py (79%) diff --git a/day-to-day-comparisons.py b/daily-comparisons.py similarity index 79% rename from day-to-day-comparisons.py rename to daily-comparisons.py index 99a13a6..79b76d2 100644 --- a/day-to-day-comparisons.py +++ b/daily-comparisons.py @@ -28,10 +28,10 @@ for month in range(6, 8, 1) : else : d = day 15 - if (day <= 13) or (day == 15) or (day == 20) or (day == 23) or (day == 25) or (day == 27) : - print(f"Skipping: Day {d} -- incomplete data...") + if (day <= 13) : + print(f"Skipping: 2021-0{month}-{d} -- missing data...") else : - print(f"PROCESSING: 2021-{month}-{day} for Meter {meter}...") + print(f"PROCESSING: 2021-0{month}-{day} for Meter {meter}...") file_data = [] file_path = f"data/light-meter-{meter}/2021-0{month}-{d}.csv" single_file = pd.read_csv (file_path, sep="," ,header=None, @@ -51,7 +51,7 @@ for month in range(6, 8, 1) : legend_label=f"Meter: {meter}", line_color=random_colour()) counter = 0 - p.title = f"Side-by-Side Comparison Day: {day}" - output_file(f"output/side-by-side-day-{d}.html", - title=f"Side-by-Side Comparison For Day: {d} (From Each Month)") + p.title = f"Side-by-Side Comparison: 2021-0{month}-{day}" + output_file(f"output/side-by-side-day-0{month}-{d}.html", + title=f"Side-by-Side Comparison: 2021-0{month}-{d}") save(p)