refactoring

This commit is contained in:
frankknoll
2022-11-22 17:35:05 +01:00
parent 36a5733a17
commit c23f61a200
2 changed files with 7 additions and 3 deletions

View File

@@ -80,7 +80,10 @@
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"updateVAERSFiles(needsUpdate, getWorkingDirectory())" "updateVAERSFiles(\n",
" needsUpdate,\n",
" years = [2022],\n",
" workingDirectory = getWorkingDirectory())"
] ]
}, },
{ {

View File

@@ -56,7 +56,8 @@ def downloadVAERSFileAndUnzip(file, workingDirectory):
zipFile = downloadedFile, zipFile = downloadedFile,
dstDir = workingDirectory + '/VAERS/') dstDir = workingDirectory + '/VAERS/')
def updateVAERSFiles(needsUpdate, workingDirectory): def updateVAERSFiles(needsUpdate, years, workingDirectory):
if needsUpdate: if needsUpdate:
downloadVAERSFileAndUnzip('2022VAERSData.zip', workingDirectory) for year in years:
downloadVAERSFileAndUnzip(f'{year}VAERSData.zip', workingDirectory)
downloadVAERSFileAndUnzip('NonDomesticVAERSData.zip', workingDirectory) downloadVAERSFileAndUnzip('NonDomesticVAERSData.zip', workingDirectory)