diff --git a/all_countries.py b/all_countries.py index 0197441..cf3a48e 100644 --- a/all_countries.py +++ b/all_countries.py @@ -25,6 +25,8 @@ corr = {"Chile": 10000, def plot(data, countries, pop, **kwargs): figsize = (10,5) + + vaccs = [] for loc in data: try: @@ -136,6 +138,7 @@ def plot(data, countries, pop, **kwargs): title += ", population = "+f"{pop[loc]['pop']:,}".replace(",",".") if not np.isnan(total_vaccinations[-1]): title += ", vac rate: "+f"{total_vaccinations[-1]/pop[loc]['pop']*100:1.3f}%" + vaccs.append([loc, total_vaccinations[-1], total_vaccinations[-1]/pop[loc]['pop']*100]) # bookkeeping for overview ax1.set_title(title) fig.tight_layout() pp.text(0.002,0.005, f"plot generated {time_module.strftime('%Y-%m-%d %H:%M')}, CC-by-sa-nc, origin: dukun.de/corona, datasource: ourworldindata.org/coronavirus-source-data", color="dimgrey", fontsize=8, transform=fig.transFigure) @@ -144,3 +147,13 @@ def plot(data, countries, pop, **kwargs): pp.close(fig) except Exception as e: print(f"=====> plotting failed for {loc}, skipping plot. Error: {e}") + + ## vaccination overview html + with open("vac_state.html", "w") as f: + # header + f.write("\n") + # data + for loc, tvac, rvac in vaccs: + f.write(f"\n".replace(".", ",")) + # footer + f.write("
LandImpfungenImpfrate
{loc}" + f"{tvac:,d}".replace(",",".") + f"{rvac:3.3f}%
\n") diff --git a/index.html b/index.html index 2b53ba6..f8f977d 100644 --- a/index.html +++ b/index.html @@ -29,6 +29,10 @@ Von den extrem reichhaltigen Daten dort verarbeite ich nur die Zahl der Neufäll

Aktuelle Daten aus Deutschland mit vielen Hintergründen finden sich im Lagebericht des RKI. +
+

Impfstatus / Vaccination state

+ +

Ausgewählte Länder