feat: Added more info about second vaccinations to text
This commit is contained in:
parent
af0c17ecf8
commit
c80564c801
2 changed files with 11 additions and 8 deletions
9
plot.py
9
plot.py
|
@ -58,16 +58,17 @@ def calculate_vaccination_data(data):
|
|||
total = int(np.sum(data))
|
||||
total_percentage = float(total) / einwohner_deutschland * 100
|
||||
|
||||
mean_all_time = np.mean(data)
|
||||
mean_seven_days = np.mean(data[-7:])
|
||||
|
||||
to_be_vaccinated = einwohner_deutschland - total
|
||||
|
||||
last_date = dates.iloc[-1].date()
|
||||
start_of_vaccination_date = dates[data.first_valid_index()].date()
|
||||
start_of_vaccination_index = (data != 0).argmax(axis=0)
|
||||
start_of_vaccination_date = dates[start_of_vaccination_index].date()
|
||||
days_since_start_of_vaccination = (last_date - start_of_vaccination_date).days
|
||||
days_since_start_of_reporting = (last_date - start_of_reporting_date).days
|
||||
|
||||
mean_all_time = np.mean(data[start_of_vaccination_index:])
|
||||
mean_seven_days = np.mean(data[-7:])
|
||||
|
||||
def extrapolate(rate, to_be_vaccinated):
|
||||
days_extrapolated = int(np.ceil(to_be_vaccinated / rate))
|
||||
extrapolated_dates = np.array([dates[0] + datetime.timedelta(days=i) for i in range(days_extrapolated)])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue