X-Git-Url: https://plomlompom.com/repos/?p=berlin-corona-table;a=blobdiff_plain;f=enhance_table.py;h=cee78f82bb674fb98a879c1814bc6a2cca078ea8;hp=07ad84bfe20ef809b8a2aabb3c56b64efc0206b4;hb=56de61949ed35ecb8ab728dd1912e161892bc521;hpb=15078e431bc826110aa93dd78af7b60f132671ab
diff --git a/enhance_table.py b/enhance_table.py
index 07ad84b..cee78f8 100755
--- a/enhance_table.py
+++ b/enhance_table.py
@@ -32,6 +32,7 @@ translate = {
'TS': 'Tempelhof-Schöneberg',
'TK': 'Treptow-Köpenick',
'sum': 'all of Berlin',
+ '+': 'new infections counted that day',
'Σ': 'sum of new infections for last 7 days',
'Ã': 'per-day average of new infections for last 7 days',
'i': 'incidence (x per 100k inhabitants) of new infections for last 7 days',
@@ -154,24 +155,24 @@ th { text-align: left; vertical-align: bottom; }
| """)
sorted_dates.reverse()
for district in sorted_districts:
- long_form = translate[district]
# Wrap in div because the vertical orientation otherwise fails
# in Chromium.
- print(' | ' % long_form)
+ print(' | ' %
+ translate[district])
print('')
print('')
# In Chromium, the th only stay fixed if also given this class.
print('date | ')
- print(' | ')
+ print('? | ')
for district in sorted_districts:
- print('%s | ' % district)
+ print('%s | ' %
+ (translate[district], district))
print('
')
for date in sorted_dates:
print('')
print('%s | ' % date)
print('')
- print('+ | ')
- for abbr in ['Σ', 'Ã', 'i']:
+ for abbr in ['+', 'Σ', 'Ã', 'i']:
print('%s | ' %
(translate[abbr], abbr))
print(' | ')
@@ -195,6 +196,11 @@ th { text-align: left; vertical-align: bottom; }
print('')
print('
')
print('')
+ print('Symbols
')
+ print('')
+ for abbr in ['+', 'Σ', 'Ã', 'i']:
+ print('- %s
- %s
' % (abbr, translate[abbr]))
+ print('
')
print('