Browse Source

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.
master
Craig Oates 1 year ago
parent
commit
e0d8f291a7
  1. 12
      daily-comparisons.py

12
day-to-day-comparisons.py → 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)
Loading…
Cancel
Save