Merge branch 'main' into pages

This commit is contained in:
frankknoll
2023-03-13 02:26:03 +01:00
4 changed files with 14 additions and 15 deletions

View File

@@ -44,7 +44,9 @@
<th>Provider</th>
<th>ZIP Code</th>
<th>Lot Number</th>
<th>Summary</th>
<th>Doses Shipped</th>
<th>Statistical Number of Adverse Reaction Reports</th>
<th>Statistical Number of Adverse Reaction Reports (per 100,000)</th>
</tr>
</thead>
</table>

View File

@@ -23,11 +23,6 @@ class VaccineDistributionByZipcodeTableInitializer {
deferRender: true,
columnDefs:
[
{
searchable: false,
orderable: false,
targets: [this.#getColumnIndex('Summary')]
},
{
searchable: true,
targets: [
@@ -48,8 +43,12 @@ class VaccineDistributionByZipcodeTableInitializer {
return 1;
case 'Lot Number':
return 2;
case 'Summary':
case 'Doses Shipped':
return 3;
case 'Statistical Number of Adverse Reaction Reports':
return 4;
case 'Statistical Number of Adverse Reaction Reports (per 100,000)':
return 5;
}
}

File diff suppressed because one or more lines are too long

View File

@@ -257,11 +257,8 @@
"metadata": {},
"outputs": [],
"source": [
"def summarize(row):\n",
" ADRs = row['DOSES_SHIPPED'] / row['OVERALL_DOSES_SHIPPED'] * row['Adverse Reaction Reports']\n",
" return f\"{row['DOSES_SHIPPED']} (out of {row['OVERALL_DOSES_SHIPPED']}) shipped doses are statistically responsible for <b>{ADRs:.2f}</b> (out of {row['Adverse Reaction Reports']}) adverse reaction reports\"\n",
"\n",
"vaccineDistributionByZipcode['Summary'] = vaccineDistributionByZipcode.apply(summarize, axis = 'columns')\n",
"vaccineDistributionByZipcode['Statistical Number of Adverse Reaction Reports'] = (vaccineDistributionByZipcode['DOSES_SHIPPED'] / vaccineDistributionByZipcode['OVERALL_DOSES_SHIPPED'] * vaccineDistributionByZipcode['Adverse Reaction Reports']).round(2)\n",
"vaccineDistributionByZipcode['Statistical Number of Adverse Reaction Reports (per 100,000)'] = (vaccineDistributionByZipcode['DOSES_SHIPPED'] / vaccineDistributionByZipcode['OVERALL_DOSES_SHIPPED'] * 100000).round().astype(int)\n",
"vaccineDistributionByZipcode"
]
},
@@ -272,7 +269,7 @@
"metadata": {},
"outputs": [],
"source": [
"vaccineDistributionByZipcode = vaccineDistributionByZipcode[['PROVIDER_NAME', 'ZIPCODE_SHP', 'LOT_NUMBER', 'Summary']]\n",
"vaccineDistributionByZipcode = vaccineDistributionByZipcode[['PROVIDER_NAME', 'ZIPCODE_SHP', 'LOT_NUMBER', 'DOSES_SHIPPED', 'Statistical Number of Adverse Reaction Reports', 'Statistical Number of Adverse Reaction Reports (per 100,000)']]\n",
"vaccineDistributionByZipcode"
]
},
@@ -287,7 +284,8 @@
" columns = {\n",
" 'PROVIDER_NAME': 'Provider',\n",
" 'ZIPCODE_SHP': 'ZIP Code',\n",
" 'LOT_NUMBER': 'Lot Number'\n",
" 'LOT_NUMBER': 'Lot Number',\n",
" 'DOSES_SHIPPED': 'Doses Shipped'\n",
" })\n",
"vaccineDistributionByZipcode"
]