X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=enhance_table.py;h=7be6b2986cd361d104c6526e1a5e60cd7927cefe;hb=HEAD;hp=4a060a4b758a654ee5593662cf0f66386e037bf1;hpb=fca28d3ad3def405de5853c253e0ef130eb41fdc;p=berlin-corona-table diff --git a/enhance_table.py b/enhance_table.py index 4a060a4..7be6b29 100755 --- a/enhance_table.py +++ b/enhance_table.py @@ -134,6 +134,7 @@ for i in range(len(sorted_dates)): db[district][date]['week_incidence'] = (week_sum / district_pop) * 100000 # Optimized for web browser viewing. +import calendar if output_type == 'html': print(""" @@ -143,12 +144,14 @@ th { text-align: left; vertical-align: bottom; } .vertical_header { writing-mode: vertical-rl; transform: rotate(180deg); font-weight: normal; } .repeated_head th { padding-top: 0.5em; border-bottom: 1px solid black; } .bold { font-weight: bold } +.date { vertical-align: top; padding-top: 0.5em; }
Updated daily at 9pm based on data from the "Senatsverwaltung für Gesundheit, Pflege und Gleichstellung". Source code. Plain text view (optimized for terminal curl).
+Updated daily at 7pm based on data from the "Senatsverwaltung für Gesundheit, Pflege und Gleichstellung". Updates currently inactive â check out the new dashboard instead that they offer by themselves.
Source code. Plain text view (optimized for terminal curl).
""") @@ -170,7 +173,8 @@ th { text-align: left; vertical-align: bottom; } (translate[district], district)) print(' | |||
---|---|---|---|
%s | ' % date) + weekday = calendar.day_name[datetime.date.fromisoformat(date).weekday()] + print('%s %s | ' % (date, weekday))
print('
|