diff --git a/all_countries.py b/all_countries.py index 264b139..0197441 100644 --- a/all_countries.py +++ b/all_countries.py @@ -140,7 +140,7 @@ def plot(data, countries, pop, **kwargs): 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) - pp.savefig("ac_"+name+".png") + pp.savefig("img/ac_"+name+".png") pp.close(fig) except Exception as e: print(f"=====> plotting failed for {loc}, skipping plot. Error: {e}") diff --git a/basics.py b/basics.py index 175a374..0939f46 100644 --- a/basics.py +++ b/basics.py @@ -44,4 +44,4 @@ def plot(data, countries, pop, **kwargs): fig.tight_layout() - fig.savefig(name+".png") + fig.savefig("img/"+name+".png") diff --git a/coronavis.py b/coronavis.py index aaacc94..129b0b6 100644 --- a/coronavis.py +++ b/coronavis.py @@ -40,6 +40,7 @@ metadata_fields = [ "hospital_beds_per_thousand", "life_expectancy", "human_development_index", + "tests_units", ] ### manual data @@ -118,12 +119,28 @@ def get_data(): new_deaths = tofloat(new_deaths) total_vaccinations = tofloat(total_vaccinations) stringency_index = tofloat(stringency_index) + reproduction_rate = tofloat(reproduction_rate) + icu_patients = tofloat(icu_patients) + hosp_patients = tofloat(hosp_patients) + weekly_icu_admissions = tofloat(weekly_icu_admissions) + weekly_hosp_admissions = tofloat(weekly_hosp_admissions) + new_tests = tofloat(new_tests) + total_tests = tofloat(total_tests) + positive_rate = tofloat(positive_rate) + tests_per_case = tofloat(tests_per_case) + if location not in data: data[location] = [] metadata[location] = {} year, month, day = date.split("-") - data[location].append([datetime.date(int(year), int(month), int(day)), new_cases, new_deaths, total_cases, total_deaths, total_vaccinations, stringency_index]) - + data[location].append( + [datetime.date(int(year), int(month), int(day)), + new_cases, new_deaths, total_cases, total_deaths, total_vaccinations, + stringency_index, reproduction_rate, icu_patients, hosp_patients, + weekly_icu_admissions, weekly_hosp_admissions, new_tests, + total_tests, positive_rate, tests_per_case,] + ) + # catch all data fields #dfields = {field: row[n] for n, field in enumerate(header)} @@ -141,8 +158,18 @@ def get_data(): for loc in data: time = [] new_cases, new_deaths, total_cases, total_deaths, total_vaccinations, stringency_index = [], [], [], [], [], [] + reproduction_rate = [] + icu_patients = [] + hosp_patients = [] + weekly_icu_admissions = [] + weekly_hosp_admissions = [] + new_tests = [] + total_tests = [] + positive_rate = [] + tests_per_case = [] for entry in data[loc]: - t_, new_cases_, new_deaths_, total_cases_, total_deaths_, total_vaccinations_, stringency_index_ = entry + t_, new_cases_, new_deaths_, total_cases_, total_deaths_, total_vaccinations_, stringency_index_, reproduction_rate_, icu_patients_, hosp_patients_, weekly_icu_admissions_, weekly_hosp_admissions_, new_tests_, total_tests_, positive_rate_, tests_per_case = entry + time.append(t_) new_cases.append(toint(new_cases_)) new_deaths.append(toint(new_deaths_)) @@ -150,7 +177,32 @@ def get_data(): total_deaths.append(toint(total_deaths_)) total_vaccinations.append(toint(total_vaccinations_)) stringency_index.append(toint(stringency_index_)) - data2[loc] = {'time': time, 'new_cases': new_cases, 'new_deaths': new_deaths, 'total_cases': total_cases, 'total_deaths': total_deaths, 'total_vaccinations': total_vaccinations, "stringency_index": stringency_index} + reproduction_rate.append(toint(reproduction_rate_)) + icu_patients.append(toint(icu_patients_)) + hosp_patients.append(toint(hosp_patients_)) + weekly_icu_admissions.append(toint(weekly_icu_admissions_)) + weekly_hosp_admissions.append(toint(weekly_hosp_admissions_)) + new_tests.append(toint(new_tests_)) + total_tests.append(toint(total_tests_)) + positive_rate.append(toint(positive_rate_)) + tests_per_case.append(toint(tests_per_case_)) + data2[loc] = {'time': time, + 'new_cases': new_cases, + 'new_deaths': new_deaths, + 'total_cases': total_cases, + 'total_deaths': total_deaths, + 'total_vaccinations': total_vaccinations, + 'stringency_index': stringency_index, + 'reproduction_rate': reproduction_rate, + 'icu_patients': icu_patients, + 'hosp_patients': hosp_patients, + 'weekly_icu_admissions': weekly_icu_admissions, + 'weekly_hosp_admissions': weekly_hosp_admissions, + 'new_tests': new_tests, + 'total_tests': total_tests, + 'positive_rate': positive_rate, + 'tests_per_case': tests_per_case, + } return data2, metadata data, metadata = get_data() diff --git a/death_per_case.py b/death_per_case.py index 7963219..70d61de 100644 --- a/death_per_case.py +++ b/death_per_case.py @@ -22,4 +22,4 @@ def plot(data, countries, pop, **kwargs): pp.legend(frameon=False) pp.tight_layout() - pp.savefig(name+".png") + pp.savefig("img/"+name+".png") diff --git a/delay_from_china.py b/delay_from_china.py index 0f38551..3c77707 100644 --- a/delay_from_china.py +++ b/delay_from_china.py @@ -51,4 +51,4 @@ def plot(data, countries, pop, **kwargs): pp.xlabel("total cases") pp.ylabel("delay to china [days]") pp.tight_layout() - pp.savefig(name+"_china.png") + pp.savefig("img/"+name+"_china.png") diff --git a/delay_from_usa.py b/delay_from_usa.py index c9d0b90..2e8245e 100644 --- a/delay_from_usa.py +++ b/delay_from_usa.py @@ -79,4 +79,4 @@ def plot(data, countries, pop, **kwargs): pp.xlabel("total cases") pp.ylabel("delay to United States [days]") pp.tight_layout() - pp.savefig(name+"_usa.png") + pp.savefig("img/"+name+"_usa.png") diff --git a/doubling_time.py b/doubling_time.py index d31b0b1..93ba358 100644 --- a/doubling_time.py +++ b/doubling_time.py @@ -36,4 +36,4 @@ def plot(data, countries, pop, **kwargs): pp.grid(which="both", axis="y") pp.tight_layout() - pp.savefig(name+".png") + pp.savefig("img/"+name+".png") diff --git a/index.html b/index.html index 0e02d6e..d968f75 100644 --- a/index.html +++ b/index.html @@ -33,21 +33,21 @@ Aktuelle Daten aus Deutschland mit vielen Hintergründen finden sich im

Basics

Absolute Fälle - +
Neue Fälle - +
Absolute Todesfälle - +
Neue Todesfälle - +

@@ -70,45 +70,45 @@ Di Plots werden immer komplexer, daher hier eine kurze Zusammenfassung der sicht
Deutschland und europäische Nachbarn -
Germany
-
Austria
-
Belgium
-
Czech Republic
-
Denmark
-
France
-
Italy
-
Liechtenstein
-
Luxembourg
-
Netherlands
-
Norway
-
Poland
-
Russia
-
Spain
-
Sweden
-
Switzerland
+
Germany
+
Austria
+
Belgium
+
Czech Republic
+
Denmark
+
France
+
Italy
+
Liechtenstein
+
Luxembourg
+
Netherlands
+
Norway
+
Poland
+
Russia
+
Spain
+
Sweden
+
Switzerland
-
Argentina
-
Australia
-
Bolivia
-
Brazil
-
Canada
-
Chile
-
China
-
Ecuador
-
India
-
Indonesia
-
Iran
-
Israel
-
Japan
-
New Zealand
-
Nigeria
-
Singapore
-
South Korea
-
Turkey
-
United Kingdom
-
United States
-
World
+
Argentina
+
Australia
+
Bolivia
+
Brazil
+
Canada
+
Chile
+
China
+
Ecuador
+
India
+
Indonesia
+
Iran
+
Israel
+
Japan
+
New Zealand
+
Nigeria
+
Singapore
+
South Korea
+
Turkey
+
United Kingdom
+
United States
+
World
@@ -116,216 +116,216 @@ Di Plots werden immer komplexer, daher hier eine kurze Zusammenfassung der sicht Achtung! Die Datenqualität variiert zwischen den Ländern enorm, damit sind einzelne Länder auch nur schwer miteinander zu vergleichen!
-
Afghanistan
-
Albania
-
Algeria
-
Andorra
-
Angola
-
Anguilla
-
Antigua and Barbuda
-
Argentina
-
Armenia
-
Aruba
-
Australia
-
Austria
-
Azerbaijan
-
Bahamas
-
Bahrain
-
Bangladesh
-
Barbados
-
Belarus
-
Belgium
-
Belize
-
Benin
-
Bermuda
-
Bhutan
-
Bolivia
-
Bonaire Sint Eustatius and Saba
-
Bosnia and Herzegovina
-
Botswana
-
Brazil
-
British Virgin Islands
-
Brunei
-
Bulgaria
-
Burkina Faso
-
Burundi
-
Cambodia
-
Cameroon
-
Canada
-
Cape Verde
-
Cayman Islands
-
Central African Republic
-
Chad
-
Chile
-
China
-
Colombia
-
Comoros
-
Congo
-
Costa Rica
-
Croatia
-
Cuba
-
Curacao
-
Cyprus
-
Czech Republic
-
Democratic Republic of Congo
-
Denmark
-
Djibouti
-
Dominican Republic
-
Dominica
-
Ecuador
-
Egypt
-
El Salvador
-
Equatorial Guinea
-
Eritrea
-
Estonia
-
Ethiopia
-
Faeroe Islands
-
Falkland Islands
-
Fiji
-
Finland
-
France
-
French Polynesia
-
Gabon
-
Gambia
-
Georgia
-
Germany
-
Ghana
-
Gibraltar
-
Greece
-
Greenland
-
Grenada
-
Guam
-
Guatemala
-
Guernsey
-
Guinea-Bissau
-
Guinea
-
Guyana
-
Haiti
-
Honduras
-
Hungary
-
Iceland
-
India
-
Indonesia
- -
Iran
-
Iraq
-
Ireland
-
Isle of Man
-
Israel
-
Italy
-
Jamaica
-
Japan
-
Jersey
-
Jordan
-
Kazakhstan
-
Kenya
-
Kosovo
-
Kuwait
-
Kyrgyzstan
-
Laos
-
Latvia
-
Lebanon
-
Lesotho
-
Liberia
-
Libya
-
Liechtenstein
-
Lithuania
-
Luxembourg
-
North Macedonia
-
Madagascar
-
Malawi
-
Malaysia
-
Maldives
-
Mali
-
Malta
-
Mauritania
-
Mauritius
-
Mexico
-
Moldova
-
Monaco
-
Mongolia
-
Montenegro
-
Montserrat
-
Morocco
-
Mozambique
-
Myanmar
-
Namibia
-
Nepal
-
Netherlands
-
New Caledonia
-
New Zealand
-
Nicaragua
-
Nigeria
-
Niger
-
Northern Mariana Islands
-
Norway
-
Oman
-
Pakistan
-
Palestine
-
Panama
-
Papua New Guinea
-
Paraguay
-
Peru
-
Philippines
-
Poland
-
Portugal
-
Puerto Rico
-
Qatar
-
Romania
-
Russia
-
Rwanda
-
Saint Kitts and Nevis
-
Saint Lucia
-
Saint Vincent and the Grenadines
-
San Marino
-
Sao Tome and Principe
-
Saudi Arabia
-
Senegal
-
Serbia
-
Seychelles
-
Sierra Leone
-
Singapore
-
Sint Maarten (Dutch part)
-
Slovakia
-
Slovenia
-
Somalia
-
South Africa
-
South Korea
-
South Sudan
-
Spain
-
Sri Lanka
-
Sudan
-
Suriname
-
Swaziland
-
Sweden
-
Switzerland
-
Syria
-
Taiwan
-
Tajikistan
-
Tanzania
-
Thailand
-
Timor
-
Togo
-
Trinidad and Tobago
-
Tunisia
-
Turkey
-
Turks and Caicos Islands
-
Uganda
-
Ukraine
-
United Arab Emirates
-
United Kingdom
-
United States
-
United States Virgin Islands
-
Uruguay
-
Uzbekistan
-
Vatican
-
Venezuela
-
Vietnam
-
Western Sahara
-
World
-
Yemen
-
Zambia
-
Zimbabwe
+
Afghanistan
+
Albania
+
Algeria
+
Andorra
+
Angola
+
Anguilla
+
Antigua and Barbuda
+
Argentina
+
Armenia
+
Aruba
+
Australia
+
Austria
+
Azerbaijan
+
Bahamas
+
Bahrain
+
Bangladesh
+
Barbados
+
Belarus
+
Belgium
+
Belize
+
Benin
+
Bermuda
+
Bhutan
+
Bolivia
+
Bonaire Sint Eustatius and Saba
+
Bosnia and Herzegovina
+
Botswana
+
Brazil
+
British Virgin Islands
+
Brunei
+
Bulgaria
+
Burkina Faso
+
Burundi
+
Cambodia
+
Cameroon
+
Canada
+
Cape Verde
+
Cayman Islands
+
Central African Republic
+
Chad
+
Chile
+
China
+
Colombia
+
Comoros
+
Congo
+
Costa Rica
+
Croatia
+
Cuba
+
Curacao
+
Cyprus
+
Czech Republic
+
Democratic Republic of Congo
+
Denmark
+
Djibouti
+
Dominican Republic
+
Dominica
+
Ecuador
+
Egypt
+
El Salvador
+
Equatorial Guinea
+
Eritrea
+
Estonia
+
Ethiopia
+
Faeroe Islands
+
Falkland Islands
+
Fiji
+
Finland
+
France
+
French Polynesia
+
Gabon
+
Gambia
+
Georgia
+
Germany
+
Ghana
+
Gibraltar
+
Greece
+
Greenland
+
Grenada
+
Guam
+
Guatemala
+
Guernsey
+
Guinea-Bissau
+
Guinea
+
Guyana
+
Haiti
+
Honduras
+
Hungary
+
Iceland
+
India
+
Indonesia
+ +
Iran
+
Iraq
+
Ireland
+
Isle of Man
+
Israel
+
Italy
+
Jamaica
+
Japan
+
Jersey
+
Jordan
+
Kazakhstan
+
Kenya
+
Kosovo
+
Kuwait
+
Kyrgyzstan
+
Laos
+
Latvia
+
Lebanon
+
Lesotho
+
Liberia
+
Libya
+
Liechtenstein
+
Lithuania
+
Luxembourg
+
North Macedonia
+
Madagascar
+
Malawi
+
Malaysia
+
Maldives
+
Mali
+
Malta
+
Mauritania
+
Mauritius
+
Mexico
+
Moldova
+
Monaco
+
Mongolia
+
Montenegro
+
Montserrat
+
Morocco
+
Mozambique
+
Myanmar
+
Namibia
+
Nepal
+
Netherlands
+
New Caledonia
+
New Zealand
+
Nicaragua
+
Nigeria
+
Niger
+
Northern Mariana Islands
+
Norway
+
Oman
+
Pakistan
+
Palestine
+
Panama
+
Papua New Guinea
+
Paraguay
+
Peru
+
Philippines
+
Poland
+
Portugal
+
Puerto Rico
+
Qatar
+
Romania
+
Russia
+
Rwanda
+
Saint Kitts and Nevis
+
Saint Lucia
+
Saint Vincent and the Grenadines
+
San Marino
+
Sao Tome and Principe
+
Saudi Arabia
+
Senegal
+
Serbia
+
Seychelles
+
Sierra Leone
+
Singapore
+
Sint Maarten (Dutch part)
+
Slovakia
+
Slovenia
+
Somalia
+
South Africa
+
South Korea
+
South Sudan
+
Spain
+
Sri Lanka
+
Sudan
+
Suriname
+
Swaziland
+
Sweden
+
Switzerland
+
Syria
+
Taiwan
+
Tajikistan
+
Tanzania
+
Thailand
+
Timor
+
Togo
+
Trinidad and Tobago
+
Tunisia
+
Turkey
+
Turks and Caicos Islands
+
Uganda
+
Ukraine
+
United Arab Emirates
+
United Kingdom
+
United States
+
United States Virgin Islands
+
Uruguay
+
Uzbekistan
+
Vatican
+
Venezuela
+
Vietnam
+
Western Sahara
+
World
+
Yemen
+
Zambia
+
Zimbabwe
@@ -337,46 +337,46 @@ Di Plots werden immer komplexer, daher hier eine kurze Zusammenfassung der sicht
Prozentualer Zuwachs Neue Fälle relativ zu absoluten Fällen mit gleitendem Mittelwert von 3 Tagen. - +
Verdopplungszeit Verdopplungszeit mit einem gleitenden Mittelwert von 7 Tagen. - +
Relative Todesfälle - +
Absolute Fälle zeitlich normiert auf den ersten Todesfall Achtung: die Daten sind nicht überall vollständig, die Statistik muss nicht bei Null beginnen!!
- +
Absolute Fälle zeitlich normiert auf des erste Auftreten von mehr als 100 Fällen Ab dann setzt fast überall das exponentielle Wachstum ein.
- +
Verzögerung gegenüber China in Tagen Verzögerung der Zahl der Erkrankungsfälle gegenüber China
- +
Verzögerung gegenüber den USA in Tagen Verzögerung der Zahl der Erkrankungsfälle gegenüber den USA
- +
diff --git a/normalized_to_first_death.py b/normalized_to_first_death.py index c881773..9ab113d 100644 --- a/normalized_to_first_death.py +++ b/normalized_to_first_death.py @@ -24,4 +24,4 @@ def plot(data, countries, pop, **kwargs): pp.legend(frameon=False) pp.tight_layout() - pp.savefig(name+".png") + pp.savefig("img/"+name+".png") diff --git a/normalized_to_ten_cases.py b/normalized_to_ten_cases.py index 86eb611..78488fb 100644 --- a/normalized_to_ten_cases.py +++ b/normalized_to_ten_cases.py @@ -32,4 +32,4 @@ def plot(data, countries, pop, **kwargs): pp.tight_layout() - pp.savefig(name+".png") + pp.savefig("img/"+name+".png")