feat: Subfolders for data files and plots
This commit is contained in:
parent
72b4e6c940
commit
55147eeed5
3 changed files with 11 additions and 2 deletions
3
Plots/.gitignore
vendored
Normal file
3
Plots/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
*
|
||||
!.gitignore
|
||||
|
3
Quellen/.gitignore
vendored
Normal file
3
Quellen/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
*
|
||||
!.gitignore
|
||||
|
7
plot.py
7
plot.py
|
@ -9,6 +9,9 @@ import datetime
|
|||
import re
|
||||
import requests as req
|
||||
|
||||
sources_folder = 'Quellen'
|
||||
plots_folder = 'Plots'
|
||||
|
||||
|
||||
einwohner_deutschland = 83190556
|
||||
|
||||
|
@ -23,7 +26,7 @@ plt.rcParams["figure.figsize"] = [11.69, 8.27]
|
|||
|
||||
# Download
|
||||
|
||||
filename = '{}_Impfquotenmonitoring.xlsx'.format(filename_now)
|
||||
filename = '{}/{}_Impfquotenmonitoring.xlsx'.format(sources_folder, filename_now)
|
||||
|
||||
r = req.get('https://www.rki.de/DE/Content/InfAZ/N/Neuartiges_Coronavirus/Daten/Impfquotenmonitoring.xlsx?__blob=publicationFile')
|
||||
|
||||
|
@ -102,7 +105,7 @@ def plot_extrapolation_portion(percentage):
|
|||
|
||||
ax2.set_ylabel('Kumulierte Impfungen')
|
||||
|
||||
plt.savefig('{}_extrapolated_to_{}_percent.pdf'.format(filename_stand, print_percentage))
|
||||
plt.savefig('{}/{}_extrapolated_to_{}_percent.pdf'.format(plots_folder, filename_stand, print_percentage))
|
||||
plt.close()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue