db[district][date]['week_incidence'] = (week_sum / district_pop) * 100000
# Optimized for web browser viewing.
+import calendar
if output_type == 'html':
print("""<!DOCTYPE html>
<html>
(translate[district], district))
print('</tr>')
print('<tr class="day_row">')
- print('<td>%s</td>' % date)
+ weekday = calendar.day_name[datetime.date.fromisoformat(date).weekday()]
+ print('<td>%s<br />(%s)</td>' % (date, weekday))
print('<td><table>')
for abbr in ['+', 'Σ', 'Ø', 'i']:
print('<tr><th><abbr title="%s">%s</abbr></th></tr>' %
print('-'*77)
# Day table.
- print(date)
+ weekday = calendar.day_name[datetime.date.fromisoformat(date).weekday()]
+ print('%s (%s)' % (date, weekday))
new_infections = []
weekly_sums = []
weekly_avgs = []