Commit 51449078 authored by Zach Osman's avatar Zach Osman
Browse files

small stylistic changes to filter_data_into_days

parent 5330f6dd
......@@ -96,6 +96,7 @@ def convertTime(stri): # this function is used for splicing the event times.
raise Exception("Issue with time dilation. Input string: " + stri)
def filter_data_into_days(dictlist):
day_dict = collections.OrderedDict()
for event in dictlist:
......@@ -107,11 +108,14 @@ def filter_data_into_days(dictlist):
if event_date in day_dict:
_datetime = datetime(int(event["year"]), _MONTH_DICT[event["month"]], int(event["dayofmonth"]))
day_dict[event_date] = {"date": event_date, "datetime": _datetime.isoformat(' '), "events": [event]}
day_list = []
for day in day_dict:
timestamp = datetime(
int(event["year"]), _MONTH_DICT[event["month"]], int(event["dayofmonth"]))
day_dict[event_date] = {
"date": event_date, "datetime": timestamp.isoformat(' '), "events": [event]}
day_list = [
for day in day_dict
return day_list
def load_data():
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment