diff --git a/all_countries.py b/all_countries.py new file mode 100644 index 0000000..e153f5f --- /dev/null +++ b/all_countries.py @@ -0,0 +1,31 @@ +""" +Plot overview plot for each country separately +""" +import matplotlib.pyplot as pp +import numpy as np +basename="all_" + +def plot(data, countries): + figsize = (10,5) + for loc in data: + name = basename+loc + time, new_cases, new_deaths, total_cases, total_deaths = data[loc] + + fig, ax1 = pp.subplots(num=name, figsize=figsize) + + ax1.plot(time, new_cases, label="raw new cases", color="grey", linestyle="-") + ax1.plot(time[3:-3], np.convolve(new_cases, np.ones((7,))/7, mode="valid"), label="new cases 7day mean", color="orange", linestyle="-", linewidth=2) + + ax2 = ax1.twinx() + ax2.plot(time, total_cases, label=f"Total cases", marker="", linestyle="--", color="blue") + + #ax1.xticks(rotation=45) + #ax1.set_xlabel("date") + ax1.set_ylabel("new cases") + ax2.set_ylabel("total cases") + fig.legend(frameon=False, loc="upper left", bbox_to_anchor=(0,1), bbox_transform=ax1.transAxes) + pp.title(loc) + fig.tight_layout() + + pp.savefig("ac_"+name+".png") + pp.close(fig) diff --git a/index.en.html b/index.en.html deleted file mode 100644 index 5a993e9..0000000 --- a/index.en.html +++ /dev/null @@ -1,97 +0,0 @@ - -
- - - - - - -
-
-
-
-
-
-
-
-
-
-
-