X-Git-Url: https://plomlompom.com/repos/?p=berlin-corona-table;a=blobdiff_plain;f=enhance_table.py;h=785e231a681b8f0862fa206eeaf1fc80c7c42faf;hp=0b30d216f5105d66391251659427caa7903f316a;hb=27d911cf01028ff3e2fe9f87b453f3e34222adae;hpb=049ba1c6850f9344523f8efd46c837a6c15263ee diff --git a/enhance_table.py b/enhance_table.py index 0b30d21..785e231 100755 --- a/enhance_table.py +++ b/enhance_table.py @@ -145,6 +145,7 @@ if output_type == 'html': 'transform: rotate(180deg);">%s' % long_form) print('') sorted_dates.reverse() + sum_district = sorted_districts[-1] for date in sorted_dates: print('') print('%s' % date) @@ -163,7 +164,10 @@ if output_type == 'html': week_inc = '%.1f' % district_data['week_incidence'] print('') print(new_infections) - print('
') + if district == sum_district: + print('
') + else: + print('
') print('' % (long_wsum, week_sum)) print('' % (long_wavg, week_avg)) print('' % (long_winc, week_inc))
%s%s
%s%s
%s%s