1
0
Fork 0
Browse Source

update file names to new test-data file names.

This is part of a previous commit which shortended the file housing
the test data.
stable
Craig Oates 3 years ago
parent
commit
51f0d3e4bf
  1. 5
      src/flicker.py

5
src/flicker.py

@ -4,7 +4,7 @@ import datetime
time_tallies = dict()
tally_totals = dict()
with open("data/light-meter-sample-readings-23-04-2021-ritherdon.csv") as csv_file:
with open("data/test-data.csv") as csv_file:
csv_reader = csv.reader(csv_file, delimiter=",")
for r in csv_reader:
if (r[1] != "Time Stamp"):
@ -18,9 +18,8 @@ with open("data/light-meter-sample-readings-23-04-2021-ritherdon.csv") as csv_fi
tally_totals[r2] = (tally_totals[r2]) + 1
else:
tally_totals[r2] = 1
#print(tally_totals)
print(tally_totals.items())
with open("data/results/23-04-2021-readings-per-sec.csv", mode="w") as result:
with open("data/results/reading-per-sec.csv", mode="w") as result:
wtr = csv.writer(result)
for k, v in tally_totals.items():
print(f"{k}: {v}")