renaming a column

This commit is contained in:
frankknoll
2022-02-19 15:48:55 +01:00
parent 608f268a84
commit c9764d09a5
15 changed files with 29 additions and 25 deletions

View File

@@ -1 +1 @@
{"columns":["Batch","Total Number of Adverse Reaction Reports","Deaths","Disabilities","Life Threatening Illnesses","Severe reports (%)"],"data":[["3002188",1,0,0,1,null],["EX2405",1,0,1,0,null],["FL350",1,0,1,0,null],["FF3438",1,0,1,0,null],["FE8163",2,0,2,0,null],["FF4222",1,0,1,0,null],["EP2163 SERIAL 1",1,1,0,0,null],["FF4206",2,0,1,0,null],["NO BATCH NUMBER",33,4,0,0,null],["UNKNOWN",58,1,4,2,null],["FA7338",1,0,0,0,null],["FE3712",1,0,0,0,null],["ER7449",1,0,0,0,null],["3006325",1,0,0,0,null],["FG1657",1,0,0,0,null],["FG3712",1,0,0,0,null],["FG7372",1,0,0,0,null],["FH3219",1,0,0,0,null],["EJ8516",1,0,0,0,null],["FL3560",1,0,0,0,null],["FN0565",1,0,0,0,null],["UNSURE",1,0,0,0,null]]}
{"columns":["Batch","Total Number of Adverse Reaction Reports","Deaths","Disabilities","Life Threatening Illnesses","Severe reports"],"data":[["3002188",1,0,0,1,null],["EX2405",1,0,1,0,null],["FL350",1,0,1,0,null],["FF3438",1,0,1,0,null],["FE8163",2,0,2,0,null],["FF4222",1,0,1,0,null],["EP2163 SERIAL 1",1,1,0,0,null],["FF4206",2,0,1,0,null],["NO BATCH NUMBER",33,4,0,0,null],["UNKNOWN",58,1,4,2,null],["FA7338",1,0,0,0,null],["FE3712",1,0,0,0,null],["ER7449",1,0,0,0,null],["3006325",1,0,0,0,null],["FG1657",1,0,0,0,null],["FG3712",1,0,0,0,null],["FG7372",1,0,0,0,null],["FH3219",1,0,0,0,null],["EJ8516",1,0,0,0,null],["FL3560",1,0,0,0,null],["FN0565",1,0,0,0,null],["UNSURE",1,0,0,0,null]]}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -19,7 +19,7 @@
'Deaths': 2,
'Disabilities': 3,
'Life Threatening Illnesses': 4,
'Severe reports (%)': 5,
'Severe reports': 5,
};
return $('#batchCodeTable').DataTable(
{
@@ -43,7 +43,7 @@
columnIndex['Deaths'],
columnIndex['Disabilities'],
columnIndex['Life Threatening Illnesses'],
columnIndex['Severe reports (%)']
columnIndex['Severe reports']
]
},
{
@@ -51,7 +51,7 @@
const severeReports = parseFloat(data);
return !isNaN(severeReports) ? severeReports.toFixed(2) + " %" : '';
},
targets: [columnIndex['Severe reports (%)']]
targets: [columnIndex['Severe reports']]
}
]
});
@@ -112,7 +112,7 @@
<th>Deaths</th>
<th>Disabilities</th>
<th>Life Threatening Illnesses</th>
<th>Severe reports (%)</th>
<th>Severe reports</th>
</tr>
</thead>
</table>

View File

@@ -212,8 +212,8 @@
" \"DISABLE_sum\": \"Disabilities\",\n",
" \"SEVERE_sum\": \"Severities\"\n",
" })\n",
" summationTable['Severe reports (%)'] = summationTable['Severities'] / summationTable['Total Number of Adverse Reaction Reports'] * 100\n",
" summationTable = summationTable[['Total Number of Adverse Reaction Reports', 'Deaths', 'Disabilities', 'Life Threatening Illnesses', 'Severe reports (%)']]\n",
" summationTable['Severe reports'] = summationTable['Severities'] / summationTable['Total Number of Adverse Reaction Reports'] * 100\n",
" summationTable = summationTable[['Total Number of Adverse Reaction Reports', 'Deaths', 'Disabilities', 'Life Threatening Illnesses', 'Severe reports']]\n",
" return summationTable\n",
"\n",
" @staticmethod\n",
@@ -392,13 +392,13 @@
" def createInternationalLotTable(dataFrame):\n",
" dataFrame = DataFrameFilter().filterByCovid19(dataFrame)\n",
" internationalLotTable = InternationalLotTableFactory._createInternationalLotTable(dataFrame)\n",
" return internationalLotTable.sort_values(by = 'Severe reports (%)', ascending = False)\n",
" return internationalLotTable.sort_values(by = 'Severe reports', ascending = False)\n",
"\n",
" @staticmethod\n",
" def createBatchCodeTableByCountry(dataFrame : pd.DataFrame, country):\n",
" dataFrame = DataFrameFilter().filterByCovid19(dataFrame)\n",
" batchCodeTable = InternationalLotTableFactory._createBatchCodeTableByCountry(dataFrame, country)\n",
" return batchCodeTable.sort_values(by = 'Severe reports (%)', ascending = False)\n",
" return batchCodeTable.sort_values(by = 'Severe reports', ascending = False)\n",
"\n",
" @staticmethod\n",
" def _createInternationalLotTable(dataFrame):\n",
@@ -1005,7 +1005,7 @@
" 'Deaths': [2, 1],\n",
" 'Disabilities': [1, 0],\n",
" 'Life Threatening Illnesses': [1, 0],\n",
" 'Severe reports (%)': [2/2 * 100, 1/1 * 100]\n",
" 'Severe reports': [2/2 * 100, 1/1 * 100]\n",
" },\n",
" index = pd.Index(['1', '2'], dtype = \"string\", name = 'Dose')))\n",
" \n",
@@ -1036,7 +1036,7 @@
" 'Deaths': [2, 1],\n",
" 'Disabilities': [1, 0],\n",
" 'Life Threatening Illnesses': [1, 0],\n",
" 'Severe reports (%)': [2/2 * 100, 1/1 * 100]\n",
" 'Severe reports': [2/2 * 100, 1/1 * 100]\n",
" },\n",
" index = pd.MultiIndex.from_tuples(\n",
" [\n",
@@ -1082,7 +1082,7 @@
" assert_frame_equal(\n",
" internationalLotTable,\n",
" TestHelper.createDataFrame(\n",
" columns = ['Total Number of Adverse Reaction Reports', 'Deaths', 'Disabilities', 'Life Threatening Illnesses', 'Severe reports (%)'],\n",
" columns = ['Total Number of Adverse Reaction Reports', 'Deaths', 'Disabilities', 'Life Threatening Illnesses', 'Severe reports'],\n",
" data = [ [2, 2, 1, 1, 2/2 * 100],\n",
" [1, 1, 0, 0, 1/1 * 100],\n",
" [2, 0, 0, 0, 0/2 * 100]],\n",
@@ -1117,7 +1117,7 @@
" assert_frame_equal(\n",
" batchCodeTable,\n",
" TestHelper.createDataFrame(\n",
" columns = ['Total Number of Adverse Reaction Reports', 'Deaths', 'Disabilities', 'Life Threatening Illnesses', 'Severe reports (%)'],\n",
" columns = ['Total Number of Adverse Reaction Reports', 'Deaths', 'Disabilities', 'Life Threatening Illnesses', 'Severe reports'],\n",
" data = [ [2, 1, 2, 2, 2/2 * 100],\n",
" [1, 0, 0, 0, 0/1 * 100]],\n",
" index = pd.Index(\n",
@@ -1353,10 +1353,12 @@
"outputs": [],
"source": [
"def createAndSaveAndDisplayBatchCodeTableByCountry(nonDomesticVaers, country, minADRsForLethality = None):\n",
" # FK-TODO: add Lethality column\n",
" # FK-TODO: add Company column\n",
" batchCodeTable = InternationalLotTableFactory.createBatchCodeTableByCountry(nonDomesticVaers, country)\n",
" batchCodeTable.index.set_names(\"Batch\", inplace = True)\n",
" if minADRsForLethality is not None:\n",
" batchCodeTable.loc[batchCodeTable['Total Number of Adverse Reaction Reports'] < minADRsForLethality, 'Severe reports (%)'] = np.nan\n",
" batchCodeTable.loc[batchCodeTable['Total Number of Adverse Reaction Reports'] < minADRsForLethality, 'Severe reports'] = np.nan\n",
" IOUtils.saveDataFrame(batchCodeTable, '../data/' + country)\n",
" display(country + \":\", batchCodeTable)\n",
"\n",
@@ -1374,6 +1376,7 @@
"source": [
"createAndSaveAndDisplayBatchCodeTablesByCountry(\n",
" nonDomesticVaers,\n",
" # FK-TODO: create BatchCodeTables for all available countries\n",
" [\n",
" 'United Kingdom',\n",
" 'France',\n",

View File

@@ -8,6 +8,7 @@ FK-FIXME:
FK-TODO:
- rename project and html-page to VaccineAdverseEventInfo ?
- move html pages to docs folder
- publish all figures and tables (as interactive HTML-Pages?)
- Vergleich Grippe mit Covid19:
- https://www.bitchute.com/video/4HlIyBmOEJeY/