refactoring
This commit is contained in:
@@ -103,26 +103,6 @@
|
||||
" downloadVAERSFileAndUnzip('NonDomesticVAERSData.zip', workingDirectory)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "3ebcba86",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from DataFrameFilter import DataFrameFilter"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "71456a79",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from BatchCodeTableFactory import BatchCodeTableFactory"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
@@ -130,17 +110,17 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from BatchCodeTableHtmlUpdater import saveCountryOptions, saveLastUpdatedBatchCodeTable"
|
||||
"from BatchCodeTableHtmlUpdater import updateBatchCodeTableHtmlFile"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "86e0e4f2",
|
||||
"id": "62132e68",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from VaersReader import getVaersForYears, getNonDomesticVaers"
|
||||
"from InternationalVaersCovid19Provider import getInternationalVaersCovid19"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -150,42 +130,10 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"internationalVaers = pd.concat([getVaersForYears([2020, 2021, 2022]), getNonDomesticVaers()])\n",
|
||||
"internationalVaersCovid19 = DataFrameFilter().filterByCovid19(internationalVaers)\n",
|
||||
"internationalVaersCovid19 = getInternationalVaersCovid19([2020, 2021, 2022])\n",
|
||||
"internationalVaersCovid19"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "ff259a35",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from BatchCodeTablePersister import createAndSaveBatchCodeTableForCountry, createAndSaveBatchCodeTablesForCountries"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "cc1ef82a",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from HtmlUtils import getCountryOptions"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "0c4d04fb",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"countries = sorted(internationalVaersCovid19['COUNTRY'].unique())\n",
|
||||
"countryOptions = getCountryOptions(countries)\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
@@ -193,38 +141,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"saveCountryOptions(countryOptions)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "9c7485b5",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"saveLastUpdatedBatchCodeTable(dateProvider.getLastUpdatedDataSource())"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "7e7e01a5",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"minADRsForLethality = 100\n",
|
||||
"batchCodeTableFactory = BatchCodeTableFactory(internationalVaersCovid19)\n",
|
||||
"\n",
|
||||
"createAndSaveBatchCodeTablesForCountries(\n",
|
||||
" createBatchCodeTableForCountry = lambda country: batchCodeTableFactory.createBatchCodeTableByCountry(country),\n",
|
||||
" countries = countries,\n",
|
||||
" minADRsForLethality = minADRsForLethality)\n",
|
||||
"\n",
|
||||
"createAndSaveBatchCodeTableForCountry(\n",
|
||||
" createBatchCodeTableForCountry = lambda country: batchCodeTableFactory.createGlobalBatchCodeTable(),\n",
|
||||
" country = 'Global',\n",
|
||||
" minADRsForLethality = minADRsForLethality)"
|
||||
"updateBatchCodeTableHtmlFile(internationalVaersCovid19)"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user