Dirty fix for infection status indicator
Mean over the last 7 days was distored when data for current day was missing. Fixed the issue by using mean of the last 7 days starting from yesterday. Better fix would be to use the 7 day mean of the last 7 datapoints available, to get most actual result.
This commit is contained in:
@@ -79,7 +79,7 @@ def plot(data, countries, pop, metadata={}, **kwargs):
|
||||
warn_thresh = 500e-6 * pop[loc]['pop']/7
|
||||
info_thresh = 50e-6 * pop[loc]['pop']/7
|
||||
low_thresh = 5e-6 * pop[loc]['pop']/7
|
||||
actual_level = np.mean(new_cases[-7:])
|
||||
actual_level = np.mean(new_cases[-8:-2])
|
||||
infection_level_indicator = "green"
|
||||
if actual_level > low_thresh:
|
||||
infection_level_indicator = "gold"
|
||||
|
||||
Reference in New Issue
Block a user