fix data url and adapt to new data format, including type conversion, location name changes etc
This commit is contained in:
@@ -19,7 +19,10 @@ def plot(data, countries, pop):
|
||||
window_size = 7
|
||||
tchar = moving_average(np.array(new_cases),window_size)/moving_average(np.array(total_cases),window_size)
|
||||
thalf = np.log(2)/tchar
|
||||
day_of_100_cases = np.argwhere(np.array(total_cases) > 99)[0][0]
|
||||
try:
|
||||
day_of_100_cases = np.argwhere(np.array(total_cases) > 99)[0][0]
|
||||
except:
|
||||
return
|
||||
new_time_axis = time[int(window_size/2):-int(window_size/2)]
|
||||
pp.plot(new_time_axis[50:], thalf[50:], label=f"{loc}", marker=".")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user