renaming "ADRs" to "Total Number of Adverse Reaction Reports"
This commit is contained in:
@@ -59,7 +59,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>BATCH</th>
|
||||
<th>ADRs</th>
|
||||
<th>Total Number of Adverse Reaction Reports</th>
|
||||
<th>DEATHS</th>
|
||||
<th>DISABILITIES</th>
|
||||
<th>LIFE THREATENING ILLNESSES</th>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -179,7 +179,7 @@
|
||||
" groupBy,\n",
|
||||
" # FK-TODO: rename \"ADRs\" and \"Total reports\" to \"Total Number of Adverse Reaction Reports\" in all places\n",
|
||||
" columnNameMappingsDict = {\n",
|
||||
" \"DIED_size\": \"ADRs\",\n",
|
||||
" \"DIED_size\": \"Total Number of Adverse Reaction Reports\",\n",
|
||||
" \"DIED_sum\": \"DEATHS\",\n",
|
||||
" \"L_THREAT_sum\": \"LIFE THREATENING ILLNESSES\",\n",
|
||||
" \"DISABLE_sum\": \"DISABILITIES\",\n",
|
||||
@@ -231,7 +231,7 @@
|
||||
" def createBatchCodeTable(dataFrame : pd.DataFrame, dose):\n",
|
||||
" dataFrame = DataFrameFilter().filterByCovid19(dataFrame)\n",
|
||||
" dataFrame = DataFrameFilter().filterBy(dataFrame, dose = dose)\n",
|
||||
" return BatchCodeTableFactory._createSummationTableByVAX_LOT(dataFrame)[['ADRs', 'DEATHS', 'DISABILITIES', 'LIFE THREATENING ILLNESSES', 'COMPANY']]\n",
|
||||
" return BatchCodeTableFactory._createSummationTableByVAX_LOT(dataFrame)[['Total Number of Adverse Reaction Reports', 'DEATHS', 'DISABILITIES', 'LIFE THREATENING ILLNESSES', 'COMPANY']]\n",
|
||||
"\n",
|
||||
" # create table from https://www.howbadismybatch.com/combined.html\n",
|
||||
" @staticmethod\n",
|
||||
@@ -243,8 +243,8 @@
|
||||
" @staticmethod\n",
|
||||
" def _createSummationTableByVAX_LOT(dataFrame):\n",
|
||||
" batchCodeTable = SummationTableFactory.createSummationTable(dataFrame.groupby('VAX_LOT'))\n",
|
||||
" batchCodeTable = batchCodeTable[['ADRs', 'DEATHS', 'DISABILITIES', 'LIFE THREATENING ILLNESSES', 'HOSPITALISATIONS', 'EMERGENCY ROOM OR DOCTOR VISITS']]\n",
|
||||
" batchCodeTable = batchCodeTable.sort_values(by = 'ADRs', ascending = False)\n",
|
||||
" batchCodeTable = batchCodeTable[['Total Number of Adverse Reaction Reports', 'DEATHS', 'DISABILITIES', 'LIFE THREATENING ILLNESSES', 'HOSPITALISATIONS', 'EMERGENCY ROOM OR DOCTOR VISITS']]\n",
|
||||
" batchCodeTable = batchCodeTable.sort_values(by = 'Total Number of Adverse Reaction Reports', ascending = False)\n",
|
||||
" return BatchCodeTableFactory._addCompanyColumn(batchCodeTable, BatchCodeTableFactory._createCompanyByBatchCodeTable(dataFrame))\n",
|
||||
"\n",
|
||||
" @staticmethod\n",
|
||||
@@ -691,7 +691,7 @@
|
||||
" # Then\n",
|
||||
" batchCodeTableExpected = pd.DataFrame(\n",
|
||||
" data = {\n",
|
||||
" 'ADRs': [1, 1],\n",
|
||||
" 'Total Number of Adverse Reaction Reports': [1, 1],\n",
|
||||
" 'DEATHS': [0, 1],\n",
|
||||
" 'DISABILITIES': [1, 0],\n",
|
||||
" 'LIFE THREATENING ILLNESSES': [0, 1],\n",
|
||||
@@ -755,7 +755,7 @@
|
||||
" # Then\n",
|
||||
" batchCodeTableExpected = pd.DataFrame(\n",
|
||||
" data = {\n",
|
||||
" 'ADRs': [2, 1],\n",
|
||||
" 'Total Number of Adverse Reaction Reports': [2, 1],\n",
|
||||
" 'DEATHS': [0, 1],\n",
|
||||
" 'DISABILITIES': [2, 0],\n",
|
||||
" 'LIFE THREATENING ILLNESSES': [0, 0],\n",
|
||||
@@ -1197,7 +1197,7 @@
|
||||
"def createADRsByVAX_LOTTable(vaers, manufacturer):\n",
|
||||
" dataFrame = DataFrameFilter().filterByCovid19(vaers)\n",
|
||||
" dataFrame = DataFrameFilter().filterBy(dataFrame, manufacturer = manufacturer)\n",
|
||||
" batchCodeTable = BatchCodeTableFactory._createSummationTableByVAX_LOT(dataFrame)[['ADRs']].reset_index()\n",
|
||||
" batchCodeTable = BatchCodeTableFactory._createSummationTableByVAX_LOT(dataFrame)[['Total Number of Adverse Reaction Reports']].reset_index()\n",
|
||||
" return batchCodeTable\n",
|
||||
"\n",
|
||||
"def filterColumnOfDataFrameWithRegexp(dataFrame, column, regexp):\n",
|
||||
@@ -1219,7 +1219,7 @@
|
||||
"twoLetterPrefix = re.compile(r'^[a-zA-Z]{2}')\n",
|
||||
"batchCodeTable = filterColumnOfDataFrameWithRegexp(dataFrame = batchCodeTable, column = 'VAX_LOT_PREFIX', regexp = twoLetterPrefix)\n",
|
||||
"batchCodeTable = batchCodeTable[batchCodeTable['VAX_LOT_PREFIX'].isin(['EN', 'EP', 'ER', 'EW', 'FA', 'FC', 'FD', 'FE', 'FH'])]\n",
|
||||
"batchCodeTable = batchCodeTable[batchCodeTable['ADRs'] > 400]\n",
|
||||
"batchCodeTable = batchCodeTable[batchCodeTable['Total Number of Adverse Reaction Reports'] > 400]\n",
|
||||
"batchCodeTable"
|
||||
]
|
||||
},
|
||||
@@ -1234,7 +1234,7 @@
|
||||
"\n",
|
||||
"sns.set(rc = {'figure.figsize': (11.7, 8.27)})\n",
|
||||
"sns.set_theme()\n",
|
||||
"chart = sns.stripplot(x = \"VAX_LOT_PREFIX\", y = \"ADRs\", data = batchCodeTable)"
|
||||
"chart = sns.stripplot(x = \"VAX_LOT_PREFIX\", y = \"Total Number of Adverse Reaction Reports\", data = batchCodeTable)"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -1244,7 +1244,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"sns.pointplot(x = \"VAX_LOT_PREFIX\", y = \"ADRs\", data = batchCodeTable, estimator = np.mean)"
|
||||
"sns.pointplot(x = \"VAX_LOT_PREFIX\", y = \"Total Number of Adverse Reaction Reports\", data = batchCodeTable, estimator = np.mean)"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -1257,7 +1257,7 @@
|
||||
"import seaborn as sns\n",
|
||||
"sns.set_theme(style = \"ticks\", palette = \"pastel\")\n",
|
||||
"\n",
|
||||
"sns.boxplot(x = \"VAX_LOT_PREFIX\", y = \"ADRs\", data = batchCodeTable)"
|
||||
"sns.boxplot(x = \"VAX_LOT_PREFIX\", y = \"Total Number of Adverse Reaction Reports\", data = batchCodeTable)"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -1282,7 +1282,7 @@
|
||||
"batchCodeTable = filterColumnOfDataFrameWithRegexp(dataFrame = batchCodeTable, column = 'VAX_LOT', regexp = modernaBatchCodePrefix)\n",
|
||||
"batchCodeTable['CONCENTRATION'] = batchCodeTable['VAX_LOT'].str[3]\n",
|
||||
"batchCodeTable = batchCodeTable.sort_values(by = 'CONCENTRATION', ascending = True)\n",
|
||||
"batchCodeTable = batchCodeTable[batchCodeTable['ADRs'] > 400]\n",
|
||||
"batchCodeTable = batchCodeTable[batchCodeTable['Total Number of Adverse Reaction Reports'] > 400]\n",
|
||||
"batchCodeTable"
|
||||
]
|
||||
},
|
||||
@@ -1299,7 +1299,7 @@
|
||||
"\n",
|
||||
"sns.set(rc = {'figure.figsize': (11.7, 8.27)})\n",
|
||||
"sns.set_theme()\n",
|
||||
"chart = sns.stripplot(x = \"CONCENTRATION\", y = \"ADRs\", data = batchCodeTable, order = order)"
|
||||
"chart = sns.stripplot(x = \"CONCENTRATION\", y = \"Total Number of Adverse Reaction Reports\", data = batchCodeTable, order = order)"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -1309,7 +1309,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"sns.pointplot(x = \"CONCENTRATION\", y = \"ADRs\", data = batchCodeTable, estimator = np.mean, order = order)"
|
||||
"sns.pointplot(x = \"CONCENTRATION\", y = \"Total Number of Adverse Reaction Reports\", data = batchCodeTable, estimator = np.mean, order = order)"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -1322,7 +1322,7 @@
|
||||
"import seaborn as sns\n",
|
||||
"sns.set_theme(style = \"ticks\", palette = \"pastel\")\n",
|
||||
"\n",
|
||||
"sns.boxplot(x = \"CONCENTRATION\", y = \"ADRs\", data = batchCodeTable, order = order)"
|
||||
"sns.boxplot(x = \"CONCENTRATION\", y = \"Total Number of Adverse Reaction Reports\", data = batchCodeTable, order = order)"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user