handlich vaccines in UI
This commit is contained in:
@@ -439,8 +439,8 @@
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from SymptomsCausedByVaccines.HtmlUpdater import updateHtmlFile\n",
|
||||
"from src.SymptomsCausedByVaccines.PrrSeriesFactory import PrrSeriesFactory\n",
|
||||
"from src.SymptomsCausedByVaccines.PrrSeriesTransformer import PrrSeriesTransformer\n",
|
||||
"from SymptomsCausedByVaccines.PrrSeriesFactory import PrrSeriesFactory\n",
|
||||
"from SymptomsCausedByVaccines.PrrSeriesTransformer import PrrSeriesTransformer\n",
|
||||
"from SymptomsCausedByVaccines.ProportionalReportingRatiosPersister import saveProportionalReportingRatios\n",
|
||||
"import os\n",
|
||||
"import pandas as pd"
|
||||
@@ -537,6 +537,7 @@
|
||||
"source": [
|
||||
"updateHtmlFile(\n",
|
||||
" symptoms = list(prrByVaccineAndSymptom.columns),\n",
|
||||
" vaccines = list(prrByVaccineAndSymptom.index),\n",
|
||||
" htmlFile = \"../docs/SymptomsCausedByVaccines/index.html\")"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,16 +1,21 @@
|
||||
from bs4 import BeautifulSoup
|
||||
from HtmlTransformerUtil import HtmlTransformerUtil
|
||||
from DateProvider import DateProvider
|
||||
from SymptomsCausedByVaccines.HtmlUtils import getSymptomOptions
|
||||
from SymptomsCausedByVaccines.HtmlUtils import getSymptomOptions, getVaccineOptions
|
||||
from SymptomsCausedByVaccines.OptionsSetter import OptionsSetter
|
||||
|
||||
|
||||
def updateHtmlFile(symptoms, htmlFile):
|
||||
def updateHtmlFile(symptoms, vaccines, htmlFile):
|
||||
_saveOptions(
|
||||
options = getSymptomOptions(symptoms),
|
||||
htmlFile = htmlFile,
|
||||
selectElementId = 'symptomSelect')
|
||||
|
||||
_saveOptions(
|
||||
options = getVaccineOptions(vaccines),
|
||||
htmlFile = htmlFile,
|
||||
selectElementId = 'vaccineSelect')
|
||||
|
||||
def _saveOptions(options, htmlFile, selectElementId):
|
||||
HtmlTransformerUtil().applySoupTransformerToFile(
|
||||
file=htmlFile,
|
||||
|
||||
Reference in New Issue
Block a user