diff --git a/all_countries.py b/all_countries.py index 4e2b81a..b2d7b38 100644 --- a/all_countries.py +++ b/all_countries.py @@ -37,9 +37,9 @@ def plot(data, countries, pop): infection_level_indicator = "grey" try: #if False: - warn_thresh = 500e-6 * pop[loc]['pop'] - info_thresh = 50e-6 * pop[loc]['pop'] - low_thresh = 5e-6 * pop[loc]['pop'] + 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:]) infection_level_indicator = "green" if actual_level > low_thresh: @@ -50,9 +50,9 @@ def plot(data, countries, pop): infection_level_indicator = "r" bounds = ax1.axis() #if warn_thresh < bounds[3]: - ax1.plot([bounds[0], bounds[1]], [warn_thresh]*2, color="red", linestyle=":", label=f"500 new cases per 1M inhabitants: {int(warn_thresh):,}".replace(",", ".")) - ax1.plot([bounds[0], bounds[1]], [info_thresh]*2, color="peru", linestyle=":", label=f"50 new cases per 1M inhabitants: {int(info_thresh):,}".replace(",", ".")) - ax1.plot([bounds[0], bounds[1]], [low_thresh]*2, color="gold", linestyle=":", label=f"5 new cases per 1M inhabitants: {int(low_thresh):,}".replace(",", ".")) + ax1.plot([bounds[0], bounds[1]], [warn_thresh]*2, color="red", linestyle=":", label=f"500 new cases / week / 1M inh.: {int(warn_thresh):,}".replace(",", ".")) + ax1.plot([bounds[0], bounds[1]], [info_thresh]*2, color="peru", linestyle=":", label=f"50 new cases / week / 1M inh.: {int(info_thresh):,}".replace(",", ".")) + ax1.plot([bounds[0], bounds[1]], [low_thresh]*2, color="gold", linestyle=":", label=f"5 new cases / week / 1M inh.: {int(low_thresh):,}".replace(",", ".")) ax1.axis(bounds) except: diff --git a/index.html b/index.html index 00473a9..606ac8c 100644 --- a/index.html +++ b/index.html @@ -10,16 +10,23 @@