Skip to content

Commit

Permalink
Update NJSP projections
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-williams committed Oct 10, 2024
1 parent 62224da commit 904abbb
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 80 deletions.
144 changes: 65 additions & 79 deletions njsp/update-projections.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@
"name": "stderr",
"output_type": "stream",
"text": [
"Searching for oldest commit with rundate \u22652023-10-09\n"
"Searching for oldest commit with rundate \u22652023-10-10\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Found rundate 2023-10-08 10:00:02 < 2023-10-09 at commit 980f7534; returning commit 9cabecd\n"
"Found rundate 2023-10-09 10:00:02 < 2023-10-10 at commit 172e7fd9; returning commit a4515d2\n"
]
},
{
"data": {
"text/plain": [
"'2023-10-09 10:00:02'"
"'2023-10-10 10:00:03'"
]
},
"execution_count": 2,
Expand All @@ -68,18 +68,18 @@
"name": "stdout",
"output_type": "stream",
"text": [
"As of 2023-10-09 10:00:02, NJSP was reporting 443 YTD deaths\n",
"Current YTD Deaths (2024-10-09 10:00:04-04:00): 505\n",
"Previous year YTD Deaths (adjusted; 2023-10-09 10:00:02): 443.35976340460394\n",
"Projected 2024 total: 685.0856492801108\n",
"13.9% change\n"
"As of 2023-10-10 10:00:03, NJSP was reporting 444 YTD deaths\n",
"Current YTD Deaths (2024-10-10 10:00:00-04:00): 505\n",
"Previous year YTD Deaths (adjusted; 2023-10-10 10:00:03): 444.3549116514117\n",
"Projected 2024 total: 683.7259041290563\n",
"13.6% change\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"FAUQStats cache miss: 2023, Mon Oct 09 10:00:02 EDT 2023\n"
"FAUQStats cache miss: 2023, Tue Oct 10 10:00:03 EDT 2023\n"
]
}
],
Expand Down Expand Up @@ -290,14 +290,14 @@
" <td>Bergen</td>\n",
" <td>0217</td>\n",
" <td>Fair Lawn Boro</td>\n",
" <td>Wagaraw Rd</td>\n",
" <td>Wagaraw Rd</td>\n",
" <td>NaN</td>\n",
" <td>County 69</td>\n",
" <td>1.0</td>\n",
" <td>1.0</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>NaN</td>\n",
" <td>69</td>\n",
" <td>NaN</td>\n",
" <td>2023-10-05 20:30:00-04:00</td>\n",
" </tr>\n",
Expand All @@ -307,15 +307,15 @@
" <td>Ocean</td>\n",
" <td>1514</td>\n",
" <td>Lakewood Twsp</td>\n",
" <td>Cedarbridge Ave</td>\n",
" <td>Cedarbridge Ave</td>\n",
" <td>NaN</td>\n",
" <td>County 528</td>\n",
" <td>3.0</td>\n",
" <td>1.0</td>\n",
" <td>2.0</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>528</td>\n",
" <td>3.0</td>\n",
" <td>2023-10-07 02:20:00-04:00</td>\n",
" </tr>\n",
" <tr>\n",
Expand All @@ -324,8 +324,8 @@
" <td>Morris</td>\n",
" <td>1438</td>\n",
" <td>Washington Twsp</td>\n",
" <td>FLOCKTOWN RD / NESTLING WOOD</td>\n",
" <td>FLOCKTOWN RD / NESTLING WOOD</td>\n",
" <td>Flocktown Rd</td>\n",
" <td>Flocktown Rd</td>\n",
" <td>1.0</td>\n",
" <td>1.0</td>\n",
" <td>0.0</td>\n",
Expand All @@ -341,8 +341,8 @@
" <td>Middlesex</td>\n",
" <td>1222</td>\n",
" <td>South Plainfield Bo</td>\n",
" <td>New Brunswick Avenue</td>\n",
" <td>New Brunswick Avenue</td>\n",
" <td>New Brunswick Ave</td>\n",
" <td>New Brunswick Ave</td>\n",
" <td>1.0</td>\n",
" <td>1.0</td>\n",
" <td>0.0</td>\n",
Expand All @@ -354,67 +354,53 @@
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>421 rows \u00d7 14 columns</p>\n",
"<p>422 rows \u00d7 14 columns</p>\n",
"</div>"
],
"text/plain": [
" CCODE CNAME MCODE MNAME \\\n",
"ACCID \n",
"12249 07 Essex 0714 Newark City \n",
"12251 01 Atlantic 0112 Hamilton Twsp \n",
"12253 12 Middlesex 1217 Piscataway Twsp \n",
"12254 02 Bergen 0221 Garfield City \n",
"12267 07 Essex 0714 Newark City \n",
"... ... ... ... ... \n",
"12725 11 Mercer 1110 Princeton \n",
"12726 02 Bergen 0217 Fair Lawn Boro \n",
"12727 15 Ocean 1514 Lakewood Twsp \n",
"12728 14 Morris 1438 Washington Twsp \n",
"12729 12 Middlesex 1222 South Plainfield Bo \n",
"\n",
" STREET LOCATION FATALITIES \\\n",
"ACCID \n",
"12249 Mulberry St Mulberry St 1.0 \n",
"12251 NaN State Highway 322 MP 46.4 1.0 \n",
"12253 South Randolphville Rd South Randolphville Rd 1.0 \n",
"12254 Outwater Ln Outwater Ln 1.0 \n",
"12267 Washington St Washington St 1.0 \n",
"... ... ... ... \n",
"12725 Mercer Rd Mercer Rd 1.0 \n",
"12726 Wagaraw Rd Wagaraw Rd 1.0 \n",
"12727 Cedarbridge Ave Cedarbridge Ave 3.0 \n",
"12728 FLOCKTOWN RD / NESTLING WOOD FLOCKTOWN RD / NESTLING WOOD 1.0 \n",
"12729 New Brunswick Avenue New Brunswick Avenue 1.0 \n",
" CCODE CNAME MCODE MNAME STREET \\\n",
"ACCID \n",
"12249 07 Essex 0714 Newark City Mulberry St \n",
"12251 01 Atlantic 0112 Hamilton Twsp NaN \n",
"12253 12 Middlesex 1217 Piscataway Twsp South Randolphville Rd \n",
"12254 02 Bergen 0221 Garfield City Outwater Ln \n",
"12267 07 Essex 0714 Newark City Washington St \n",
"... ... ... ... ... ... \n",
"12725 11 Mercer 1110 Princeton Mercer Rd \n",
"12726 02 Bergen 0217 Fair Lawn Boro NaN \n",
"12727 15 Ocean 1514 Lakewood Twsp NaN \n",
"12728 14 Morris 1438 Washington Twsp Flocktown Rd \n",
"12729 12 Middlesex 1222 South Plainfield Bo New Brunswick Ave \n",
"\n",
" FATAL_D FATAL_P FATAL_T FATAL_B HIGHWAY INJURIES \\\n",
"ACCID \n",
"12249 0.0 0.0 1.0 0.0 NaN NaN \n",
"12251 1.0 0.0 0.0 0.0 322 0.0 \n",
"12253 1.0 0.0 0.0 0.0 NaN 0.0 \n",
"12254 0.0 0.0 1.0 0.0 NaN 0.0 \n",
"12267 0.0 0.0 1.0 0.0 NaN NaN \n",
"... ... ... ... ... ... ... \n",
"12725 1.0 0.0 0.0 0.0 NaN NaN \n",
"12726 1.0 0.0 0.0 0.0 NaN NaN \n",
"12727 1.0 2.0 0.0 0.0 NaN NaN \n",
"12728 1.0 0.0 0.0 0.0 NaN NaN \n",
"12729 1.0 0.0 0.0 0.0 NaN NaN \n",
" LOCATION FATALITIES FATAL_D FATAL_P FATAL_T \\\n",
"ACCID \n",
"12249 Mulberry St 1.0 0.0 0.0 1.0 \n",
"12251 State Highway 322 MP 46.4 1.0 1.0 0.0 0.0 \n",
"12253 South Randolphville Rd 1.0 1.0 0.0 0.0 \n",
"12254 Outwater Ln 1.0 0.0 0.0 1.0 \n",
"12267 Washington St 1.0 0.0 0.0 1.0 \n",
"... ... ... ... ... ... \n",
"12725 Mercer Rd 1.0 1.0 0.0 0.0 \n",
"12726 County 69 1.0 1.0 0.0 0.0 \n",
"12727 County 528 3.0 1.0 2.0 0.0 \n",
"12728 Flocktown Rd 1.0 1.0 0.0 0.0 \n",
"12729 New Brunswick Ave 1.0 1.0 0.0 0.0 \n",
"\n",
" dt \n",
"ACCID \n",
"12249 2023-01-01 01:49:00-05:00 \n",
"12251 2023-01-02 09:26:00-05:00 \n",
"12253 2023-01-02 19:41:00-05:00 \n",
"12254 2023-01-03 20:52:00-05:00 \n",
"12267 2023-01-04 06:21:00-05:00 \n",
"... ... \n",
"12725 2023-10-04 23:45:00-04:00 \n",
"12726 2023-10-05 20:30:00-04:00 \n",
"12727 2023-10-07 02:20:00-04:00 \n",
"12728 2023-10-07 03:58:00-04:00 \n",
"12729 2023-10-07 13:09:00-04:00 \n",
" FATAL_B HIGHWAY INJURIES dt \n",
"ACCID \n",
"12249 0.0 NaN NaN 2023-01-01 01:49:00-05:00 \n",
"12251 0.0 322 0.0 2023-01-02 09:26:00-05:00 \n",
"12253 0.0 NaN 0.0 2023-01-02 19:41:00-05:00 \n",
"12254 0.0 NaN 0.0 2023-01-03 20:52:00-05:00 \n",
"12267 0.0 NaN NaN 2023-01-04 06:21:00-05:00 \n",
"... ... ... ... ... \n",
"12725 0.0 NaN NaN 2023-10-04 23:45:00-04:00 \n",
"12726 0.0 69 NaN 2023-10-05 20:30:00-04:00 \n",
"12727 0.0 528 3.0 2023-10-07 02:20:00-04:00 \n",
"12728 0.0 NaN NaN 2023-10-07 03:58:00-04:00 \n",
"12729 0.0 NaN NaN 2023-10-07 13:09:00-04:00 \n",
"\n",
"[421 rows x 14 columns]"
"[422 rows x 14 columns]"
]
},
"execution_count": 4,
Expand Down Expand Up @@ -718,7 +704,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"77.2% through the year, 22.8% remaining\n"
"77.4% through the year, 22.6% remaining\n"
]
}
],
Expand Down Expand Up @@ -1044,8 +1030,8 @@
" </tr>\n",
" <tr>\n",
" <th>Monmouth</th>\n",
" <td>46</td>\n",
" <td>5</td>\n",
" <td>45</td>\n",
" <td>4</td>\n",
" <td>23</td>\n",
" <td>6</td>\n",
" <td>13</td>\n",
Expand Down Expand Up @@ -1133,7 +1119,7 @@
"Hunterdon 9 0 4 2 2\n",
"Mercer 37 0 17 5 15\n",
"Middlesex 48 1 24 15 18\n",
"Monmouth 46 5 23 6 13\n",
"Monmouth 45 4 23 6 13\n",
"Morris 17 1 9 0 5\n",
"Ocean 40 1 24 5 12\n",
"Passaic 34 0 22 2 11\n",
Expand Down
2 changes: 1 addition & 1 deletion www/public/njsp/projected.csv
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Hudson,14,0,10,6,4
Hunterdon,9,0,4,2,2
Mercer,37,0,17,5,15
Middlesex,48,1,24,15,18
Monmouth,46,5,23,6,13
Monmouth,45,4,23,6,13
Morris,17,1,9,0,5
Ocean,40,1,24,5,12
Passaic,34,0,22,2,11
Expand Down

0 comments on commit 904abbb

Please sign in to comment.