Skip to content

Commit

Permalink
Updated plate history convert tool
Browse files Browse the repository at this point in the history
  • Loading branch information
connervieira committed May 1, 2024
1 parent 095c42b commit 32b3d1c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tools/convert_plate_history_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ def is_json(string):
human_date = datetime.datetime.fromtimestamp(float(time)).strftime('%Y-%m-%d %H:%M:%S')
for plate in plate_log[time]["plates"].keys():
csv_line = human_date + "," + plate
if (len(plate_log[time]["plates"][plate]["alerts"]) > 0): # Check to see if this plate was associated with any alerts.
csv_line = csv_line + ",true"
else:
csv_line = csv_line + ",false"
csv_line = csv_line + "," + str(plate_log[time]["location"]["lat"]) + "," + str(plate_log[time]["location"]["lon"])
csv_contents += csv_line + "\n"

print(csv_contents)

0 comments on commit 32b3d1c

Please sign in to comment.