Skip to content

Commit

Permalink
Harmonize county/muni codes
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-williams committed Jan 8, 2025
1 parent 222c4bf commit cecf750
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions njdot/harmonize-muni-codes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -891,8 +891,8 @@
"2021 667 397 697\n",
"2022 646 463 689\n",
"2023 574 371 606\n",
"2024 652 136 689\n",
"2025 2 0 2\n",
"2024 654 136 691\n",
"2025 3 0 3\n",
" CCODE CNAME MCODE MNAME HIGHWAY \\\n",
"ACCID \n",
"1703 01 Atlantic 0102 Atlantic City 446 \n",
Expand All @@ -901,11 +901,11 @@
"1661 20 Union 2004 Elizabeth City 624 \n",
"1811 07 Essex 0716 Nutley Town 648 \n",
"... ... ... ... ... ... \n",
"13685 07 Essex 0709 Irvington Town NaN \n",
"13689 05 Cape May 0514 Wildwood City NaN \n",
"13687 01 Atlantic 0102 Atlantic City 30 \n",
"13682 12 Middlesex 1221 South Brunswick Tws 130 \n",
"13686 11 Mercer 1103 Hamilton Twsp 95 \n",
"13691 04 Camden 0416 Haddon Twsp 130 \n",
"\n",
" LOCATION FATALITIES INJURIES \\\n",
"ACCID \n",
Expand All @@ -915,11 +915,11 @@
"1661 County 624 W MP 2.2 at Ikea Dr 1.0 1.0 \n",
"1811 County 648 E MP .87 at Franklin Ave 1.0 NaN \n",
"... ... ... ... \n",
"13685 Stuyvesant Ave 1.0 NaN \n",
"13689 Hand Ave 1.0 0.0 \n",
"13687 State Highway 30 MP 58.1 1.0 0.0 \n",
"13682 State Highway 130 1.0 NaN \n",
"13686 New Jersey Turnpike MP 59.2 1.0 NaN \n",
"13691 State Highway 130 1.0 NaN \n",
"\n",
" STREET dt FATAL_D FATAL_P FATAL_T \\\n",
"ACCID \n",
Expand All @@ -929,11 +929,11 @@
"1661 NaN 2008-01-01 12:29:00-05:00 NaN NaN NaN \n",
"1811 NaN 2008-01-01 18:53:00-05:00 NaN NaN NaN \n",
"... ... ... ... ... ... \n",
"13685 Stuyvesant Ave 2024-12-31 14:53:00-05:00 0.0 0.0 1.0 \n",
"13689 Hand Ave 2024-12-31 19:48:00-05:00 0.0 0.0 1.0 \n",
"13687 NaN 2024-12-31 22:47:00-05:00 0.0 0.0 1.0 \n",
"13682 NaN 2025-01-01 07:24:00-05:00 0.0 1.0 0.0 \n",
"13686 NaN 2025-01-02 22:01:00-05:00 0.0 0.0 1.0 \n",
"13691 NaN 2025-01-07 06:38:00-05:00 1.0 0.0 0.0 \n",
"\n",
" FATAL_B \n",
"ACCID \n",
Expand All @@ -943,13 +943,13 @@
"1661 NaN \n",
"1811 NaN \n",
"... ... \n",
"13685 0.0 \n",
"13689 0.0 \n",
"13687 0.0 \n",
"13682 0.0 \n",
"13686 0.0 \n",
"13691 0.0 \n",
"\n",
"[9627 rows x 14 columns]\n",
"[9630 rows x 14 columns]\n",
"/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/dateutil/parser/_parser.py:1207: UnknownTimezoneWarning: tzname EST identified but not understood. Pass `tzinfos` argument in order to correctly return a timezone-aware datetime. In a future version, this will raise an exception.\n",
" warnings.warn(\"tzname {tzname} identified but not understood. \"\n"
]
Expand Down Expand Up @@ -1112,23 +1112,6 @@
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13685</th>\n",
" <td>2024-12-31 14:53:00-05:00</td>\n",
" <td>7</td>\n",
" <td>9</td>\n",
" <td>Essex</td>\n",
" <td>Irvington Town</td>\n",
" <td>1.0</td>\n",
" <td>NaN</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>1.0</td>\n",
" <td>0.0</td>\n",
" <td>Stuyvesant Ave</td>\n",
" <td>NaN</td>\n",
" <td>Stuyvesant Ave</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13689</th>\n",
" <td>2024-12-31 19:48:00-05:00</td>\n",
" <td>5</td>\n",
Expand Down Expand Up @@ -1196,9 +1179,26 @@
" <td>95</td>\n",
" <td>New Jersey Turnpike MP 59.2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13691</th>\n",
" <td>2025-01-07 06:38:00-05:00</td>\n",
" <td>4</td>\n",
" <td>16</td>\n",
" <td>Camden</td>\n",
" <td>Haddon Twp</td>\n",
" <td>1.0</td>\n",
" <td>NaN</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>130</td>\n",
" <td>State Highway 130</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>9627 rows \u00d7 14 columns</p>\n",
"<p>9630 rows \u00d7 14 columns</p>\n",
"</div>"
],
"text/plain": [
Expand All @@ -1210,11 +1210,11 @@
"1661 2008-01-01 12:29:00-05:00 20 4 Union Elizabeth City 1.0 \n",
"1811 2008-01-01 18:53:00-05:00 7 16 Essex Nutley Town 1.0 \n",
"... ... .. .. ... ... ... \n",
"13685 2024-12-31 14:53:00-05:00 7 9 Essex Irvington Town 1.0 \n",
"13689 2024-12-31 19:48:00-05:00 5 14 Cape May Wildwood City 1.0 \n",
"13687 2024-12-31 22:47:00-05:00 1 2 Atlantic Atlantic City 1.0 \n",
"13682 2025-01-01 07:24:00-05:00 12 21 Middlesex South Brunswick Twp 1.0 \n",
"13686 2025-01-02 22:01:00-05:00 11 3 Mercer Hamilton Twp 1.0 \n",
"13691 2025-01-07 06:38:00-05:00 4 16 Camden Haddon Twp 1.0 \n",
"\n",
" ti dk ok pk bk street highway \\\n",
"ACCID \n",
Expand All @@ -1224,11 +1224,11 @@
"1661 1.0 NaN NaN NaN NaN NaN 624 \n",
"1811 NaN NaN NaN NaN NaN NaN 648 \n",
"... ... ... ... ... ... ... ... \n",
"13685 NaN 0.0 0.0 1.0 0.0 Stuyvesant Ave NaN \n",
"13689 0.0 0.0 0.0 1.0 0.0 Hand Ave NaN \n",
"13687 0.0 0.0 0.0 1.0 0.0 NaN 30 \n",
"13682 NaN 0.0 1.0 0.0 0.0 NaN 130 \n",
"13686 NaN 0.0 0.0 1.0 0.0 NaN 95 \n",
"13691 NaN 1.0 0.0 0.0 0.0 NaN 130 \n",
"\n",
" location \n",
"ACCID \n",
Expand All @@ -1238,13 +1238,13 @@
"1661 County 624 W MP 2.2 at Ikea Dr \n",
"1811 County 648 E MP .87 at Franklin Ave \n",
"... ... \n",
"13685 Stuyvesant Ave \n",
"13689 Hand Ave \n",
"13687 State Highway 30 MP 58.1 \n",
"13682 State Highway 130 \n",
"13686 New Jersey Turnpike MP 59.2 \n",
"13691 State Highway 130 \n",
"\n",
"[9627 rows x 14 columns]"
"[9630 rows x 14 columns]"
]
},
"execution_count": 11,
Expand Down

0 comments on commit cecf750

Please sign in to comment.