Commit 88204b22 authored by Daniel Kullmann's avatar Daniel Kullmann

Uses all_keys variable from

parent be68223b
......@@ -4,8 +4,6 @@ import datetime
import json
import copy
ALL_KEYS = ['cases', 'deaths']
(data, all_countries, all_dates, population_data) = corona.load_corona_data()
values_per_1m = corona.calculate_per_1m(data, population_data)
......@@ -64,7 +62,7 @@ def calculate_moving_average(values, all_countries, all_dates):
average_date = date + datetime.timedelta(days=num_days)
if average_date not in result[country]:
result[country][average_date] = {}
for key in ALL_KEYS:
for key in corona.all_keys:
if average_date in values[country] and key in values[country][average_date]:
value = values[country][average_date][key]
if key not in result[country][average_date]:
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