feat: Only require one read of data file
This commit is contained in:
parent
7d97f96fe7
commit
5b3e104df4
1 changed files with 4 additions and 3 deletions
7
plot.py
7
plot.py
|
@ -11,7 +11,9 @@ einwohner_deutschland = 83190556
|
||||||
# DIN A4 Plots
|
# DIN A4 Plots
|
||||||
plt.rcParams["figure.figsize"] = [11.69, 8.27]
|
plt.rcParams["figure.figsize"] = [11.69, 8.27]
|
||||||
|
|
||||||
raw_data = pd.read_excel('Impfquotenmonitoring.xlsx', sheet_name='Impfungen_proTag', engine='openpyxl')
|
rki_file = pd.read_excel('Impfquotenmonitoring.xlsx', sheet_name=None, engine='openpyxl')
|
||||||
|
|
||||||
|
raw_data = rki_file['Impfungen_proTag']
|
||||||
|
|
||||||
impfungen = raw_data[:-1].dropna()
|
impfungen = raw_data[:-1].dropna()
|
||||||
|
|
||||||
|
@ -34,8 +36,7 @@ extrapolated_vaccinations = mean_vaccinations_daily * range(days_extrapolated)
|
||||||
#print_stand = stand.isoformat()
|
#print_stand = stand.isoformat()
|
||||||
|
|
||||||
# Stand aus offiziellen Angaben auslesen
|
# Stand aus offiziellen Angaben auslesen
|
||||||
stand = pd.read_excel('Impfquotenmonitoring.xlsx', sheet_name='Erläuterung', engine='openpyxl').iloc[1][0]
|
stand = rki_file['Erläuterung'].iloc[1][0]
|
||||||
print(stand)
|
|
||||||
|
|
||||||
stand_regex = re.compile('^Datenstand: (\d\d.\d\d.\d\d\d\d, \d\d:\d\d) Uhr$')
|
stand_regex = re.compile('^Datenstand: (\d\d.\d\d.\d\d\d\d, \d\d:\d\d) Uhr$')
|
||||||
m = stand_regex.match(stand)
|
m = stand_regex.match(stand)
|
||||||
|
|
Loading…
Reference in a new issue