From: Christian Heller Date: Fri, 3 Jul 2020 18:56:02 +0000 (+0200) Subject: Map abbrevations to long forms. X-Git-Url: https://plomlompom.com/repos/%27%29;%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20chunks.push%28escapeHTML%28span%5B2%5D%29%29;%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20chunks.push%28%27?a=commitdiff_plain;h=5252dee46a33cce9616ba4e4103b59dba2ec44c1;p=berlin-corona-table Map abbrevations to long forms. --- diff --git a/enhance_table.py b/enhance_table.py index 02a7ac9..0482bdf 100755 --- a/enhance_table.py +++ b/enhance_table.py @@ -17,6 +17,23 @@ district_pops = { 'sum': 3754418, } +# Map abbreviations to full names. +translate = { + 'CW': 'Charlottenburg-Wilmersdorf', + 'FK': 'Friedrichshain-Kreuzberg', + 'Li': 'Lichtenberg', + 'MH': 'Marzahn-Hellersdorf', + 'Mi': 'Mitte', + 'Ne': 'Neukölln', + 'Pa': 'Pankow', + 'Re': 'Reinickendorf', + 'Sp': 'Spandau', + 'SZ': 'Steglitz-Zehlendorf', + 'TS': 'Tempelhof-Schöneberg', + 'TK': 'Treptow-Köpenick', + 'sum': 'all of Berlin', +} + # Read infections table path and output type. import sys if len(sys.argv) != 3: @@ -156,21 +173,10 @@ elif output_type == 'txt': Updated daily around 9pm. Abbrevations/explanations: - -CW: Charlottenburg-Wilmersdorf -FK: Friedrichshain-Kreuzberg -Li: Lichtenberg -MH: Marzahn-Hellersdorf -Mi: Mitte -Ne: Neukölln -Pa: Pankow -Re: Reinickendorf -Sp: Spandau -SZ: Steglitz-Zehlendorf -TS: Tempelhof-Schöneberg -TK: Treptow-Köpenick -sum: sum for all the districts -wsum: sum for last 7 days +""" + for k in translate: + intro += "%s: %s\n" % (k, translate[k]) + intro += """wsum: sum 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