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

minor improvments to data formatting

parent a660bcaa
...@@ -106,12 +106,12 @@ def filter_data_into_days(dictlist): ...@@ -106,12 +106,12 @@ def filter_data_into_days(dictlist):
_MONTH_DICT[event["month"]], _MONTH_DICT[event["month"]],
event["year"]) event["year"])
if event_date in day_dict: if event_date in day_dict:
day_dict[event_date]["events"].append(event) day_dict[event_date]["data"].append(event)
else: else:
timestamp = datetime( timestamp = datetime(
int(event["year"]), _MONTH_DICT[event["month"]], int(event["dayofmonth"])) int(event["year"]), _MONTH_DICT[event["month"]], int(event["dayofmonth"]))
day_dict[event_date] = { day_dict[event_date] = {
"date": event_date, "datetime": timestamp.isoformat(' '), "data": [event]} "date": event_date, "datetime": timestamp.isoformat(' '), "year": event["year"], "month": event["month"], "dayofmonth": event["dayofmonth"], "data": [event]}
day_list = [ day_list = [
day_dict[day] day_dict[day]
for day in day_dict for day in day_dict
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