readding batch code table
This commit is contained in:
@@ -8,7 +8,7 @@ from DateProvider import DateProvider
|
||||
def updateBatchCodeTableHtmlFile(batchCodeTable, batchCodeTableHtmlFile):
|
||||
batchcodeOptions = getBatchcodeOptions(getBatchcodes(batchCodeTable.sort_values(by = 'Adverse Reaction Reports', ascending = False)))
|
||||
_saveBatchcodeOptions(batchcodeOptions, batchCodeTableHtmlFile)
|
||||
_saveLastUpdatedBatchCodeTable(
|
||||
saveLastUpdatedBatchCodeTable(
|
||||
DateProvider().getLastUpdatedDataSource(),
|
||||
batchCodeTableHtmlFile)
|
||||
|
||||
@@ -22,7 +22,7 @@ def _saveBatchcodeOptions(batchcodeOptions, batchCodeTableHtmlFile):
|
||||
options=batchcodeOptions),
|
||||
'lxml'))
|
||||
|
||||
def _saveLastUpdatedBatchCodeTable(lastUpdated, batchCodeTableHtmlFile):
|
||||
def saveLastUpdatedBatchCodeTable(lastUpdated, batchCodeTableHtmlFile):
|
||||
def setLastUpdated(soup):
|
||||
soup.find(id="last_updated").string.replace_with(
|
||||
lastUpdated.strftime(DateProvider.DATE_FORMAT))
|
||||
|
||||
@@ -13,11 +13,12 @@
|
||||
"pd.set_option('display.max_columns', None)\n",
|
||||
"\n",
|
||||
"import os\n",
|
||||
"from IOUtils import IOUtils\n",
|
||||
"from VAERSFileDownloader import updateVAERSFiles\n",
|
||||
"from datetime import datetime\n",
|
||||
"from DateProvider import DateProvider\n",
|
||||
"from InternationalVaersCovid19Provider import getInternationalVaersCovid19, get_international_VAERSVAX_VAERSSYMPTOMS_Covid19\n",
|
||||
"from BatchCodeTableHtmlUpdater import updateBatchCodeTableHtmlFile\n",
|
||||
"from BatchCodeTableHtmlUpdater import updateBatchCodeTableHtmlFile, saveLastUpdatedBatchCodeTable\n",
|
||||
"from BatchCodeTablePersister import createGlobalBatchCodeTable\n",
|
||||
"from SymptomByBatchcodeTableFactory import SymptomByBatchcodeTableFactory\n",
|
||||
"from HistogramFactoryAndPersister import createAndSaveGlobalHistograms\n",
|
||||
@@ -126,6 +127,19 @@
|
||||
"batchCodeTable"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "d8e81ffc",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"IOUtils.saveDataFrameAsJson(batchCodeTable, '../docs/data/batchCodeTables/Global.json')\n",
|
||||
"saveLastUpdatedBatchCodeTable(\n",
|
||||
" DateProvider().getLastUpdatedDataSource(),\n",
|
||||
" batchCodeTableHtmlFile=\"../docs/batchCodes.html\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
@@ -133,7 +147,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"updateBatchCodeTableHtmlFile(batchCodeTable, batchCodeTableHtmlFile=\"../docs/batchCodeTable.html\")"
|
||||
"updateBatchCodeTableHtmlFile(batchCodeTable, batchCodeTableHtmlFile=\"../docs/HowBadIsMyBatch.html\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user