Skip to content

Commit

Permalink
2020-05-04: new data, 4-days mean of daily cases in expert plot, form…
Browse files Browse the repository at this point in the history
…ating
  • Loading branch information
koepferl committed May 4, 2020
1 parent ed04d25 commit 0a1b228
Show file tree
Hide file tree
Showing 200 changed files with 62,388 additions and 45 deletions.
Binary file modified DT_Bavaria.pdf
Binary file not shown.
30 changes: 29 additions & 1 deletion Documentation_COVID19_Local.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -581,13 +581,41 @@
"* loglog plot https://github.com/koepferl/COVID19Dahoam/blob/master/loglog_Bavaria.pdf\n",
" Almost all counties move steep downwards (less infections every day) this means people are recovering faster than new once are becoming infected. This is good, our health system does not break down.\n",
" \n",
"### Dataset downloaded 2020-05-04\n",
"\n",
"* THERE IS NO GLORY IN PREVENTION BUT STILL LET'S TRY.\n",
"\n",
"\n",
"* DT evolution https://github.com/koepferl/COVID19Dahoam/blob/master/DT_Bavaria.pdf: \n",
" Most counties have now higher doubling times, isolation works. Stay put.\n",
" \n",
" * Bavaria with 122.17 d:\n",
" * 5 counties with lowest DTS (the larger the better):\n",
" * 23.92 03.5 LK Kitzingen\n",
" * 34.86 01.5 LK Kulmbach\n",
" * 35.11 30.4 LK Dillingen a.d.Donau\n",
" * 41.09 03.5 LK Coburg\n",
" * 51.72 23.4 SK Kempten\n",
" * 5 counties with highest DTs (the larger the better):\n",
" * 233.92 02.5 LK Starnberg\n",
" * 272.11 03.5 LK Rottal-Inn\n",
" * 279.70 02.5 LK Lindau\n",
" * 300.66 02.5 LK Nuenberger Land\n",
" * 322.21 02.5 LK Weilheim-Schongau\n",
"\n",
"* Semi-log plots https://github.com/koepferl/COVID19Dahoam/tree/master/plots: \n",
"\n",
" Counties with still very low DTs show also no flattening; with high DT almost a horizontal trend.\n",
" \n",
"* loglog plot https://github.com/koepferl/COVID19Dahoam/blob/master/loglog_Bavaria.pdf\n",
" Almost all counties move steep downwards (less infections every day) this means people are recovering faster than new once are becoming infected. This is good, our health system does not break down.\n",
"\n",
"* New: In some counties now there a again more cases coming in, this causes the slope to steepen in the semilog plot, the DTs get shorter again and in the log-log plot the droping trend is revercing. In the expert plot we can see that also the reproduction time is goint up once the DT drops. The end of the loc-down is now visible.\n",
" \n",
"More interpretation follows tomorrow.\n",
"\n",
"## Recommendation\n",
"Social distancing is key to slow down the case numbers further to not overburden our local health system. Show solidarity through and from the distance.\n",
"Social distancing is key to slow down the case numbers further to not overburden our local health system. Show solidarity through and from the distance. THERE IS NO GLORY IN PREVENTION BUT STILL LET'S TRY.\n",
"\n"
]
},
Expand Down
30 changes: 17 additions & 13 deletions Documentation_COVID19_Local_German.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -529,23 +529,27 @@
" \n",
" Ganz interessant, bei einigen Landkreisen gibt es einen kleinen “Osterhaken\" ungefähr eine Woche nach Ostern. Da war die Disziplin wohl nicht ganz so strickt. Ich hoffe des wird jetzt (wo noch mehr erlaubt) nicht wieder zu schlimm. Obwohl ich es eigentlich erwarte.\n",
"\n",
"### Datendownload 2020-05-01\n",
"### Datendownload 2020-05-04\n",
"\n",
"* Es gibt keine Ehrung für Prävention, aber versuchen sollten wir es trotzdem.\n",
"\n",
"\n",
"* DT Entwicklung https://github.com/koepferl/COVID19Dahoam/blob/master/DT_Bavaria.pdf: \n",
" Die meisten Kreise haben höhere Verdopplungszeiten, Isolation funktioniert. Bleibt dahoam, auf Abstand oder tragt Masken.\n",
" * Bayern mit 96.10 Tage:\n",
" * Bayern mit 122.17 Tage:\n",
" * 5 Kreise mit den niedriger Verdopplungszeiten (umso groesser desto besser):\n",
" * 17.73 30.4 LK Kitzingen\n",
" * 27.24 24.4 SK Coburg\n",
" * 28.90 27.4 LK Neumarkt i.d.OPf.\n",
" * 29.21 30.4 LK Passau\n",
" * 30.58 30.4 LK Rhoen-Grabfeld\n",
" * 23.92 03.5 LK Kitzingen\n",
" * 34.86 01.5 LK Kulmbach\n",
" * 35.11 30.4 LK Dillingen a.d.Donau\n",
" * 41.09 03.5 LK Coburg\n",
" * 51.72 23.4 SK Kempten\n",
" * 5 Kreise mit den hoechsten Verdopplungszeiten (umso groesser desto besser):\n",
" * 217.76 28.4 LK Lindau\n",
" * 223.33 29.4 LK Ostallgaeu\n",
" * 223.42 30.4 LK Tirschenreuth\n",
" * 247.88 30.4 LK Rottal-Inn\n",
" * 282.06 30.4 SK Ingolstadt\n",
" * 233.92 02.5 LK Starnberg\n",
" * 272.11 03.5 LK Rottal-Inn\n",
" * 279.70 02.5 LK Lindau\n",
" * 300.66 02.5 LK Nuenberger Land\n",
" * 322.21 02.5 LK Weilheim-Schongau\n",
"\n",
"\n",
"* Semi-log plots https://github.com/koepferl/COVID19Dahoam/tree/master/plots: \n",
"\n",
Expand All @@ -566,7 +570,7 @@
"Mehr Diskussion folgt morgen.\n",
"\n",
"## Handlungsempfehlung\n",
"Soziale Isolation in der Corona Kriese kann dabei helfen die Fallzahlenentwicklung abzubremsen um unser Gesundheitssystem nicht zu überfordern. Zeigen wir Solidarität durch Abstand.\n",
"Soziale Isolation in der Corona Kriese kann dabei helfen die Fallzahlenentwicklung abzubremsen um unser Gesundheitssystem nicht zu überfordern. Zeigen wir Solidarität durch Abstand. Es gibt keine Ehrung für Prävention, aber versuchen sollten wir es trotzdem!\n",
"\n",
"\n"
]
Expand Down
66 changes: 36 additions & 30 deletions cov19_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ def plot_corona(num_dic, day, month, name, ID, geraet_min=None, geraet_max=None,
day[month == 2] = day[month == 2] - 29
day[month == 1] = day[month == 1] - 29 - 31
day[month == 4] = day[month == 4] + 31
day[month == 5] = day[month == 5] + 31 + 30

#########
# fit
Expand Down Expand Up @@ -422,12 +423,13 @@ def func(x, a, b):#, c):
ax[0].annotate('Ende Ferien', ha='center', xy=(31+20, ax[0].get_ylim()[0]), xytext=(31+20, 0.4),
arrowprops=dict(arrowstyle= '-|>', color='grey', lw=2, ls='-'), alpha=0.6)

# credit bar
credit = 'Christine Greif\nhttp://www.usm.uni-muenchen.de/~koepferl\nThis work is licensed under CC-BY-SA 4.0\nData: NPGEO-DE; VZ = Verdopplungszeit'
loc_label = ax[0].get_xlim()[1] * 1.12
ax[0].text(loc_label, 9e4, 'Christine Greif', fontsize=8)
link = ax[0].text(loc_label, 7.4e4, 'http://www.usm.uni-muenchen.de/~koepferl', fontsize=8)
ax[0].text(loc_label, 5.9e4, 'This work is licensed under CC-BY-SA 4.0', fontsize=8)
ax[0].text(loc_label, 4.6e4, 'Data: NPGEO-DE; VZ = Verdopplungszeit ', fontsize=8)
link = ax[0].text(loc_label, 9e4, credit, fontsize=8, va='top')
link.set_url('http://www.usm.uni-muenchen.de/~koepferl')

# label
ax[0].set_ylabel('Gesamte Fallzahlen')
lgd = ax[0].legend(loc='best', bbox_to_anchor=(1.12, 0.93))

Expand All @@ -454,9 +456,15 @@ def func(x, a, b):#, c):
pass_all = {'day': day, 'fall': np.append(num[0], np.diff(num)), 'gesund': np.append(num_gesund[0], np.diff(num_gesund)), 'tod': np.append(num_tod[0], np.diff(num_tod))}

ax[1].set_ylabel('Taeglich gemeldete Fallzahlen')
ax[1].semilogy(day, pass_all['fall'], color='None', label=None)
ax[1].semilogy(day, pass_all['tod'], color='None', label=None)
ax[1].semilogy(day, pass_all['gesund'], color='None', alpha=0.3, label=None)

# gemittelt ueber 4 Tage
all_smooth = 0.25 * (pass_all['fall'][:-3] + pass_all['fall'][1:-2] + pass_all['fall'][2:-1] + pass_all['fall'][3:])
tod_smooth = 0.25 * (pass_all['tod'][:-3] + pass_all['tod'][1:-2] + pass_all['tod'][2:-1] + pass_all['tod'][3:])
gesund_smooth = 0.25 * (pass_all['gesund'][:-3] + pass_all['gesund'][1:-2] + pass_all['gesund'][2:-1] + pass_all['gesund'][3:])

ax[1].semilogy(day[3:], all_smooth, 'r-', label='neu erkrankt (4-Tagesmittel)')
ax[1].semilogy(day[3:], tod_smooth, 'k-', label='neu verstorben (4-Tagesmittel)')
ax[1].semilogy(day[3:], gesund_smooth, 'k-', alpha=0.3, label='neu genesen (4-Tagesmittel)')

# box
import matplotlib.patches as patches
Expand Down Expand Up @@ -881,21 +889,12 @@ def func(x, a, b):#, c):
factor_1 = 100/60.
x_pos = 37

link = axs[2,3].text(x_pos, -7.2 * factor_1, 'Christine Greif (http://www.usm.uni-muenchen.de/~koepferl)', fontsize=8)
axs[2,3].text(x_pos, -9.2 * factor_1, 'This work is licensed under CC-BY-SA 4.0', fontsize=8)
axs[2,3].text(x_pos, -11.2 * factor_1, 'Data: NPGEO-DE', fontsize=8)
credit2 = 'Christine Greif\nhttp://www.usm.uni-muenchen.de/~koepferl\nThis work is licensed under CC-BY-SA 4.0\nData: NPGEO-DE'

link = axs3[2,3].text(x_pos, -7, 'Christine Greif (http://www.usm.uni-muenchen.de/~koepferl)', fontsize=8)
axs3[2,3].text(x_pos, -8, 'This work is licensed under CC-BY-SA 4.0', fontsize=8)
axs3[2,3].text(x_pos, -9, 'Data: NPGEO-DE', fontsize=8)

link = axs4[2,3].text(x_pos, -1., 'Christine Greif (http://www.usm.uni-muenchen.de/~koepferl)', fontsize=8)
axs4[2,3].text(x_pos, -1.5, 'This work is licensed under CC-BY-SA 4.0', fontsize=8)
axs4[2,3].text(x_pos, -2., 'Data: NPGEO-DE', fontsize=8)

link = axs2[2,3].text(3.5, 0.5, 'Christine Greif (http://www.usm.uni-muenchen.de/~koepferl)', fontsize=8)
axs2[2,3].text(3.5, 0.44, 'This work is licensed under CC-BY-SA 4.0', fontsize=8)
axs2[2,3].text(3.5, 0.38, 'Data: NPGEO-DE', fontsize=8)
link = axs[2,3].text(x_pos, -10 * factor_1, credit2, fontsize=8, va = 'top')
link = axs3[2,3].text(x_pos, -2, credit2, fontsize=8)
link = axs4[2,3].text(x_pos, -1., credit2, fontsize=8)
link = axs2[2,3].text(3.5, 0.5, credit2, fontsize=8, va='top')

link.set_url('http://www.usm.uni-muenchen.de/~koepferl')

Expand Down Expand Up @@ -952,9 +951,10 @@ def func(x, a, b):#, c):
ax3.legend(loc='upper left')

#if ax in [axs[2,0], axs[2,1], axs[2,2], axs[2,3]]:
ax3.text(13, -6, 'Maerz/March')
ax3.text(31, -6, 'April')
ax.text(31+30, -6, 'Mai/May')
offset3 = - 0.07 * ax3.get_ylim()[1]
ax3.text(13, offset3, 'Maerz/March')
ax3.text(31, offset3, 'April')
ax3.text(31+30, offset3, 'Mai/May')


for ax4 in axs4.reshape(-1):
Expand All @@ -968,9 +968,10 @@ def func(x, a, b):#, c):
ax4.legend(loc='upper left')

#if ax in [axs[2,0], axs[2,1], axs[2,2], axs[2,3]]:
ax4.text(13, -0.5, 'Maerz/March')
ax4.text(31, -0.5, 'April')
ax.text(31+30, -0.5, 'Mai/May')
offset4 = - 0.07 * ax4.get_ylim()[1]
ax4.text(13, offset4, 'Maerz/March')
ax4.text(31, offset4, 'April')
ax4.text(31+30, offset4, 'Mai/May')

if ax4 in [axs4[1,0]]:
ax4.set_ylabel('geschaetzte Reproduktionszahl R (Anzahl letzten 4 Meldungen / Anzahl der letzten 4 Meldungen davor)')
Expand Down Expand Up @@ -1013,8 +1014,10 @@ def docu(LK_ID, DT):
print ' * 5 counties with highest DTs (the larger the better):'

if (i < 5) or (i > len(name_print) - 6) :
print ' *', '%6.2f'%DT_print[i], str(int(day_print[i]-31)) + '.4', name_print[i]

if day_print[i]-31 <= 30: #April
print ' *', '%6.2f'%DT_print[i], str(int(day_print[i]-31)) + '.4', name_print[i]
if day_print[i]-31 > 30: #Mai
print ' *', '%6.2f'%DT_print[i], str(int(day_print[i]-31 - 30)) + '.5', name_print[i]

print '*' * 30
print 'German Documentation'
Expand All @@ -1029,5 +1032,8 @@ def docu(LK_ID, DT):
print ' * 5 Kreise mit den hoechsten Verdopplungszeiten (umso groesser desto besser):'

if (i < 5) or (i > len(name_print) - 6) :
print ' *', '%6.2f'%DT_print[i], str(int(day_print[i]-31)) + '.4', name_print[i]
if day_print[i]-31 <= 30: #April
print ' *', '%6.2f'%DT_print[i], str(int(day_print[i]-31)) + '.4', name_print[i]
if day_print[i]-31 > 30: #Mai
print ' *', '%6.2f'%DT_print[i], str(int(day_print[i]-31 - 30)) + '.5', name_print[i]

Loading

0 comments on commit 0a1b228

Please sign in to comment.