home · contact · privacy
Remove redundant sum_district assignments.
[berlin-corona-table] / enhance_table.py
index cfb5eff9dba7e1fde9cb7709d2f00cc9f4c3cc51..2410099c2e3c72a07acb450a1e441ec47b980c46 100755 (executable)
@@ -32,7 +32,7 @@ translate = {
   'TS': 'Tempelhof-Schöneberg',
   'TK': 'Treptow-Köpenick',
   'sum': 'all of Berlin',
-  'wsum': 'sum for last 7 days',
+  'wsum': 'sum of new infections for last 7 days',
   'wavg': 'per-day average of new infections for last 7 days',
   'winc': 'incidence (x per 100k inhabitants) of new infections for last 7 days',
 }
@@ -150,7 +150,6 @@ th { text-align: left; vertical-align: bottom; }
 <tr>
 <th colspan=2></th>""")
     sorted_dates.reverse()
-    sum_district = sorted_districts[-1]
     for district in sorted_districts:
         long_form = translate[district]
         # Wrap in div because the vertical orientation otherwise fails
@@ -209,7 +208,6 @@ Abbrevations/explanations:
         intro += "%s: %s\n" % (k, translate[k])
     intro += """
 Source code: https://plomlompom.com/repos/?p=berlin-corona-table
-
 HTML view: https://plomlompom.com/berlin_corona.html
 """
     print(intro)
@@ -218,7 +216,6 @@ HTML view: https://plomlompom.com/berlin_corona.html
     # separated into 7-day units.
     sorted_dates.reverse()
     weekday_count = 0
-    sum_district = sorted_districts[-1]
     for date in sorted_dates:
 
         # Week table header.