add metadata from new columns and make every module fit to use this. add stringence of local measures as background of plot, add vaccination status to plots, mute unreasonable warnings

This commit is contained in:
fordprefect
2020-12-17 13:18:19 +01:00
parent e0d6508682
commit 22c65b1b68
10 changed files with 111 additions and 60 deletions

View File

@@ -3,6 +3,8 @@ Plot doubling time
"""
import matplotlib.pyplot as pp
import numpy as np
import warnings
warnings.filterwarnings("ignore", category=RuntimeWarning)
name="doubling_time"
def moving_average(x, w):
@@ -13,7 +15,7 @@ def plot(data, countries, pop, **kwargs):
for loc in data:
if loc not in countries:
continue
time, new_cases, new_deaths, total_cases, total_deaths = data[loc]
time, new_cases, new_deaths, total_cases, total_deaths, total_vaccinations = data[loc]['time'], data[loc]['new_cases'], data[loc]['new_deaths'], data[loc]['total_cases'], data[loc]['total_deaths'], data[loc]['total_vaccinations']
pp.figure(name, figsize=figsize)
window_size = 7