continuing to remove Symptoms caused by COVID Lots

This commit is contained in:
Frank Knoll
2024-07-12 20:48:55 +02:00
parent 8d45aa1c43
commit 724e55e5f1
3067 changed files with 1 additions and 6599 deletions

View File

@@ -455,7 +455,7 @@
"outputs": [],
"source": [
"from SymptomsCausedByVaccines.DataFrameFilter import DataFrameFilter\n",
"from SymptomsCausedByVaccines.HtmlUpdater import updateHtmlFile, updateHtmlFile4SymptomsCausedByCOVIDLots\n",
"from SymptomsCausedByVaccines.HtmlUpdater import updateHtmlFile\n",
"from SymptomsCausedByVaccines.PrrSeriesFactory import PrrSeriesFactory\n",
"from SymptomsCausedByVaccines.PrrSeriesTransformer import PrrSeriesTransformer\n",
"from SymptomsCausedByVaccines.ProportionalReportingRatiosPersister import saveProportionalReportingRatios\n",
@@ -592,109 +592,6 @@
" defaultSelectVaccineOptionText = 'Select Vaccine')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Symptoms caused by COVID Lots"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"prrByLotAndSymptom = pd.read_excel(\n",
" io = 'data/symcolumns500.xlsx',\n",
" index_col = 'VAX_LOT')\n",
"prrByLotAndSymptom\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"prrByLotBySymptom = PrrSeriesFactory.getPrrByVaccineBySymptom(prrByLotAndSymptom)\n",
"prrByLotBySymptom"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"prrBySymptomByLot = PrrSeriesFactory.getPrrBySymptomByVaccine(prrByLotAndSymptom)\n",
"prrBySymptomByLot"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"prrByLotBySymptomWithoutZeroPrrs = PrrSeriesTransformer.filterByNonZeroPrrs(prrByLotBySymptom)\n",
"prrByLotBySymptomWithoutZeroPrrs"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"prrBySymptomByLotWithHighPrrs = PrrSeriesTransformer.filterPrrs(prrBySymptomByLot, lambda prr: prr > 1)\n",
"prrBySymptomByLotWithHighPrrs"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"webAppBaseDir = os.getcwd() + '/../docs/SymptomsCausedByCOVIDLots'"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"saveProportionalReportingRatios(\n",
" prrByLotBySymptomWithoutZeroPrrs,\n",
" directory = os.path.normpath(webAppBaseDir + '/data/ProportionalReportingRatios/symptoms'))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"saveProportionalReportingRatios(\n",
" prrBySymptomByLotWithHighPrrs,\n",
" directory = os.path.normpath(webAppBaseDir + '/data/ProportionalReportingRatios/vaccines'))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# FK-TODO: reactivate\n",
"#updateHtmlFile4SymptomsCausedByCOVIDLots(\n",
"# symptoms = list(prrByLotAndSymptom.columns),\n",
"# batches = list(prrByLotAndSymptom.index),\n",
"# htmlFile = os.path.normpath(webAppBaseDir + '/index.html'))"
]
},
{
"cell_type": "markdown",
"metadata": {},

View File

@@ -21,19 +21,6 @@ def updateHtmlFile(symptomsDescr, vaccinesDescr, htmlFile, defaultSelectVaccineO
htmlFile = htmlFile,
selectElementId = 'vaccineSelect')
def updateHtmlFile4SymptomsCausedByCOVIDLots(symptoms, batches, htmlFile):
symptomOptions = getSymptomOptions(symptoms)
for selectElementId in ['symptomSelect', 'symptomSelectX', 'symptomSelectY']:
_saveOptions(
options = symptomOptions,
htmlFile = htmlFile,
selectElementId = selectElementId)
_saveOptions(
options = getVaccineOptions(batches, 'Select Batch'),
htmlFile = htmlFile,
selectElementId = 'vaccineSelect')
def _saveOptions(options, htmlFile, selectElementId):
HtmlTransformerUtil().applySoupTransformerToFile(
file=htmlFile,