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>Provider</th>
<th>ZIP Code</th> <th>ZIP Code</th>
<th>Lot Number</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> </tr>
</thead> </thead>
</table> </table>

View File

@@ -23,11 +23,6 @@ class VaccineDistributionByZipcodeTableInitializer {
deferRender: true, deferRender: true,
columnDefs: columnDefs:
[ [
{
searchable: false,
orderable: false,
targets: [this.#getColumnIndex('Summary')]
},
{ {
searchable: true, searchable: true,
targets: [ targets: [
@@ -48,8 +43,12 @@ class VaccineDistributionByZipcodeTableInitializer {
return 1; return 1;
case 'Lot Number': case 'Lot Number':
return 2; return 2;
case 'Summary': case 'Doses Shipped':
return 3; 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": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"def summarize(row):\n", "vaccineDistributionByZipcode['Statistical Number of Adverse Reaction Reports'] = (vaccineDistributionByZipcode['DOSES_SHIPPED'] / vaccineDistributionByZipcode['OVERALL_DOSES_SHIPPED'] * vaccineDistributionByZipcode['Adverse Reaction Reports']).round(2)\n",
" ADRs = row['DOSES_SHIPPED'] / row['OVERALL_DOSES_SHIPPED'] * row['Adverse Reaction Reports']\n", "vaccineDistributionByZipcode['Statistical Number of Adverse Reaction Reports (per 100,000)'] = (vaccineDistributionByZipcode['DOSES_SHIPPED'] / vaccineDistributionByZipcode['OVERALL_DOSES_SHIPPED'] * 100000).round().astype(int)\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" "vaccineDistributionByZipcode"
] ]
}, },
@@ -272,7 +269,7 @@
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "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" "vaccineDistributionByZipcode"
] ]
}, },
@@ -287,7 +284,8 @@
" columns = {\n", " columns = {\n",
" 'PROVIDER_NAME': 'Provider',\n", " 'PROVIDER_NAME': 'Provider',\n",
" 'ZIPCODE_SHP': 'ZIP Code',\n", " 'ZIPCODE_SHP': 'ZIP Code',\n",
" 'LOT_NUMBER': 'Lot Number'\n", " 'LOT_NUMBER': 'Lot Number',\n",
" 'DOSES_SHIPPED': 'Doses Shipped'\n",
" })\n", " })\n",
"vaccineDistributionByZipcode" "vaccineDistributionByZipcode"
] ]