ium_444380/Dane.ipynb

4727 lines
189 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "advanced-namibia",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: kaggle in /home/students/s444380/.local/lib/python3.7/site-packages (1.5.12)\n",
"Requirement already satisfied: pandas in /usr/lib/python3/dist-packages (0.23.3+dfsg)\n",
"Requirement already satisfied: seaborn in /usr/local/lib/python3.7/dist-packages (0.11.2)\n",
"Requirement already satisfied: python-dateutil in /usr/local/lib/python3.7/dist-packages (from kaggle) (2.8.1)\n",
"Requirement already satisfied: urllib3 in /usr/local/lib/python3.7/dist-packages (from kaggle) (1.26.3)\n",
"Requirement already satisfied: certifi in /usr/local/lib/python3.7/dist-packages (from kaggle) (2020.12.5)\n",
"Requirement already satisfied: python-slugify in /home/students/s444380/.local/lib/python3.7/site-packages (from kaggle) (6.1.1)\n",
"Requirement already satisfied: tqdm in /usr/local/lib/python3.7/dist-packages (from kaggle) (4.59.0)\n",
"Requirement already satisfied: six>=1.10 in /usr/local/lib/python3.7/dist-packages (from kaggle) (1.15.0)\n",
"Requirement already satisfied: requests in /usr/local/lib/python3.7/dist-packages (from kaggle) (2.25.1)\n",
"Requirement already satisfied: scipy>=1.0 in /usr/local/lib/python3.7/dist-packages (from seaborn) (1.7.3)\n",
"Requirement already satisfied: numpy>=1.15 in /usr/local/lib/python3.7/dist-packages (from seaborn) (1.21.5)\n",
"Requirement already satisfied: matplotlib>=2.2 in /usr/lib/python3/dist-packages (from seaborn) (3.0.2)\n",
"Requirement already satisfied: text-unidecode>=1.3 in /home/students/s444380/.local/lib/python3.7/site-packages (from python-slugify->kaggle) (1.3)\n",
"Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests->kaggle) (2.10)\n",
"Requirement already satisfied: chardet<5,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests->kaggle) (4.0.0)\n"
]
}
],
"source": [
"!pip install --user kaggle pandas seaborn"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "lasting-tomorrow",
"metadata": {},
"outputs": [],
"source": [
"# Wydziałowy jupyter z jakiegoś powodu nie rozpoznaje polecenia kaggle. Dane pobrałem ręcznie\n",
"# !kaggle datasets download -d AnalyzeBoston/crimes-in-boston"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "awful-excerpt",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Archive: archive.zip\n",
" inflating: crime.csv \n",
" inflating: offense_codes.csv \n"
]
}
],
"source": [
"!unzip -o archive.zip"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "stylish-singer",
"metadata": {},
"outputs": [],
"source": [
"!iconv -f \"windows-1252\" -t \"UTF-8\" crime.csv > crime_conv.csv"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "excessive-refrigerator",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"INCIDENT_NUMBER,OFFENSE_CODE,OFFENSE_CODE_GROUP,OFFENSE_DESCRIPTION,DISTRICT,REPORTING_AREA,SHOOTING,OCCURRED_ON_DATE,YEAR,MONTH,DAY_OF_WEEK,HOUR,UCR_PART,STREET,Lat,Long,Location\n",
"I182070945,00619,Larceny,LARCENY ALL OTHERS,D14,808,,2018-09-02 13:00:00,2018,9,Sunday,13,Part One,LINCOLN ST,42.35779134,-71.13937053,\"(42.35779134, -71.13937053)\"\n",
"I182070943,01402,Vandalism,VANDALISM,C11,347,,2018-08-21 00:00:00,2018,8,Tuesday,0,Part Two,HECLA ST,42.30682138,-71.06030035,\"(42.30682138, -71.06030035)\"\n",
"I182070941,03410,Towed,TOWED MOTOR VEHICLE,D4,151,,2018-09-03 19:27:00,2018,9,Monday,19,Part Three,CAZENOVE ST,42.34658879,-71.07242943,\"(42.34658879, -71.07242943)\"\n",
"I182070940,03114,Investigate Property,INVESTIGATE PROPERTY,D4,272,,2018-09-03 21:16:00,2018,9,Monday,21,Part Three,NEWCOMB ST,42.33418175,-71.07866441,\"(42.33418175, -71.07866441)\"\n"
]
}
],
"source": [
"!head -n 5 crime_conv.csv"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "genetic-switch",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>INCIDENT_NUMBER</th>\n",
" <th>OFFENSE_CODE</th>\n",
" <th>OFFENSE_CODE_GROUP</th>\n",
" <th>OFFENSE_DESCRIPTION</th>\n",
" <th>DISTRICT</th>\n",
" <th>REPORTING_AREA</th>\n",
" <th>SHOOTING</th>\n",
" <th>OCCURRED_ON_DATE</th>\n",
" <th>YEAR</th>\n",
" <th>MONTH</th>\n",
" <th>DAY_OF_WEEK</th>\n",
" <th>HOUR</th>\n",
" <th>UCR_PART</th>\n",
" <th>STREET</th>\n",
" <th>Lat</th>\n",
" <th>Long</th>\n",
" <th>Location</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>I182070945</td>\n",
" <td>619</td>\n",
" <td>Larceny</td>\n",
" <td>LARCENY ALL OTHERS</td>\n",
" <td>D14</td>\n",
" <td>808</td>\n",
" <td>NaN</td>\n",
" <td>2018-09-02 13:00:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>Sunday</td>\n",
" <td>13</td>\n",
" <td>Part One</td>\n",
" <td>LINCOLN ST</td>\n",
" <td>42.357791</td>\n",
" <td>-71.139371</td>\n",
" <td>(42.35779134, -71.13937053)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>I182070943</td>\n",
" <td>1402</td>\n",
" <td>Vandalism</td>\n",
" <td>VANDALISM</td>\n",
" <td>C11</td>\n",
" <td>347</td>\n",
" <td>NaN</td>\n",
" <td>2018-08-21 00:00:00</td>\n",
" <td>2018</td>\n",
" <td>8</td>\n",
" <td>Tuesday</td>\n",
" <td>0</td>\n",
" <td>Part Two</td>\n",
" <td>HECLA ST</td>\n",
" <td>42.306821</td>\n",
" <td>-71.060300</td>\n",
" <td>(42.30682138, -71.06030035)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>I182070941</td>\n",
" <td>3410</td>\n",
" <td>Towed</td>\n",
" <td>TOWED MOTOR VEHICLE</td>\n",
" <td>D4</td>\n",
" <td>151</td>\n",
" <td>NaN</td>\n",
" <td>2018-09-03 19:27:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>Monday</td>\n",
" <td>19</td>\n",
" <td>Part Three</td>\n",
" <td>CAZENOVE ST</td>\n",
" <td>42.346589</td>\n",
" <td>-71.072429</td>\n",
" <td>(42.34658879, -71.07242943)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>I182070940</td>\n",
" <td>3114</td>\n",
" <td>Investigate Property</td>\n",
" <td>INVESTIGATE PROPERTY</td>\n",
" <td>D4</td>\n",
" <td>272</td>\n",
" <td>NaN</td>\n",
" <td>2018-09-03 21:16:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>Monday</td>\n",
" <td>21</td>\n",
" <td>Part Three</td>\n",
" <td>NEWCOMB ST</td>\n",
" <td>42.334182</td>\n",
" <td>-71.078664</td>\n",
" <td>(42.33418175, -71.07866441)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>I182070938</td>\n",
" <td>3114</td>\n",
" <td>Investigate Property</td>\n",
" <td>INVESTIGATE PROPERTY</td>\n",
" <td>B3</td>\n",
" <td>421</td>\n",
" <td>NaN</td>\n",
" <td>2018-09-03 21:05:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>Monday</td>\n",
" <td>21</td>\n",
" <td>Part Three</td>\n",
" <td>DELHI ST</td>\n",
" <td>42.275365</td>\n",
" <td>-71.090361</td>\n",
" <td>(42.27536542, -71.09036101)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>I182070936</td>\n",
" <td>3820</td>\n",
" <td>Motor Vehicle Accident Response</td>\n",
" <td>M/V ACCIDENT INVOLVING PEDESTRIAN - INJURY</td>\n",
" <td>C11</td>\n",
" <td>398</td>\n",
" <td>NaN</td>\n",
" <td>2018-09-03 21:09:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>Monday</td>\n",
" <td>21</td>\n",
" <td>Part Three</td>\n",
" <td>TALBOT AVE</td>\n",
" <td>42.290196</td>\n",
" <td>-71.071590</td>\n",
" <td>(42.29019621, -71.07159012)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>I182070933</td>\n",
" <td>724</td>\n",
" <td>Auto Theft</td>\n",
" <td>AUTO THEFT</td>\n",
" <td>B2</td>\n",
" <td>330</td>\n",
" <td>NaN</td>\n",
" <td>2018-09-03 21:25:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>Monday</td>\n",
" <td>21</td>\n",
" <td>Part One</td>\n",
" <td>NORMANDY ST</td>\n",
" <td>42.306072</td>\n",
" <td>-71.082733</td>\n",
" <td>(42.30607218, -71.08273260)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>I182070932</td>\n",
" <td>3301</td>\n",
" <td>Verbal Disputes</td>\n",
" <td>VERBAL DISPUTE</td>\n",
" <td>B2</td>\n",
" <td>584</td>\n",
" <td>NaN</td>\n",
" <td>2018-09-03 20:39:37</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>Monday</td>\n",
" <td>20</td>\n",
" <td>Part Three</td>\n",
" <td>LAWN ST</td>\n",
" <td>42.327016</td>\n",
" <td>-71.105551</td>\n",
" <td>(42.32701648, -71.10555088)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>I182070931</td>\n",
" <td>301</td>\n",
" <td>Robbery</td>\n",
" <td>ROBBERY - STREET</td>\n",
" <td>C6</td>\n",
" <td>177</td>\n",
" <td>NaN</td>\n",
" <td>2018-09-03 20:48:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>Monday</td>\n",
" <td>20</td>\n",
" <td>Part One</td>\n",
" <td>MASSACHUSETTS AVE</td>\n",
" <td>42.331521</td>\n",
" <td>-71.070853</td>\n",
" <td>(42.33152148, -71.07085307)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>I182070929</td>\n",
" <td>3301</td>\n",
" <td>Verbal Disputes</td>\n",
" <td>VERBAL DISPUTE</td>\n",
" <td>C11</td>\n",
" <td>364</td>\n",
" <td>NaN</td>\n",
" <td>2018-09-03 20:38:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>Monday</td>\n",
" <td>20</td>\n",
" <td>Part Three</td>\n",
" <td>LESLIE ST</td>\n",
" <td>42.295147</td>\n",
" <td>-71.058608</td>\n",
" <td>(42.29514664, -71.05860832)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>I182070928</td>\n",
" <td>3301</td>\n",
" <td>Verbal Disputes</td>\n",
" <td>VERBAL DISPUTE</td>\n",
" <td>C6</td>\n",
" <td>913</td>\n",
" <td>NaN</td>\n",
" <td>2018-09-03 19:55:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>Monday</td>\n",
" <td>19</td>\n",
" <td>Part Three</td>\n",
" <td>OCEAN VIEW DR</td>\n",
" <td>42.319579</td>\n",
" <td>-71.040328</td>\n",
" <td>(42.31957856, -71.04032766)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>I182070927</td>\n",
" <td>3114</td>\n",
" <td>Investigate Property</td>\n",
" <td>INVESTIGATE PROPERTY</td>\n",
" <td>C6</td>\n",
" <td>936</td>\n",
" <td>NaN</td>\n",
" <td>2018-09-03 20:19:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>Monday</td>\n",
" <td>20</td>\n",
" <td>Part Three</td>\n",
" <td>DALESSIO CT</td>\n",
" <td>42.340115</td>\n",
" <td>-71.053390</td>\n",
" <td>(42.34011469, -71.05339029)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12</th>\n",
" <td>I182070923</td>\n",
" <td>3108</td>\n",
" <td>Fire Related Reports</td>\n",
" <td>FIRE REPORT - HOUSE, BUILDING, ETC.</td>\n",
" <td>D4</td>\n",
" <td>139</td>\n",
" <td>NaN</td>\n",
" <td>2018-09-03 19:58:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>Monday</td>\n",
" <td>19</td>\n",
" <td>Part Three</td>\n",
" <td>MARLBOROUGH ST</td>\n",
" <td>42.350388</td>\n",
" <td>-71.087853</td>\n",
" <td>(42.35038760, -71.08785290)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>I182070922</td>\n",
" <td>2647</td>\n",
" <td>Other</td>\n",
" <td>THREATS TO DO BODILY HARM</td>\n",
" <td>B3</td>\n",
" <td>429</td>\n",
" <td>NaN</td>\n",
" <td>2018-09-03 20:39:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>Monday</td>\n",
" <td>20</td>\n",
" <td>Part Two</td>\n",
" <td>WOODROW AVE</td>\n",
" <td>42.286470</td>\n",
" <td>-71.087147</td>\n",
" <td>(42.28647012, -71.08714661)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>14</th>\n",
" <td>I182070921</td>\n",
" <td>3201</td>\n",
" <td>Property Lost</td>\n",
" <td>PROPERTY - LOST</td>\n",
" <td>B3</td>\n",
" <td>469</td>\n",
" <td>NaN</td>\n",
" <td>2018-09-02 14:00:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>Sunday</td>\n",
" <td>14</td>\n",
" <td>Part Three</td>\n",
" <td>MULVEY ST</td>\n",
" <td>42.279241</td>\n",
" <td>-71.096674</td>\n",
" <td>(42.27924052, -71.09667382)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>15</th>\n",
" <td>I182070920</td>\n",
" <td>3006</td>\n",
" <td>Medical Assistance</td>\n",
" <td>SICK/INJURED/MEDICAL - PERSON</td>\n",
" <td>NaN</td>\n",
" <td></td>\n",
" <td>NaN</td>\n",
" <td>2018-09-03 19:43:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>Monday</td>\n",
" <td>19</td>\n",
" <td>Part Three</td>\n",
" <td>NaN</td>\n",
" <td>42.352875</td>\n",
" <td>-71.073830</td>\n",
" <td>(42.35287456, -71.07382970)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16</th>\n",
" <td>I182070919</td>\n",
" <td>3301</td>\n",
" <td>Verbal Disputes</td>\n",
" <td>VERBAL DISPUTE</td>\n",
" <td>C11</td>\n",
" <td>341</td>\n",
" <td>NaN</td>\n",
" <td>2018-09-03 18:52:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>Monday</td>\n",
" <td>18</td>\n",
" <td>Part Three</td>\n",
" <td>STONEHURST ST</td>\n",
" <td>42.305264</td>\n",
" <td>-71.066838</td>\n",
" <td>(42.30526428, -71.06683755)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>17</th>\n",
" <td>I182070918</td>\n",
" <td>3305</td>\n",
" <td>Assembly or Gathering Violations</td>\n",
" <td>DEMONSTRATIONS/RIOT</td>\n",
" <td>D4</td>\n",
" <td>130</td>\n",
" <td>NaN</td>\n",
" <td>2018-09-03 17:00:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>Monday</td>\n",
" <td>17</td>\n",
" <td>Part Three</td>\n",
" <td>HUNTINGTON AVE</td>\n",
" <td>42.348577</td>\n",
" <td>-71.077720</td>\n",
" <td>(42.34857652, -71.07772012)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>18</th>\n",
" <td>I182070917</td>\n",
" <td>2647</td>\n",
" <td>Other</td>\n",
" <td>THREATS TO DO BODILY HARM</td>\n",
" <td>B2</td>\n",
" <td>901</td>\n",
" <td>NaN</td>\n",
" <td>2018-09-03 19:52:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>Monday</td>\n",
" <td>19</td>\n",
" <td>Part Two</td>\n",
" <td>HORADAN WAY</td>\n",
" <td>42.333717</td>\n",
" <td>-71.096658</td>\n",
" <td>(42.33371742, -71.09665806)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>19</th>\n",
" <td>I182070915</td>\n",
" <td>614</td>\n",
" <td>Larceny From Motor Vehicle</td>\n",
" <td>LARCENY THEFT FROM MV - NON-ACCESSORY</td>\n",
" <td>B2</td>\n",
" <td>181</td>\n",
" <td>NaN</td>\n",
" <td>2018-09-02 18:00:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>Sunday</td>\n",
" <td>18</td>\n",
" <td>Part One</td>\n",
" <td>SHIRLEY ST</td>\n",
" <td>42.325695</td>\n",
" <td>-71.068168</td>\n",
" <td>(42.32569490, -71.06816778)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>20</th>\n",
" <td>I182070913</td>\n",
" <td>3006</td>\n",
" <td>Medical Assistance</td>\n",
" <td>SICK/INJURED/MEDICAL - PERSON</td>\n",
" <td>NaN</td>\n",
" <td></td>\n",
" <td>NaN</td>\n",
" <td>2018-09-03 18:46:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>Monday</td>\n",
" <td>18</td>\n",
" <td>Part Three</td>\n",
" <td>WOLCOTT</td>\n",
" <td>-1.000000</td>\n",
" <td>-1.000000</td>\n",
" <td>(-1.00000000, -1.00000000)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>21</th>\n",
" <td>I182070911</td>\n",
" <td>3801</td>\n",
" <td>Motor Vehicle Accident Response</td>\n",
" <td>M/V ACCIDENT - OTHER</td>\n",
" <td>A1</td>\n",
" <td>69</td>\n",
" <td>NaN</td>\n",
" <td>2018-09-03 18:30:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>Monday</td>\n",
" <td>18</td>\n",
" <td>Part Three</td>\n",
" <td>BEACON ST</td>\n",
" <td>42.355644</td>\n",
" <td>-71.071681</td>\n",
" <td>(42.35564426, -71.07168077)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>22</th>\n",
" <td>I182070910</td>\n",
" <td>3006</td>\n",
" <td>Medical Assistance</td>\n",
" <td>SICK/INJURED/MEDICAL - PERSON</td>\n",
" <td>B3</td>\n",
" <td>434</td>\n",
" <td>NaN</td>\n",
" <td>2018-09-03 18:42:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>Monday</td>\n",
" <td>18</td>\n",
" <td>Part Three</td>\n",
" <td>CAPEN ST</td>\n",
" <td>42.283402</td>\n",
" <td>-71.080797</td>\n",
" <td>(42.28340243, -71.08079740)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>23</th>\n",
" <td>I182070909</td>\n",
" <td>3803</td>\n",
" <td>Motor Vehicle Accident Response</td>\n",
" <td>M/V ACCIDENT - PERSONAL INJURY</td>\n",
" <td>E5</td>\n",
" <td>550</td>\n",
" <td>NaN</td>\n",
" <td>2018-09-03 18:33:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>Monday</td>\n",
" <td>18</td>\n",
" <td>Part Three</td>\n",
" <td>WASHINGTON ST</td>\n",
" <td>42.275818</td>\n",
" <td>-71.139913</td>\n",
" <td>(42.27581799, -71.13991259)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>24</th>\n",
" <td>I182070908</td>\n",
" <td>522</td>\n",
" <td>Residential Burglary</td>\n",
" <td>BURGLARY - RESIDENTIAL - NO FORCE</td>\n",
" <td>B2</td>\n",
" <td>911</td>\n",
" <td>NaN</td>\n",
" <td>2018-09-03 18:38:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>Monday</td>\n",
" <td>18</td>\n",
" <td>Part One</td>\n",
" <td>ANNUNCIATION RD</td>\n",
" <td>42.335062</td>\n",
" <td>-71.093168</td>\n",
" <td>(42.33506218, -71.09316781)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25</th>\n",
" <td>I182070906</td>\n",
" <td>3831</td>\n",
" <td>Motor Vehicle Accident Response</td>\n",
" <td>M/V - LEAVING SCENE - PROPERTY DAMAGE</td>\n",
" <td>NaN</td>\n",
" <td></td>\n",
" <td>NaN</td>\n",
" <td>2018-09-03 18:20:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>Monday</td>\n",
" <td>18</td>\n",
" <td>Part Three</td>\n",
" <td>NaN</td>\n",
" <td>42.283593</td>\n",
" <td>-71.055657</td>\n",
" <td>(42.28359328, -71.05565683)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>26</th>\n",
" <td>I182070905</td>\n",
" <td>3006</td>\n",
" <td>Medical Assistance</td>\n",
" <td>SICK/INJURED/MEDICAL - PERSON</td>\n",
" <td>D4</td>\n",
" <td>172</td>\n",
" <td>NaN</td>\n",
" <td>2018-09-03 18:50:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>Monday</td>\n",
" <td>18</td>\n",
" <td>Part Three</td>\n",
" <td>MASSACHUSETTS AVE</td>\n",
" <td>42.333112</td>\n",
" <td>-71.072764</td>\n",
" <td>(42.33311189, -71.07276370)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>27</th>\n",
" <td>I182070904</td>\n",
" <td>802</td>\n",
" <td>Simple Assault</td>\n",
" <td>ASSAULT SIMPLE - BATTERY</td>\n",
" <td>C11</td>\n",
" <td>242</td>\n",
" <td>NaN</td>\n",
" <td>2018-09-03 18:34:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>Monday</td>\n",
" <td>18</td>\n",
" <td>Part Two</td>\n",
" <td>ANNAPOLIS ST</td>\n",
" <td>42.317319</td>\n",
" <td>-71.061509</td>\n",
" <td>(42.31731905, -71.06150882)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>28</th>\n",
" <td>I182070904</td>\n",
" <td>2007</td>\n",
" <td>Restraining Order Violations</td>\n",
" <td>VIOL. OF RESTRAINING ORDER W NO ARREST</td>\n",
" <td>C11</td>\n",
" <td>242</td>\n",
" <td>NaN</td>\n",
" <td>2018-09-03 18:34:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>Monday</td>\n",
" <td>18</td>\n",
" <td>Part Two</td>\n",
" <td>ANNAPOLIS ST</td>\n",
" <td>42.317319</td>\n",
" <td>-71.061509</td>\n",
" <td>(42.31731905, -71.06150882)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>29</th>\n",
" <td>I182070903</td>\n",
" <td>2900</td>\n",
" <td>Other</td>\n",
" <td>VAL - VIOLATION OF AUTO LAW - OTHER</td>\n",
" <td>B3</td>\n",
" <td>463</td>\n",
" <td>NaN</td>\n",
" <td>2018-09-03 18:55:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>Monday</td>\n",
" <td>18</td>\n",
" <td>Part Two</td>\n",
" <td>BLUE HILL AVE</td>\n",
" <td>42.295904</td>\n",
" <td>-71.087733</td>\n",
" <td>(42.29590385, -71.08773294)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319043</th>\n",
" <td>I110551302-00</td>\n",
" <td>3125</td>\n",
" <td>Warrant Arrests</td>\n",
" <td>WARRANT ARREST</td>\n",
" <td>D4</td>\n",
" <td>171</td>\n",
" <td>NaN</td>\n",
" <td>2015-07-22 22:00:00</td>\n",
" <td>2015</td>\n",
" <td>7</td>\n",
" <td>Wednesday</td>\n",
" <td>22</td>\n",
" <td>Part Three</td>\n",
" <td>HARRISON AVE</td>\n",
" <td>42.335560</td>\n",
" <td>-71.074364</td>\n",
" <td>(42.33555954, -71.07436364)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319044</th>\n",
" <td>I110551302-00</td>\n",
" <td>623</td>\n",
" <td>Larceny</td>\n",
" <td>LARCENY SHOPLIFTING $50 TO $199</td>\n",
" <td>D4</td>\n",
" <td>171</td>\n",
" <td>NaN</td>\n",
" <td>2015-07-22 22:00:00</td>\n",
" <td>2015</td>\n",
" <td>7</td>\n",
" <td>Wednesday</td>\n",
" <td>22</td>\n",
" <td>Part One</td>\n",
" <td>HARRISON AVE</td>\n",
" <td>42.335560</td>\n",
" <td>-71.074364</td>\n",
" <td>(42.33555954, -71.07436364)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319045</th>\n",
" <td>I110372326-00</td>\n",
" <td>403</td>\n",
" <td>Aggravated Assault</td>\n",
" <td>ASSAULT &amp; BATTERY D/W - OTHER</td>\n",
" <td>A1</td>\n",
" <td>97</td>\n",
" <td>NaN</td>\n",
" <td>2016-06-14 09:40:00</td>\n",
" <td>2016</td>\n",
" <td>6</td>\n",
" <td>Tuesday</td>\n",
" <td>9</td>\n",
" <td>Part One</td>\n",
" <td>SCHOOL ST</td>\n",
" <td>42.357428</td>\n",
" <td>-71.058326</td>\n",
" <td>(42.35742837, -71.05832551)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319046</th>\n",
" <td>I110372326-00</td>\n",
" <td>3125</td>\n",
" <td>Warrant Arrests</td>\n",
" <td>WARRANT ARREST</td>\n",
" <td>A1</td>\n",
" <td>97</td>\n",
" <td>NaN</td>\n",
" <td>2016-06-14 09:40:00</td>\n",
" <td>2016</td>\n",
" <td>6</td>\n",
" <td>Tuesday</td>\n",
" <td>9</td>\n",
" <td>Part Three</td>\n",
" <td>SCHOOL ST</td>\n",
" <td>42.357428</td>\n",
" <td>-71.058326</td>\n",
" <td>(42.35742837, -71.05832551)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319047</th>\n",
" <td>I110261417-00</td>\n",
" <td>3125</td>\n",
" <td>Warrant Arrests</td>\n",
" <td>WARRANT ARREST</td>\n",
" <td>B2</td>\n",
" <td>324</td>\n",
" <td>NaN</td>\n",
" <td>2016-07-29 00:00:00</td>\n",
" <td>2016</td>\n",
" <td>7</td>\n",
" <td>Friday</td>\n",
" <td>0</td>\n",
" <td>Part Three</td>\n",
" <td>BOWDOIN ST</td>\n",
" <td>42.307038</td>\n",
" <td>-71.066153</td>\n",
" <td>(42.30703835, -71.06615319)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319048</th>\n",
" <td>I110261417-00</td>\n",
" <td>619</td>\n",
" <td>Larceny</td>\n",
" <td>LARCENY OTHER $200 &amp; OVER</td>\n",
" <td>B2</td>\n",
" <td>324</td>\n",
" <td>NaN</td>\n",
" <td>2016-07-29 00:00:00</td>\n",
" <td>2016</td>\n",
" <td>7</td>\n",
" <td>Friday</td>\n",
" <td>0</td>\n",
" <td>Part One</td>\n",
" <td>BOWDOIN ST</td>\n",
" <td>42.307038</td>\n",
" <td>-71.066153</td>\n",
" <td>(42.30703835, -71.06615319)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319049</th>\n",
" <td>I110177502-00</td>\n",
" <td>3125</td>\n",
" <td>Warrant Arrests</td>\n",
" <td>WARRANT ARREST</td>\n",
" <td>B2</td>\n",
" <td>318</td>\n",
" <td>NaN</td>\n",
" <td>2015-10-02 21:00:00</td>\n",
" <td>2015</td>\n",
" <td>10</td>\n",
" <td>Friday</td>\n",
" <td>21</td>\n",
" <td>Part Three</td>\n",
" <td>HOMESTEAD ST</td>\n",
" <td>42.311277</td>\n",
" <td>-71.089093</td>\n",
" <td>(42.31127726, -71.08909334)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319050</th>\n",
" <td>I110177502-00</td>\n",
" <td>802</td>\n",
" <td>Simple Assault</td>\n",
" <td>ASSAULT &amp; BATTERY</td>\n",
" <td>B2</td>\n",
" <td>318</td>\n",
" <td>NaN</td>\n",
" <td>2015-10-02 21:00:00</td>\n",
" <td>2015</td>\n",
" <td>10</td>\n",
" <td>Friday</td>\n",
" <td>21</td>\n",
" <td>Part Two</td>\n",
" <td>HOMESTEAD ST</td>\n",
" <td>42.311277</td>\n",
" <td>-71.089093</td>\n",
" <td>(42.31127726, -71.08909334)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319051</th>\n",
" <td>I110177502-00</td>\n",
" <td>3125</td>\n",
" <td>Warrant Arrests</td>\n",
" <td>WARRANT ARREST</td>\n",
" <td>B2</td>\n",
" <td>318</td>\n",
" <td>NaN</td>\n",
" <td>2015-10-02 21:00:00</td>\n",
" <td>2015</td>\n",
" <td>10</td>\n",
" <td>Friday</td>\n",
" <td>21</td>\n",
" <td>Part Three</td>\n",
" <td>HOMESTEAD ST</td>\n",
" <td>42.311277</td>\n",
" <td>-71.089093</td>\n",
" <td>(42.31127726, -71.08909334)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319052</th>\n",
" <td>I100636670-00</td>\n",
" <td>629</td>\n",
" <td>Larceny</td>\n",
" <td>LARCENY OTHER $50 TO $199</td>\n",
" <td>D4</td>\n",
" <td>285</td>\n",
" <td>NaN</td>\n",
" <td>2016-06-05 17:23:00</td>\n",
" <td>2016</td>\n",
" <td>6</td>\n",
" <td>Sunday</td>\n",
" <td>17</td>\n",
" <td>Part One</td>\n",
" <td>COVENTRY ST</td>\n",
" <td>42.336951</td>\n",
" <td>-71.085748</td>\n",
" <td>(42.33695098, -71.08574813)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319053</th>\n",
" <td>I100636670-00</td>\n",
" <td>3125</td>\n",
" <td>Warrant Arrests</td>\n",
" <td>WARRANT ARREST</td>\n",
" <td>D4</td>\n",
" <td>285</td>\n",
" <td>NaN</td>\n",
" <td>2016-06-05 17:23:00</td>\n",
" <td>2016</td>\n",
" <td>6</td>\n",
" <td>Sunday</td>\n",
" <td>17</td>\n",
" <td>Part Three</td>\n",
" <td>COVENTRY ST</td>\n",
" <td>42.336951</td>\n",
" <td>-71.085748</td>\n",
" <td>(42.33695098, -71.08574813)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319054</th>\n",
" <td>I100340225-00</td>\n",
" <td>3125</td>\n",
" <td>Warrant Arrests</td>\n",
" <td>WARRANT ARREST</td>\n",
" <td>A1</td>\n",
" <td>77</td>\n",
" <td>NaN</td>\n",
" <td>2015-07-27 10:47:00</td>\n",
" <td>2015</td>\n",
" <td>7</td>\n",
" <td>Monday</td>\n",
" <td>10</td>\n",
" <td>Part Three</td>\n",
" <td>BOWDOIN SQ</td>\n",
" <td>42.361645</td>\n",
" <td>-71.062299</td>\n",
" <td>(42.36164502, -71.06229949)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319055</th>\n",
" <td>I100340225-00</td>\n",
" <td>339</td>\n",
" <td>Robbery</td>\n",
" <td>ROBBERY - UNARMED - STREET</td>\n",
" <td>A1</td>\n",
" <td>77</td>\n",
" <td>NaN</td>\n",
" <td>2015-07-27 10:47:00</td>\n",
" <td>2015</td>\n",
" <td>7</td>\n",
" <td>Monday</td>\n",
" <td>10</td>\n",
" <td>Part One</td>\n",
" <td>BOWDOIN SQ</td>\n",
" <td>42.361645</td>\n",
" <td>-71.062299</td>\n",
" <td>(42.36164502, -71.06229949)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319056</th>\n",
" <td>I100222105-02</td>\n",
" <td>3125</td>\n",
" <td>Warrant Arrests</td>\n",
" <td>WARRANT ARREST</td>\n",
" <td>E13</td>\n",
" <td>572</td>\n",
" <td>NaN</td>\n",
" <td>2015-08-03 16:22:00</td>\n",
" <td>2015</td>\n",
" <td>8</td>\n",
" <td>Monday</td>\n",
" <td>16</td>\n",
" <td>Part Three</td>\n",
" <td>COLUMBUS AVE</td>\n",
" <td>42.313628</td>\n",
" <td>-71.095603</td>\n",
" <td>(42.31362799, -71.09560307)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319057</th>\n",
" <td>I100033064-00</td>\n",
" <td>2907</td>\n",
" <td>Violations</td>\n",
" <td>VAL - OPERATING AFTER REV/SUSP.</td>\n",
" <td>B2</td>\n",
" <td>304</td>\n",
" <td>NaN</td>\n",
" <td>2016-07-29 18:20:00</td>\n",
" <td>2016</td>\n",
" <td>7</td>\n",
" <td>Friday</td>\n",
" <td>18</td>\n",
" <td>Part Two</td>\n",
" <td>SLAYTON WAY</td>\n",
" <td>42.321770</td>\n",
" <td>-71.097798</td>\n",
" <td>(42.32177032, -71.09779774)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319058</th>\n",
" <td>I100033064-00</td>\n",
" <td>2910</td>\n",
" <td>Violations</td>\n",
" <td>VAL - OPERATING AFTER REV/SUSP.</td>\n",
" <td>B2</td>\n",
" <td>304</td>\n",
" <td>NaN</td>\n",
" <td>2016-07-29 18:20:00</td>\n",
" <td>2016</td>\n",
" <td>7</td>\n",
" <td>Friday</td>\n",
" <td>18</td>\n",
" <td>Part Two</td>\n",
" <td>SLAYTON WAY</td>\n",
" <td>42.321770</td>\n",
" <td>-71.097798</td>\n",
" <td>(42.32177032, -71.09779774)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319059</th>\n",
" <td>I090321958-00</td>\n",
" <td>3125</td>\n",
" <td>Warrant Arrests</td>\n",
" <td>WARRANT ARREST</td>\n",
" <td>C11</td>\n",
" <td>355</td>\n",
" <td>NaN</td>\n",
" <td>2016-02-01 01:43:00</td>\n",
" <td>2016</td>\n",
" <td>2</td>\n",
" <td>Monday</td>\n",
" <td>1</td>\n",
" <td>Part Three</td>\n",
" <td>GENEVA AVE</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>(0.00000000, 0.00000000)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319060</th>\n",
" <td>I090321958-00</td>\n",
" <td>3125</td>\n",
" <td>Warrant Arrests</td>\n",
" <td>WARRANT ARREST</td>\n",
" <td>C11</td>\n",
" <td>355</td>\n",
" <td>NaN</td>\n",
" <td>2016-02-01 01:43:00</td>\n",
" <td>2016</td>\n",
" <td>2</td>\n",
" <td>Monday</td>\n",
" <td>1</td>\n",
" <td>Part Three</td>\n",
" <td>GENEVA AVE</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>(0.00000000, 0.00000000)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319061</th>\n",
" <td>I090317057-00</td>\n",
" <td>403</td>\n",
" <td>Aggravated Assault</td>\n",
" <td>ASSAULT &amp; BATTERY D/W - OTHER</td>\n",
" <td>B3</td>\n",
" <td>458</td>\n",
" <td>NaN</td>\n",
" <td>2015-11-20 11:15:00</td>\n",
" <td>2015</td>\n",
" <td>11</td>\n",
" <td>Friday</td>\n",
" <td>11</td>\n",
" <td>Part One</td>\n",
" <td>BLUE HILL AVE</td>\n",
" <td>42.301897</td>\n",
" <td>-71.085549</td>\n",
" <td>(42.30189690, -71.08554944)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319062</th>\n",
" <td>I090317057-00</td>\n",
" <td>3125</td>\n",
" <td>Warrant Arrests</td>\n",
" <td>WARRANT ARREST</td>\n",
" <td>B3</td>\n",
" <td>458</td>\n",
" <td>NaN</td>\n",
" <td>2015-11-20 11:15:00</td>\n",
" <td>2015</td>\n",
" <td>11</td>\n",
" <td>Friday</td>\n",
" <td>11</td>\n",
" <td>Part Three</td>\n",
" <td>BLUE HILL AVE</td>\n",
" <td>42.301897</td>\n",
" <td>-71.085549</td>\n",
" <td>(42.30189690, -71.08554944)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319063</th>\n",
" <td>I080542626-00</td>\n",
" <td>3125</td>\n",
" <td>Warrant Arrests</td>\n",
" <td>WARRANT ARREST</td>\n",
" <td>A1</td>\n",
" <td>111</td>\n",
" <td>NaN</td>\n",
" <td>2015-08-12 12:00:00</td>\n",
" <td>2015</td>\n",
" <td>8</td>\n",
" <td>Wednesday</td>\n",
" <td>12</td>\n",
" <td>Part Three</td>\n",
" <td>BOYLSTON ST</td>\n",
" <td>42.352312</td>\n",
" <td>-71.063705</td>\n",
" <td>(42.35231190, -71.06370510)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319064</th>\n",
" <td>I080542626-00</td>\n",
" <td>1848</td>\n",
" <td>Drug Violation</td>\n",
" <td>DRUGS - POSS CLASS B - INTENT TO MFR DIST DISP</td>\n",
" <td>A1</td>\n",
" <td>111</td>\n",
" <td>NaN</td>\n",
" <td>2015-08-12 12:00:00</td>\n",
" <td>2015</td>\n",
" <td>8</td>\n",
" <td>Wednesday</td>\n",
" <td>12</td>\n",
" <td>Part Two</td>\n",
" <td>BOYLSTON ST</td>\n",
" <td>42.352312</td>\n",
" <td>-71.063705</td>\n",
" <td>(42.35231190, -71.06370510)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319065</th>\n",
" <td>I080542626-00</td>\n",
" <td>1849</td>\n",
" <td>Drug Violation</td>\n",
" <td>DRUGS - POSS CLASS B - COCAINE, ETC.</td>\n",
" <td>A1</td>\n",
" <td>111</td>\n",
" <td>NaN</td>\n",
" <td>2015-08-12 12:00:00</td>\n",
" <td>2015</td>\n",
" <td>8</td>\n",
" <td>Wednesday</td>\n",
" <td>12</td>\n",
" <td>Part Two</td>\n",
" <td>BOYLSTON ST</td>\n",
" <td>42.352312</td>\n",
" <td>-71.063705</td>\n",
" <td>(42.35231190, -71.06370510)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319066</th>\n",
" <td>I060168073-00</td>\n",
" <td>1864</td>\n",
" <td>Drug Violation</td>\n",
" <td>DRUGS - POSS CLASS D - INTENT MFR DIST DISP</td>\n",
" <td>E13</td>\n",
" <td>912</td>\n",
" <td>NaN</td>\n",
" <td>2018-01-27 14:01:00</td>\n",
" <td>2018</td>\n",
" <td>1</td>\n",
" <td>Saturday</td>\n",
" <td>14</td>\n",
" <td>Part Two</td>\n",
" <td>CENTRE ST</td>\n",
" <td>42.322838</td>\n",
" <td>-71.100967</td>\n",
" <td>(42.32283759, -71.10096723)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319067</th>\n",
" <td>I060168073-00</td>\n",
" <td>3125</td>\n",
" <td>Warrant Arrests</td>\n",
" <td>WARRANT ARREST</td>\n",
" <td>E13</td>\n",
" <td>912</td>\n",
" <td>NaN</td>\n",
" <td>2018-01-27 14:01:00</td>\n",
" <td>2018</td>\n",
" <td>1</td>\n",
" <td>Saturday</td>\n",
" <td>14</td>\n",
" <td>Part Three</td>\n",
" <td>CENTRE ST</td>\n",
" <td>42.322838</td>\n",
" <td>-71.100967</td>\n",
" <td>(42.32283759, -71.10096723)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319068</th>\n",
" <td>I050310906-00</td>\n",
" <td>3125</td>\n",
" <td>Warrant Arrests</td>\n",
" <td>WARRANT ARREST</td>\n",
" <td>D4</td>\n",
" <td>285</td>\n",
" <td>NaN</td>\n",
" <td>2016-06-05 17:25:00</td>\n",
" <td>2016</td>\n",
" <td>6</td>\n",
" <td>Sunday</td>\n",
" <td>17</td>\n",
" <td>Part Three</td>\n",
" <td>COVENTRY ST</td>\n",
" <td>42.336951</td>\n",
" <td>-71.085748</td>\n",
" <td>(42.33695098, -71.08574813)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319069</th>\n",
" <td>I030217815-08</td>\n",
" <td>111</td>\n",
" <td>Homicide</td>\n",
" <td>MURDER, NON-NEGLIGIENT MANSLAUGHTER</td>\n",
" <td>E18</td>\n",
" <td>520</td>\n",
" <td>NaN</td>\n",
" <td>2015-07-09 13:38:00</td>\n",
" <td>2015</td>\n",
" <td>7</td>\n",
" <td>Thursday</td>\n",
" <td>13</td>\n",
" <td>Part One</td>\n",
" <td>RIVER ST</td>\n",
" <td>42.255926</td>\n",
" <td>-71.123172</td>\n",
" <td>(42.25592648, -71.12317207)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319070</th>\n",
" <td>I030217815-08</td>\n",
" <td>3125</td>\n",
" <td>Warrant Arrests</td>\n",
" <td>WARRANT ARREST</td>\n",
" <td>E18</td>\n",
" <td>520</td>\n",
" <td>NaN</td>\n",
" <td>2015-07-09 13:38:00</td>\n",
" <td>2015</td>\n",
" <td>7</td>\n",
" <td>Thursday</td>\n",
" <td>13</td>\n",
" <td>Part Three</td>\n",
" <td>RIVER ST</td>\n",
" <td>42.255926</td>\n",
" <td>-71.123172</td>\n",
" <td>(42.25592648, -71.12317207)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319071</th>\n",
" <td>I010370257-00</td>\n",
" <td>3125</td>\n",
" <td>Warrant Arrests</td>\n",
" <td>WARRANT ARREST</td>\n",
" <td>E13</td>\n",
" <td>569</td>\n",
" <td>NaN</td>\n",
" <td>2016-05-31 19:35:00</td>\n",
" <td>2016</td>\n",
" <td>5</td>\n",
" <td>Tuesday</td>\n",
" <td>19</td>\n",
" <td>Part Three</td>\n",
" <td>NEW WASHINGTON ST</td>\n",
" <td>42.302333</td>\n",
" <td>-71.111565</td>\n",
" <td>(42.30233307, -71.11156487)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319072</th>\n",
" <td>142052550</td>\n",
" <td>3125</td>\n",
" <td>Warrant Arrests</td>\n",
" <td>WARRANT ARREST</td>\n",
" <td>D4</td>\n",
" <td>903</td>\n",
" <td>NaN</td>\n",
" <td>2015-06-22 00:12:00</td>\n",
" <td>2015</td>\n",
" <td>6</td>\n",
" <td>Monday</td>\n",
" <td>0</td>\n",
" <td>Part Three</td>\n",
" <td>WASHINGTON ST</td>\n",
" <td>42.333839</td>\n",
" <td>-71.080290</td>\n",
" <td>(42.33383935, -71.08029038)</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>319073 rows × 17 columns</p>\n",
"</div>"
],
"text/plain": [
" INCIDENT_NUMBER OFFENSE_CODE OFFENSE_CODE_GROUP \\\n",
"0 I182070945 619 Larceny \n",
"1 I182070943 1402 Vandalism \n",
"2 I182070941 3410 Towed \n",
"3 I182070940 3114 Investigate Property \n",
"4 I182070938 3114 Investigate Property \n",
"5 I182070936 3820 Motor Vehicle Accident Response \n",
"6 I182070933 724 Auto Theft \n",
"7 I182070932 3301 Verbal Disputes \n",
"8 I182070931 301 Robbery \n",
"9 I182070929 3301 Verbal Disputes \n",
"10 I182070928 3301 Verbal Disputes \n",
"11 I182070927 3114 Investigate Property \n",
"12 I182070923 3108 Fire Related Reports \n",
"13 I182070922 2647 Other \n",
"14 I182070921 3201 Property Lost \n",
"15 I182070920 3006 Medical Assistance \n",
"16 I182070919 3301 Verbal Disputes \n",
"17 I182070918 3305 Assembly or Gathering Violations \n",
"18 I182070917 2647 Other \n",
"19 I182070915 614 Larceny From Motor Vehicle \n",
"20 I182070913 3006 Medical Assistance \n",
"21 I182070911 3801 Motor Vehicle Accident Response \n",
"22 I182070910 3006 Medical Assistance \n",
"23 I182070909 3803 Motor Vehicle Accident Response \n",
"24 I182070908 522 Residential Burglary \n",
"25 I182070906 3831 Motor Vehicle Accident Response \n",
"26 I182070905 3006 Medical Assistance \n",
"27 I182070904 802 Simple Assault \n",
"28 I182070904 2007 Restraining Order Violations \n",
"29 I182070903 2900 Other \n",
"... ... ... ... \n",
"319043 I110551302-00 3125 Warrant Arrests \n",
"319044 I110551302-00 623 Larceny \n",
"319045 I110372326-00 403 Aggravated Assault \n",
"319046 I110372326-00 3125 Warrant Arrests \n",
"319047 I110261417-00 3125 Warrant Arrests \n",
"319048 I110261417-00 619 Larceny \n",
"319049 I110177502-00 3125 Warrant Arrests \n",
"319050 I110177502-00 802 Simple Assault \n",
"319051 I110177502-00 3125 Warrant Arrests \n",
"319052 I100636670-00 629 Larceny \n",
"319053 I100636670-00 3125 Warrant Arrests \n",
"319054 I100340225-00 3125 Warrant Arrests \n",
"319055 I100340225-00 339 Robbery \n",
"319056 I100222105-02 3125 Warrant Arrests \n",
"319057 I100033064-00 2907 Violations \n",
"319058 I100033064-00 2910 Violations \n",
"319059 I090321958-00 3125 Warrant Arrests \n",
"319060 I090321958-00 3125 Warrant Arrests \n",
"319061 I090317057-00 403 Aggravated Assault \n",
"319062 I090317057-00 3125 Warrant Arrests \n",
"319063 I080542626-00 3125 Warrant Arrests \n",
"319064 I080542626-00 1848 Drug Violation \n",
"319065 I080542626-00 1849 Drug Violation \n",
"319066 I060168073-00 1864 Drug Violation \n",
"319067 I060168073-00 3125 Warrant Arrests \n",
"319068 I050310906-00 3125 Warrant Arrests \n",
"319069 I030217815-08 111 Homicide \n",
"319070 I030217815-08 3125 Warrant Arrests \n",
"319071 I010370257-00 3125 Warrant Arrests \n",
"319072 142052550 3125 Warrant Arrests \n",
"\n",
" OFFENSE_DESCRIPTION DISTRICT \\\n",
"0 LARCENY ALL OTHERS D14 \n",
"1 VANDALISM C11 \n",
"2 TOWED MOTOR VEHICLE D4 \n",
"3 INVESTIGATE PROPERTY D4 \n",
"4 INVESTIGATE PROPERTY B3 \n",
"5 M/V ACCIDENT INVOLVING PEDESTRIAN - INJURY C11 \n",
"6 AUTO THEFT B2 \n",
"7 VERBAL DISPUTE B2 \n",
"8 ROBBERY - STREET C6 \n",
"9 VERBAL DISPUTE C11 \n",
"10 VERBAL DISPUTE C6 \n",
"11 INVESTIGATE PROPERTY C6 \n",
"12 FIRE REPORT - HOUSE, BUILDING, ETC. D4 \n",
"13 THREATS TO DO BODILY HARM B3 \n",
"14 PROPERTY - LOST B3 \n",
"15 SICK/INJURED/MEDICAL - PERSON NaN \n",
"16 VERBAL DISPUTE C11 \n",
"17 DEMONSTRATIONS/RIOT D4 \n",
"18 THREATS TO DO BODILY HARM B2 \n",
"19 LARCENY THEFT FROM MV - NON-ACCESSORY B2 \n",
"20 SICK/INJURED/MEDICAL - PERSON NaN \n",
"21 M/V ACCIDENT - OTHER A1 \n",
"22 SICK/INJURED/MEDICAL - PERSON B3 \n",
"23 M/V ACCIDENT - PERSONAL INJURY E5 \n",
"24 BURGLARY - RESIDENTIAL - NO FORCE B2 \n",
"25 M/V - LEAVING SCENE - PROPERTY DAMAGE NaN \n",
"26 SICK/INJURED/MEDICAL - PERSON D4 \n",
"27 ASSAULT SIMPLE - BATTERY C11 \n",
"28 VIOL. OF RESTRAINING ORDER W NO ARREST C11 \n",
"29 VAL - VIOLATION OF AUTO LAW - OTHER B3 \n",
"... ... ... \n",
"319043 WARRANT ARREST D4 \n",
"319044 LARCENY SHOPLIFTING $50 TO $199 D4 \n",
"319045 ASSAULT & BATTERY D/W - OTHER A1 \n",
"319046 WARRANT ARREST A1 \n",
"319047 WARRANT ARREST B2 \n",
"319048 LARCENY OTHER $200 & OVER B2 \n",
"319049 WARRANT ARREST B2 \n",
"319050 ASSAULT & BATTERY B2 \n",
"319051 WARRANT ARREST B2 \n",
"319052 LARCENY OTHER $50 TO $199 D4 \n",
"319053 WARRANT ARREST D4 \n",
"319054 WARRANT ARREST A1 \n",
"319055 ROBBERY - UNARMED - STREET A1 \n",
"319056 WARRANT ARREST E13 \n",
"319057 VAL - OPERATING AFTER REV/SUSP. B2 \n",
"319058 VAL - OPERATING AFTER REV/SUSP. B2 \n",
"319059 WARRANT ARREST C11 \n",
"319060 WARRANT ARREST C11 \n",
"319061 ASSAULT & BATTERY D/W - OTHER B3 \n",
"319062 WARRANT ARREST B3 \n",
"319063 WARRANT ARREST A1 \n",
"319064 DRUGS - POSS CLASS B - INTENT TO MFR DIST DISP A1 \n",
"319065 DRUGS - POSS CLASS B - COCAINE, ETC. A1 \n",
"319066 DRUGS - POSS CLASS D - INTENT MFR DIST DISP E13 \n",
"319067 WARRANT ARREST E13 \n",
"319068 WARRANT ARREST D4 \n",
"319069 MURDER, NON-NEGLIGIENT MANSLAUGHTER E18 \n",
"319070 WARRANT ARREST E18 \n",
"319071 WARRANT ARREST E13 \n",
"319072 WARRANT ARREST D4 \n",
"\n",
" REPORTING_AREA SHOOTING OCCURRED_ON_DATE YEAR MONTH DAY_OF_WEEK \\\n",
"0 808 NaN 2018-09-02 13:00:00 2018 9 Sunday \n",
"1 347 NaN 2018-08-21 00:00:00 2018 8 Tuesday \n",
"2 151 NaN 2018-09-03 19:27:00 2018 9 Monday \n",
"3 272 NaN 2018-09-03 21:16:00 2018 9 Monday \n",
"4 421 NaN 2018-09-03 21:05:00 2018 9 Monday \n",
"5 398 NaN 2018-09-03 21:09:00 2018 9 Monday \n",
"6 330 NaN 2018-09-03 21:25:00 2018 9 Monday \n",
"7 584 NaN 2018-09-03 20:39:37 2018 9 Monday \n",
"8 177 NaN 2018-09-03 20:48:00 2018 9 Monday \n",
"9 364 NaN 2018-09-03 20:38:00 2018 9 Monday \n",
"10 913 NaN 2018-09-03 19:55:00 2018 9 Monday \n",
"11 936 NaN 2018-09-03 20:19:00 2018 9 Monday \n",
"12 139 NaN 2018-09-03 19:58:00 2018 9 Monday \n",
"13 429 NaN 2018-09-03 20:39:00 2018 9 Monday \n",
"14 469 NaN 2018-09-02 14:00:00 2018 9 Sunday \n",
"15 NaN 2018-09-03 19:43:00 2018 9 Monday \n",
"16 341 NaN 2018-09-03 18:52:00 2018 9 Monday \n",
"17 130 NaN 2018-09-03 17:00:00 2018 9 Monday \n",
"18 901 NaN 2018-09-03 19:52:00 2018 9 Monday \n",
"19 181 NaN 2018-09-02 18:00:00 2018 9 Sunday \n",
"20 NaN 2018-09-03 18:46:00 2018 9 Monday \n",
"21 69 NaN 2018-09-03 18:30:00 2018 9 Monday \n",
"22 434 NaN 2018-09-03 18:42:00 2018 9 Monday \n",
"23 550 NaN 2018-09-03 18:33:00 2018 9 Monday \n",
"24 911 NaN 2018-09-03 18:38:00 2018 9 Monday \n",
"25 NaN 2018-09-03 18:20:00 2018 9 Monday \n",
"26 172 NaN 2018-09-03 18:50:00 2018 9 Monday \n",
"27 242 NaN 2018-09-03 18:34:00 2018 9 Monday \n",
"28 242 NaN 2018-09-03 18:34:00 2018 9 Monday \n",
"29 463 NaN 2018-09-03 18:55:00 2018 9 Monday \n",
"... ... ... ... ... ... ... \n",
"319043 171 NaN 2015-07-22 22:00:00 2015 7 Wednesday \n",
"319044 171 NaN 2015-07-22 22:00:00 2015 7 Wednesday \n",
"319045 97 NaN 2016-06-14 09:40:00 2016 6 Tuesday \n",
"319046 97 NaN 2016-06-14 09:40:00 2016 6 Tuesday \n",
"319047 324 NaN 2016-07-29 00:00:00 2016 7 Friday \n",
"319048 324 NaN 2016-07-29 00:00:00 2016 7 Friday \n",
"319049 318 NaN 2015-10-02 21:00:00 2015 10 Friday \n",
"319050 318 NaN 2015-10-02 21:00:00 2015 10 Friday \n",
"319051 318 NaN 2015-10-02 21:00:00 2015 10 Friday \n",
"319052 285 NaN 2016-06-05 17:23:00 2016 6 Sunday \n",
"319053 285 NaN 2016-06-05 17:23:00 2016 6 Sunday \n",
"319054 77 NaN 2015-07-27 10:47:00 2015 7 Monday \n",
"319055 77 NaN 2015-07-27 10:47:00 2015 7 Monday \n",
"319056 572 NaN 2015-08-03 16:22:00 2015 8 Monday \n",
"319057 304 NaN 2016-07-29 18:20:00 2016 7 Friday \n",
"319058 304 NaN 2016-07-29 18:20:00 2016 7 Friday \n",
"319059 355 NaN 2016-02-01 01:43:00 2016 2 Monday \n",
"319060 355 NaN 2016-02-01 01:43:00 2016 2 Monday \n",
"319061 458 NaN 2015-11-20 11:15:00 2015 11 Friday \n",
"319062 458 NaN 2015-11-20 11:15:00 2015 11 Friday \n",
"319063 111 NaN 2015-08-12 12:00:00 2015 8 Wednesday \n",
"319064 111 NaN 2015-08-12 12:00:00 2015 8 Wednesday \n",
"319065 111 NaN 2015-08-12 12:00:00 2015 8 Wednesday \n",
"319066 912 NaN 2018-01-27 14:01:00 2018 1 Saturday \n",
"319067 912 NaN 2018-01-27 14:01:00 2018 1 Saturday \n",
"319068 285 NaN 2016-06-05 17:25:00 2016 6 Sunday \n",
"319069 520 NaN 2015-07-09 13:38:00 2015 7 Thursday \n",
"319070 520 NaN 2015-07-09 13:38:00 2015 7 Thursday \n",
"319071 569 NaN 2016-05-31 19:35:00 2016 5 Tuesday \n",
"319072 903 NaN 2015-06-22 00:12:00 2015 6 Monday \n",
"\n",
" HOUR UCR_PART STREET Lat Long \\\n",
"0 13 Part One LINCOLN ST 42.357791 -71.139371 \n",
"1 0 Part Two HECLA ST 42.306821 -71.060300 \n",
"2 19 Part Three CAZENOVE ST 42.346589 -71.072429 \n",
"3 21 Part Three NEWCOMB ST 42.334182 -71.078664 \n",
"4 21 Part Three DELHI ST 42.275365 -71.090361 \n",
"5 21 Part Three TALBOT AVE 42.290196 -71.071590 \n",
"6 21 Part One NORMANDY ST 42.306072 -71.082733 \n",
"7 20 Part Three LAWN ST 42.327016 -71.105551 \n",
"8 20 Part One MASSACHUSETTS AVE 42.331521 -71.070853 \n",
"9 20 Part Three LESLIE ST 42.295147 -71.058608 \n",
"10 19 Part Three OCEAN VIEW DR 42.319579 -71.040328 \n",
"11 20 Part Three DALESSIO CT 42.340115 -71.053390 \n",
"12 19 Part Three MARLBOROUGH ST 42.350388 -71.087853 \n",
"13 20 Part Two WOODROW AVE 42.286470 -71.087147 \n",
"14 14 Part Three MULVEY ST 42.279241 -71.096674 \n",
"15 19 Part Three NaN 42.352875 -71.073830 \n",
"16 18 Part Three STONEHURST ST 42.305264 -71.066838 \n",
"17 17 Part Three HUNTINGTON AVE 42.348577 -71.077720 \n",
"18 19 Part Two HORADAN WAY 42.333717 -71.096658 \n",
"19 18 Part One SHIRLEY ST 42.325695 -71.068168 \n",
"20 18 Part Three WOLCOTT -1.000000 -1.000000 \n",
"21 18 Part Three BEACON ST 42.355644 -71.071681 \n",
"22 18 Part Three CAPEN ST 42.283402 -71.080797 \n",
"23 18 Part Three WASHINGTON ST 42.275818 -71.139913 \n",
"24 18 Part One ANNUNCIATION RD 42.335062 -71.093168 \n",
"25 18 Part Three NaN 42.283593 -71.055657 \n",
"26 18 Part Three MASSACHUSETTS AVE 42.333112 -71.072764 \n",
"27 18 Part Two ANNAPOLIS ST 42.317319 -71.061509 \n",
"28 18 Part Two ANNAPOLIS ST 42.317319 -71.061509 \n",
"29 18 Part Two BLUE HILL AVE 42.295904 -71.087733 \n",
"... ... ... ... ... ... \n",
"319043 22 Part Three HARRISON AVE 42.335560 -71.074364 \n",
"319044 22 Part One HARRISON AVE 42.335560 -71.074364 \n",
"319045 9 Part One SCHOOL ST 42.357428 -71.058326 \n",
"319046 9 Part Three SCHOOL ST 42.357428 -71.058326 \n",
"319047 0 Part Three BOWDOIN ST 42.307038 -71.066153 \n",
"319048 0 Part One BOWDOIN ST 42.307038 -71.066153 \n",
"319049 21 Part Three HOMESTEAD ST 42.311277 -71.089093 \n",
"319050 21 Part Two HOMESTEAD ST 42.311277 -71.089093 \n",
"319051 21 Part Three HOMESTEAD ST 42.311277 -71.089093 \n",
"319052 17 Part One COVENTRY ST 42.336951 -71.085748 \n",
"319053 17 Part Three COVENTRY ST 42.336951 -71.085748 \n",
"319054 10 Part Three BOWDOIN SQ 42.361645 -71.062299 \n",
"319055 10 Part One BOWDOIN SQ 42.361645 -71.062299 \n",
"319056 16 Part Three COLUMBUS AVE 42.313628 -71.095603 \n",
"319057 18 Part Two SLAYTON WAY 42.321770 -71.097798 \n",
"319058 18 Part Two SLAYTON WAY 42.321770 -71.097798 \n",
"319059 1 Part Three GENEVA AVE NaN NaN \n",
"319060 1 Part Three GENEVA AVE NaN NaN \n",
"319061 11 Part One BLUE HILL AVE 42.301897 -71.085549 \n",
"319062 11 Part Three BLUE HILL AVE 42.301897 -71.085549 \n",
"319063 12 Part Three BOYLSTON ST 42.352312 -71.063705 \n",
"319064 12 Part Two BOYLSTON ST 42.352312 -71.063705 \n",
"319065 12 Part Two BOYLSTON ST 42.352312 -71.063705 \n",
"319066 14 Part Two CENTRE ST 42.322838 -71.100967 \n",
"319067 14 Part Three CENTRE ST 42.322838 -71.100967 \n",
"319068 17 Part Three COVENTRY ST 42.336951 -71.085748 \n",
"319069 13 Part One RIVER ST 42.255926 -71.123172 \n",
"319070 13 Part Three RIVER ST 42.255926 -71.123172 \n",
"319071 19 Part Three NEW WASHINGTON ST 42.302333 -71.111565 \n",
"319072 0 Part Three WASHINGTON ST 42.333839 -71.080290 \n",
"\n",
" Location \n",
"0 (42.35779134, -71.13937053) \n",
"1 (42.30682138, -71.06030035) \n",
"2 (42.34658879, -71.07242943) \n",
"3 (42.33418175, -71.07866441) \n",
"4 (42.27536542, -71.09036101) \n",
"5 (42.29019621, -71.07159012) \n",
"6 (42.30607218, -71.08273260) \n",
"7 (42.32701648, -71.10555088) \n",
"8 (42.33152148, -71.07085307) \n",
"9 (42.29514664, -71.05860832) \n",
"10 (42.31957856, -71.04032766) \n",
"11 (42.34011469, -71.05339029) \n",
"12 (42.35038760, -71.08785290) \n",
"13 (42.28647012, -71.08714661) \n",
"14 (42.27924052, -71.09667382) \n",
"15 (42.35287456, -71.07382970) \n",
"16 (42.30526428, -71.06683755) \n",
"17 (42.34857652, -71.07772012) \n",
"18 (42.33371742, -71.09665806) \n",
"19 (42.32569490, -71.06816778) \n",
"20 (-1.00000000, -1.00000000) \n",
"21 (42.35564426, -71.07168077) \n",
"22 (42.28340243, -71.08079740) \n",
"23 (42.27581799, -71.13991259) \n",
"24 (42.33506218, -71.09316781) \n",
"25 (42.28359328, -71.05565683) \n",
"26 (42.33311189, -71.07276370) \n",
"27 (42.31731905, -71.06150882) \n",
"28 (42.31731905, -71.06150882) \n",
"29 (42.29590385, -71.08773294) \n",
"... ... \n",
"319043 (42.33555954, -71.07436364) \n",
"319044 (42.33555954, -71.07436364) \n",
"319045 (42.35742837, -71.05832551) \n",
"319046 (42.35742837, -71.05832551) \n",
"319047 (42.30703835, -71.06615319) \n",
"319048 (42.30703835, -71.06615319) \n",
"319049 (42.31127726, -71.08909334) \n",
"319050 (42.31127726, -71.08909334) \n",
"319051 (42.31127726, -71.08909334) \n",
"319052 (42.33695098, -71.08574813) \n",
"319053 (42.33695098, -71.08574813) \n",
"319054 (42.36164502, -71.06229949) \n",
"319055 (42.36164502, -71.06229949) \n",
"319056 (42.31362799, -71.09560307) \n",
"319057 (42.32177032, -71.09779774) \n",
"319058 (42.32177032, -71.09779774) \n",
"319059 (0.00000000, 0.00000000) \n",
"319060 (0.00000000, 0.00000000) \n",
"319061 (42.30189690, -71.08554944) \n",
"319062 (42.30189690, -71.08554944) \n",
"319063 (42.35231190, -71.06370510) \n",
"319064 (42.35231190, -71.06370510) \n",
"319065 (42.35231190, -71.06370510) \n",
"319066 (42.32283759, -71.10096723) \n",
"319067 (42.32283759, -71.10096723) \n",
"319068 (42.33695098, -71.08574813) \n",
"319069 (42.25592648, -71.12317207) \n",
"319070 (42.25592648, -71.12317207) \n",
"319071 (42.30233307, -71.11156487) \n",
"319072 (42.33383935, -71.08029038) \n",
"\n",
"[319073 rows x 17 columns]"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import pandas as pd\n",
"crime = pd.read_csv('crime_conv.csv')\n",
"crime"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "instant-monitor",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>INCIDENT_NUMBER</th>\n",
" <th>OFFENSE_CODE</th>\n",
" <th>OFFENSE_CODE_GROUP</th>\n",
" <th>OFFENSE_DESCRIPTION</th>\n",
" <th>DISTRICT</th>\n",
" <th>REPORTING_AREA</th>\n",
" <th>SHOOTING</th>\n",
" <th>OCCURRED_ON_DATE</th>\n",
" <th>YEAR</th>\n",
" <th>MONTH</th>\n",
" <th>DAY_OF_WEEK</th>\n",
" <th>HOUR</th>\n",
" <th>UCR_PART</th>\n",
" <th>STREET</th>\n",
" <th>Lat</th>\n",
" <th>Long</th>\n",
" <th>Location</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>count</th>\n",
" <td>319073</td>\n",
" <td>319073.000000</td>\n",
" <td>319073</td>\n",
" <td>319073</td>\n",
" <td>317308</td>\n",
" <td>319073</td>\n",
" <td>1019</td>\n",
" <td>319073</td>\n",
" <td>319073.000000</td>\n",
" <td>319073.000000</td>\n",
" <td>319073</td>\n",
" <td>319073.000000</td>\n",
" <td>318983</td>\n",
" <td>308202</td>\n",
" <td>299074.000000</td>\n",
" <td>299074.000000</td>\n",
" <td>319073</td>\n",
" </tr>\n",
" <tr>\n",
" <th>unique</th>\n",
" <td>282517</td>\n",
" <td>NaN</td>\n",
" <td>67</td>\n",
" <td>244</td>\n",
" <td>12</td>\n",
" <td>879</td>\n",
" <td>1</td>\n",
" <td>233229</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>7</td>\n",
" <td>NaN</td>\n",
" <td>4</td>\n",
" <td>4657</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>18194</td>\n",
" </tr>\n",
" <tr>\n",
" <th>top</th>\n",
" <td>I162030584</td>\n",
" <td>NaN</td>\n",
" <td>Motor Vehicle Accident Response</td>\n",
" <td>SICK/INJURED/MEDICAL - PERSON</td>\n",
" <td>B2</td>\n",
" <td></td>\n",
" <td>Y</td>\n",
" <td>2017-06-01 00:00:00</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>Friday</td>\n",
" <td>NaN</td>\n",
" <td>Part Three</td>\n",
" <td>WASHINGTON ST</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>(0.00000000, 0.00000000)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>freq</th>\n",
" <td>13</td>\n",
" <td>NaN</td>\n",
" <td>37132</td>\n",
" <td>18783</td>\n",
" <td>49945</td>\n",
" <td>20250</td>\n",
" <td>1019</td>\n",
" <td>29</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>48495</td>\n",
" <td>NaN</td>\n",
" <td>158553</td>\n",
" <td>14194</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>19999</td>\n",
" </tr>\n",
" <tr>\n",
" <th>mean</th>\n",
" <td>NaN</td>\n",
" <td>2317.546956</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2016.560586</td>\n",
" <td>6.609719</td>\n",
" <td>NaN</td>\n",
" <td>13.118205</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>42.214381</td>\n",
" <td>-70.908272</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>std</th>\n",
" <td>NaN</td>\n",
" <td>1185.285543</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0.996344</td>\n",
" <td>3.273691</td>\n",
" <td>NaN</td>\n",
" <td>6.294205</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2.159766</td>\n",
" <td>3.493618</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>min</th>\n",
" <td>NaN</td>\n",
" <td>111.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2015.000000</td>\n",
" <td>1.000000</td>\n",
" <td>NaN</td>\n",
" <td>0.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>-1.000000</td>\n",
" <td>-71.178674</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25%</th>\n",
" <td>NaN</td>\n",
" <td>1001.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2016.000000</td>\n",
" <td>4.000000</td>\n",
" <td>NaN</td>\n",
" <td>9.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>42.297442</td>\n",
" <td>-71.097135</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>50%</th>\n",
" <td>NaN</td>\n",
" <td>2907.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2017.000000</td>\n",
" <td>7.000000</td>\n",
" <td>NaN</td>\n",
" <td>14.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>42.325538</td>\n",
" <td>-71.077524</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>75%</th>\n",
" <td>NaN</td>\n",
" <td>3201.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2017.000000</td>\n",
" <td>9.000000</td>\n",
" <td>NaN</td>\n",
" <td>18.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>42.348624</td>\n",
" <td>-71.062467</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>max</th>\n",
" <td>NaN</td>\n",
" <td>3831.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2018.000000</td>\n",
" <td>12.000000</td>\n",
" <td>NaN</td>\n",
" <td>23.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>42.395042</td>\n",
" <td>-1.000000</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" INCIDENT_NUMBER OFFENSE_CODE OFFENSE_CODE_GROUP \\\n",
"count 319073 319073.000000 319073 \n",
"unique 282517 NaN 67 \n",
"top I162030584 NaN Motor Vehicle Accident Response \n",
"freq 13 NaN 37132 \n",
"mean NaN 2317.546956 NaN \n",
"std NaN 1185.285543 NaN \n",
"min NaN 111.000000 NaN \n",
"25% NaN 1001.000000 NaN \n",
"50% NaN 2907.000000 NaN \n",
"75% NaN 3201.000000 NaN \n",
"max NaN 3831.000000 NaN \n",
"\n",
" OFFENSE_DESCRIPTION DISTRICT REPORTING_AREA SHOOTING \\\n",
"count 319073 317308 319073 1019 \n",
"unique 244 12 879 1 \n",
"top SICK/INJURED/MEDICAL - PERSON B2 Y \n",
"freq 18783 49945 20250 1019 \n",
"mean NaN NaN NaN NaN \n",
"std NaN NaN NaN NaN \n",
"min NaN NaN NaN NaN \n",
"25% NaN NaN NaN NaN \n",
"50% NaN NaN NaN NaN \n",
"75% NaN NaN NaN NaN \n",
"max NaN NaN NaN NaN \n",
"\n",
" OCCURRED_ON_DATE YEAR MONTH DAY_OF_WEEK \\\n",
"count 319073 319073.000000 319073.000000 319073 \n",
"unique 233229 NaN NaN 7 \n",
"top 2017-06-01 00:00:00 NaN NaN Friday \n",
"freq 29 NaN NaN 48495 \n",
"mean NaN 2016.560586 6.609719 NaN \n",
"std NaN 0.996344 3.273691 NaN \n",
"min NaN 2015.000000 1.000000 NaN \n",
"25% NaN 2016.000000 4.000000 NaN \n",
"50% NaN 2017.000000 7.000000 NaN \n",
"75% NaN 2017.000000 9.000000 NaN \n",
"max NaN 2018.000000 12.000000 NaN \n",
"\n",
" HOUR UCR_PART STREET Lat \\\n",
"count 319073.000000 318983 308202 299074.000000 \n",
"unique NaN 4 4657 NaN \n",
"top NaN Part Three WASHINGTON ST NaN \n",
"freq NaN 158553 14194 NaN \n",
"mean 13.118205 NaN NaN 42.214381 \n",
"std 6.294205 NaN NaN 2.159766 \n",
"min 0.000000 NaN NaN -1.000000 \n",
"25% 9.000000 NaN NaN 42.297442 \n",
"50% 14.000000 NaN NaN 42.325538 \n",
"75% 18.000000 NaN NaN 42.348624 \n",
"max 23.000000 NaN NaN 42.395042 \n",
"\n",
" Long Location \n",
"count 299074.000000 319073 \n",
"unique NaN 18194 \n",
"top NaN (0.00000000, 0.00000000) \n",
"freq NaN 19999 \n",
"mean -70.908272 NaN \n",
"std 3.493618 NaN \n",
"min -71.178674 NaN \n",
"25% -71.097135 NaN \n",
"50% -71.077524 NaN \n",
"75% -71.062467 NaN \n",
"max -1.000000 NaN "
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"crime.describe(include=\"all\")"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "still-sweet",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>INCIDENT_NUMBER</th>\n",
" <th>OFFENSE_CODE</th>\n",
" <th>OFFENSE_CODE_GROUP</th>\n",
" <th>OFFENSE_DESCRIPTION</th>\n",
" <th>DISTRICT</th>\n",
" <th>REPORTING_AREA</th>\n",
" <th>SHOOTING</th>\n",
" <th>OCCURRED_ON_DATE</th>\n",
" <th>YEAR</th>\n",
" <th>MONTH</th>\n",
" <th>DAY_OF_WEEK</th>\n",
" <th>HOUR</th>\n",
" <th>UCR_PART</th>\n",
" <th>STREET</th>\n",
" <th>Lat</th>\n",
" <th>Long</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>I182070945</td>\n",
" <td>619</td>\n",
" <td>larceny</td>\n",
" <td>larceny all others</td>\n",
" <td>D14</td>\n",
" <td>808</td>\n",
" <td>N</td>\n",
" <td>2018-09-02 13:00:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>sunday</td>\n",
" <td>13</td>\n",
" <td>part one</td>\n",
" <td>lincoln st</td>\n",
" <td>42.357791</td>\n",
" <td>-71.139371</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>I182070943</td>\n",
" <td>1402</td>\n",
" <td>vandalism</td>\n",
" <td>vandalism</td>\n",
" <td>C11</td>\n",
" <td>347</td>\n",
" <td>N</td>\n",
" <td>2018-08-21 00:00:00</td>\n",
" <td>2018</td>\n",
" <td>8</td>\n",
" <td>tuesday</td>\n",
" <td>0</td>\n",
" <td>part two</td>\n",
" <td>hecla st</td>\n",
" <td>42.306821</td>\n",
" <td>-71.060300</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>I182070941</td>\n",
" <td>3410</td>\n",
" <td>towed</td>\n",
" <td>towed motor vehicle</td>\n",
" <td>D4</td>\n",
" <td>151</td>\n",
" <td>N</td>\n",
" <td>2018-09-03 19:27:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>monday</td>\n",
" <td>19</td>\n",
" <td>part three</td>\n",
" <td>cazenove st</td>\n",
" <td>42.346589</td>\n",
" <td>-71.072429</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>I182070940</td>\n",
" <td>3114</td>\n",
" <td>investigate property</td>\n",
" <td>investigate property</td>\n",
" <td>D4</td>\n",
" <td>272</td>\n",
" <td>N</td>\n",
" <td>2018-09-03 21:16:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>monday</td>\n",
" <td>21</td>\n",
" <td>part three</td>\n",
" <td>newcomb st</td>\n",
" <td>42.334182</td>\n",
" <td>-71.078664</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>I182070938</td>\n",
" <td>3114</td>\n",
" <td>investigate property</td>\n",
" <td>investigate property</td>\n",
" <td>B3</td>\n",
" <td>421</td>\n",
" <td>N</td>\n",
" <td>2018-09-03 21:05:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>monday</td>\n",
" <td>21</td>\n",
" <td>part three</td>\n",
" <td>delhi st</td>\n",
" <td>42.275365</td>\n",
" <td>-71.090361</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>I182070936</td>\n",
" <td>3820</td>\n",
" <td>motor vehicle accident response</td>\n",
" <td>m/v accident involving pedestrian - injury</td>\n",
" <td>C11</td>\n",
" <td>398</td>\n",
" <td>N</td>\n",
" <td>2018-09-03 21:09:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>monday</td>\n",
" <td>21</td>\n",
" <td>part three</td>\n",
" <td>talbot ave</td>\n",
" <td>42.290196</td>\n",
" <td>-71.071590</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>I182070933</td>\n",
" <td>724</td>\n",
" <td>auto theft</td>\n",
" <td>auto theft</td>\n",
" <td>B2</td>\n",
" <td>330</td>\n",
" <td>N</td>\n",
" <td>2018-09-03 21:25:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>monday</td>\n",
" <td>21</td>\n",
" <td>part one</td>\n",
" <td>normandy st</td>\n",
" <td>42.306072</td>\n",
" <td>-71.082733</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>I182070932</td>\n",
" <td>3301</td>\n",
" <td>verbal disputes</td>\n",
" <td>verbal dispute</td>\n",
" <td>B2</td>\n",
" <td>584</td>\n",
" <td>N</td>\n",
" <td>2018-09-03 20:39:37</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>monday</td>\n",
" <td>20</td>\n",
" <td>part three</td>\n",
" <td>lawn st</td>\n",
" <td>42.327016</td>\n",
" <td>-71.105551</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>I182070931</td>\n",
" <td>301</td>\n",
" <td>robbery</td>\n",
" <td>robbery - street</td>\n",
" <td>C6</td>\n",
" <td>177</td>\n",
" <td>N</td>\n",
" <td>2018-09-03 20:48:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>monday</td>\n",
" <td>20</td>\n",
" <td>part one</td>\n",
" <td>massachusetts ave</td>\n",
" <td>42.331521</td>\n",
" <td>-71.070853</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>I182070929</td>\n",
" <td>3301</td>\n",
" <td>verbal disputes</td>\n",
" <td>verbal dispute</td>\n",
" <td>C11</td>\n",
" <td>364</td>\n",
" <td>N</td>\n",
" <td>2018-09-03 20:38:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>monday</td>\n",
" <td>20</td>\n",
" <td>part three</td>\n",
" <td>leslie st</td>\n",
" <td>42.295147</td>\n",
" <td>-71.058608</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>I182070928</td>\n",
" <td>3301</td>\n",
" <td>verbal disputes</td>\n",
" <td>verbal dispute</td>\n",
" <td>C6</td>\n",
" <td>913</td>\n",
" <td>N</td>\n",
" <td>2018-09-03 19:55:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>monday</td>\n",
" <td>19</td>\n",
" <td>part three</td>\n",
" <td>ocean view dr</td>\n",
" <td>42.319579</td>\n",
" <td>-71.040328</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>I182070927</td>\n",
" <td>3114</td>\n",
" <td>investigate property</td>\n",
" <td>investigate property</td>\n",
" <td>C6</td>\n",
" <td>936</td>\n",
" <td>N</td>\n",
" <td>2018-09-03 20:19:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>monday</td>\n",
" <td>20</td>\n",
" <td>part three</td>\n",
" <td>dalessio ct</td>\n",
" <td>42.340115</td>\n",
" <td>-71.053390</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12</th>\n",
" <td>I182070923</td>\n",
" <td>3108</td>\n",
" <td>fire related reports</td>\n",
" <td>fire report - house, building, etc.</td>\n",
" <td>D4</td>\n",
" <td>139</td>\n",
" <td>N</td>\n",
" <td>2018-09-03 19:58:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>monday</td>\n",
" <td>19</td>\n",
" <td>part three</td>\n",
" <td>marlborough st</td>\n",
" <td>42.350388</td>\n",
" <td>-71.087853</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>I182070922</td>\n",
" <td>2647</td>\n",
" <td>other</td>\n",
" <td>threats to do bodily harm</td>\n",
" <td>B3</td>\n",
" <td>429</td>\n",
" <td>N</td>\n",
" <td>2018-09-03 20:39:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>monday</td>\n",
" <td>20</td>\n",
" <td>part two</td>\n",
" <td>woodrow ave</td>\n",
" <td>42.286470</td>\n",
" <td>-71.087147</td>\n",
" </tr>\n",
" <tr>\n",
" <th>14</th>\n",
" <td>I182070921</td>\n",
" <td>3201</td>\n",
" <td>property lost</td>\n",
" <td>property - lost</td>\n",
" <td>B3</td>\n",
" <td>469</td>\n",
" <td>N</td>\n",
" <td>2018-09-02 14:00:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>sunday</td>\n",
" <td>14</td>\n",
" <td>part three</td>\n",
" <td>mulvey st</td>\n",
" <td>42.279241</td>\n",
" <td>-71.096674</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16</th>\n",
" <td>I182070919</td>\n",
" <td>3301</td>\n",
" <td>verbal disputes</td>\n",
" <td>verbal dispute</td>\n",
" <td>C11</td>\n",
" <td>341</td>\n",
" <td>N</td>\n",
" <td>2018-09-03 18:52:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>monday</td>\n",
" <td>18</td>\n",
" <td>part three</td>\n",
" <td>stonehurst st</td>\n",
" <td>42.305264</td>\n",
" <td>-71.066838</td>\n",
" </tr>\n",
" <tr>\n",
" <th>17</th>\n",
" <td>I182070918</td>\n",
" <td>3305</td>\n",
" <td>assembly or gathering violations</td>\n",
" <td>demonstrations/riot</td>\n",
" <td>D4</td>\n",
" <td>130</td>\n",
" <td>N</td>\n",
" <td>2018-09-03 17:00:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>monday</td>\n",
" <td>17</td>\n",
" <td>part three</td>\n",
" <td>huntington ave</td>\n",
" <td>42.348577</td>\n",
" <td>-71.077720</td>\n",
" </tr>\n",
" <tr>\n",
" <th>18</th>\n",
" <td>I182070917</td>\n",
" <td>2647</td>\n",
" <td>other</td>\n",
" <td>threats to do bodily harm</td>\n",
" <td>B2</td>\n",
" <td>901</td>\n",
" <td>N</td>\n",
" <td>2018-09-03 19:52:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>monday</td>\n",
" <td>19</td>\n",
" <td>part two</td>\n",
" <td>horadan way</td>\n",
" <td>42.333717</td>\n",
" <td>-71.096658</td>\n",
" </tr>\n",
" <tr>\n",
" <th>19</th>\n",
" <td>I182070915</td>\n",
" <td>614</td>\n",
" <td>larceny from motor vehicle</td>\n",
" <td>larceny theft from mv - non-accessory</td>\n",
" <td>B2</td>\n",
" <td>181</td>\n",
" <td>N</td>\n",
" <td>2018-09-02 18:00:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>sunday</td>\n",
" <td>18</td>\n",
" <td>part one</td>\n",
" <td>shirley st</td>\n",
" <td>42.325695</td>\n",
" <td>-71.068168</td>\n",
" </tr>\n",
" <tr>\n",
" <th>21</th>\n",
" <td>I182070911</td>\n",
" <td>3801</td>\n",
" <td>motor vehicle accident response</td>\n",
" <td>m/v accident - other</td>\n",
" <td>A1</td>\n",
" <td>69</td>\n",
" <td>N</td>\n",
" <td>2018-09-03 18:30:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>monday</td>\n",
" <td>18</td>\n",
" <td>part three</td>\n",
" <td>beacon st</td>\n",
" <td>42.355644</td>\n",
" <td>-71.071681</td>\n",
" </tr>\n",
" <tr>\n",
" <th>22</th>\n",
" <td>I182070910</td>\n",
" <td>3006</td>\n",
" <td>medical assistance</td>\n",
" <td>sick/injured/medical - person</td>\n",
" <td>B3</td>\n",
" <td>434</td>\n",
" <td>N</td>\n",
" <td>2018-09-03 18:42:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>monday</td>\n",
" <td>18</td>\n",
" <td>part three</td>\n",
" <td>capen st</td>\n",
" <td>42.283402</td>\n",
" <td>-71.080797</td>\n",
" </tr>\n",
" <tr>\n",
" <th>23</th>\n",
" <td>I182070909</td>\n",
" <td>3803</td>\n",
" <td>motor vehicle accident response</td>\n",
" <td>m/v accident - personal injury</td>\n",
" <td>E5</td>\n",
" <td>550</td>\n",
" <td>N</td>\n",
" <td>2018-09-03 18:33:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>monday</td>\n",
" <td>18</td>\n",
" <td>part three</td>\n",
" <td>washington st</td>\n",
" <td>42.275818</td>\n",
" <td>-71.139913</td>\n",
" </tr>\n",
" <tr>\n",
" <th>24</th>\n",
" <td>I182070908</td>\n",
" <td>522</td>\n",
" <td>residential burglary</td>\n",
" <td>burglary - residential - no force</td>\n",
" <td>B2</td>\n",
" <td>911</td>\n",
" <td>N</td>\n",
" <td>2018-09-03 18:38:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>monday</td>\n",
" <td>18</td>\n",
" <td>part one</td>\n",
" <td>annunciation rd</td>\n",
" <td>42.335062</td>\n",
" <td>-71.093168</td>\n",
" </tr>\n",
" <tr>\n",
" <th>26</th>\n",
" <td>I182070905</td>\n",
" <td>3006</td>\n",
" <td>medical assistance</td>\n",
" <td>sick/injured/medical - person</td>\n",
" <td>D4</td>\n",
" <td>172</td>\n",
" <td>N</td>\n",
" <td>2018-09-03 18:50:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>monday</td>\n",
" <td>18</td>\n",
" <td>part three</td>\n",
" <td>massachusetts ave</td>\n",
" <td>42.333112</td>\n",
" <td>-71.072764</td>\n",
" </tr>\n",
" <tr>\n",
" <th>27</th>\n",
" <td>I182070904</td>\n",
" <td>802</td>\n",
" <td>simple assault</td>\n",
" <td>assault simple - battery</td>\n",
" <td>C11</td>\n",
" <td>242</td>\n",
" <td>N</td>\n",
" <td>2018-09-03 18:34:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>monday</td>\n",
" <td>18</td>\n",
" <td>part two</td>\n",
" <td>annapolis st</td>\n",
" <td>42.317319</td>\n",
" <td>-71.061509</td>\n",
" </tr>\n",
" <tr>\n",
" <th>28</th>\n",
" <td>I182070904</td>\n",
" <td>2007</td>\n",
" <td>restraining order violations</td>\n",
" <td>viol. of restraining order w no arrest</td>\n",
" <td>C11</td>\n",
" <td>242</td>\n",
" <td>N</td>\n",
" <td>2018-09-03 18:34:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>monday</td>\n",
" <td>18</td>\n",
" <td>part two</td>\n",
" <td>annapolis st</td>\n",
" <td>42.317319</td>\n",
" <td>-71.061509</td>\n",
" </tr>\n",
" <tr>\n",
" <th>29</th>\n",
" <td>I182070903</td>\n",
" <td>2900</td>\n",
" <td>other</td>\n",
" <td>val - violation of auto law - other</td>\n",
" <td>B3</td>\n",
" <td>463</td>\n",
" <td>N</td>\n",
" <td>2018-09-03 18:55:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>monday</td>\n",
" <td>18</td>\n",
" <td>part two</td>\n",
" <td>blue hill ave</td>\n",
" <td>42.295904</td>\n",
" <td>-71.087733</td>\n",
" </tr>\n",
" <tr>\n",
" <th>30</th>\n",
" <td>I182070901</td>\n",
" <td>2907</td>\n",
" <td>violations</td>\n",
" <td>val - operating after rev/susp.</td>\n",
" <td>B3</td>\n",
" <td>428</td>\n",
" <td>N</td>\n",
" <td>2018-09-03 18:41:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>monday</td>\n",
" <td>18</td>\n",
" <td>part two</td>\n",
" <td>clarkwood st</td>\n",
" <td>42.280137</td>\n",
" <td>-71.090798</td>\n",
" </tr>\n",
" <tr>\n",
" <th>31</th>\n",
" <td>I182070900</td>\n",
" <td>2629</td>\n",
" <td>harassment</td>\n",
" <td>harassment</td>\n",
" <td>B3</td>\n",
" <td>464</td>\n",
" <td>N</td>\n",
" <td>2018-09-03 18:17:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>monday</td>\n",
" <td>18</td>\n",
" <td>part two</td>\n",
" <td>hansborough st</td>\n",
" <td>42.288104</td>\n",
" <td>-71.091533</td>\n",
" </tr>\n",
" <tr>\n",
" <th>32</th>\n",
" <td>I182070898</td>\n",
" <td>802</td>\n",
" <td>simple assault</td>\n",
" <td>assault simple - battery</td>\n",
" <td>C11</td>\n",
" <td>351</td>\n",
" <td>N</td>\n",
" <td>2018-09-03 19:11:00</td>\n",
" <td>2018</td>\n",
" <td>9</td>\n",
" <td>monday</td>\n",
" <td>19</td>\n",
" <td>part two</td>\n",
" <td>salisbury park</td>\n",
" <td>42.299284</td>\n",
" <td>-71.059172</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319040</th>\n",
" <td>I110694557-00</td>\n",
" <td>3125</td>\n",
" <td>warrant arrests</td>\n",
" <td>warrant arrest</td>\n",
" <td>B3</td>\n",
" <td>436</td>\n",
" <td>N</td>\n",
" <td>2016-01-22 09:45:00</td>\n",
" <td>2016</td>\n",
" <td>1</td>\n",
" <td>friday</td>\n",
" <td>9</td>\n",
" <td>part three</td>\n",
" <td>withington st</td>\n",
" <td>42.288767</td>\n",
" <td>-71.072897</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319041</th>\n",
" <td>I110694557-00</td>\n",
" <td>3115</td>\n",
" <td>investigate person</td>\n",
" <td>investigate person</td>\n",
" <td>B3</td>\n",
" <td>436</td>\n",
" <td>N</td>\n",
" <td>2016-01-22 09:45:00</td>\n",
" <td>2016</td>\n",
" <td>1</td>\n",
" <td>friday</td>\n",
" <td>9</td>\n",
" <td>part three</td>\n",
" <td>withington st</td>\n",
" <td>42.288767</td>\n",
" <td>-71.072897</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319043</th>\n",
" <td>I110551302-00</td>\n",
" <td>3125</td>\n",
" <td>warrant arrests</td>\n",
" <td>warrant arrest</td>\n",
" <td>D4</td>\n",
" <td>171</td>\n",
" <td>N</td>\n",
" <td>2015-07-22 22:00:00</td>\n",
" <td>2015</td>\n",
" <td>7</td>\n",
" <td>wednesday</td>\n",
" <td>22</td>\n",
" <td>part three</td>\n",
" <td>harrison ave</td>\n",
" <td>42.335560</td>\n",
" <td>-71.074364</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319044</th>\n",
" <td>I110551302-00</td>\n",
" <td>623</td>\n",
" <td>larceny</td>\n",
" <td>larceny shoplifting $50 to $199</td>\n",
" <td>D4</td>\n",
" <td>171</td>\n",
" <td>N</td>\n",
" <td>2015-07-22 22:00:00</td>\n",
" <td>2015</td>\n",
" <td>7</td>\n",
" <td>wednesday</td>\n",
" <td>22</td>\n",
" <td>part one</td>\n",
" <td>harrison ave</td>\n",
" <td>42.335560</td>\n",
" <td>-71.074364</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319045</th>\n",
" <td>I110372326-00</td>\n",
" <td>403</td>\n",
" <td>aggravated assault</td>\n",
" <td>assault &amp; battery d/w - other</td>\n",
" <td>A1</td>\n",
" <td>97</td>\n",
" <td>N</td>\n",
" <td>2016-06-14 09:40:00</td>\n",
" <td>2016</td>\n",
" <td>6</td>\n",
" <td>tuesday</td>\n",
" <td>9</td>\n",
" <td>part one</td>\n",
" <td>school st</td>\n",
" <td>42.357428</td>\n",
" <td>-71.058326</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319046</th>\n",
" <td>I110372326-00</td>\n",
" <td>3125</td>\n",
" <td>warrant arrests</td>\n",
" <td>warrant arrest</td>\n",
" <td>A1</td>\n",
" <td>97</td>\n",
" <td>N</td>\n",
" <td>2016-06-14 09:40:00</td>\n",
" <td>2016</td>\n",
" <td>6</td>\n",
" <td>tuesday</td>\n",
" <td>9</td>\n",
" <td>part three</td>\n",
" <td>school st</td>\n",
" <td>42.357428</td>\n",
" <td>-71.058326</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319047</th>\n",
" <td>I110261417-00</td>\n",
" <td>3125</td>\n",
" <td>warrant arrests</td>\n",
" <td>warrant arrest</td>\n",
" <td>B2</td>\n",
" <td>324</td>\n",
" <td>N</td>\n",
" <td>2016-07-29 00:00:00</td>\n",
" <td>2016</td>\n",
" <td>7</td>\n",
" <td>friday</td>\n",
" <td>0</td>\n",
" <td>part three</td>\n",
" <td>bowdoin st</td>\n",
" <td>42.307038</td>\n",
" <td>-71.066153</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319048</th>\n",
" <td>I110261417-00</td>\n",
" <td>619</td>\n",
" <td>larceny</td>\n",
" <td>larceny other $200 &amp; over</td>\n",
" <td>B2</td>\n",
" <td>324</td>\n",
" <td>N</td>\n",
" <td>2016-07-29 00:00:00</td>\n",
" <td>2016</td>\n",
" <td>7</td>\n",
" <td>friday</td>\n",
" <td>0</td>\n",
" <td>part one</td>\n",
" <td>bowdoin st</td>\n",
" <td>42.307038</td>\n",
" <td>-71.066153</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319049</th>\n",
" <td>I110177502-00</td>\n",
" <td>3125</td>\n",
" <td>warrant arrests</td>\n",
" <td>warrant arrest</td>\n",
" <td>B2</td>\n",
" <td>318</td>\n",
" <td>N</td>\n",
" <td>2015-10-02 21:00:00</td>\n",
" <td>2015</td>\n",
" <td>10</td>\n",
" <td>friday</td>\n",
" <td>21</td>\n",
" <td>part three</td>\n",
" <td>homestead st</td>\n",
" <td>42.311277</td>\n",
" <td>-71.089093</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319050</th>\n",
" <td>I110177502-00</td>\n",
" <td>802</td>\n",
" <td>simple assault</td>\n",
" <td>assault &amp; battery</td>\n",
" <td>B2</td>\n",
" <td>318</td>\n",
" <td>N</td>\n",
" <td>2015-10-02 21:00:00</td>\n",
" <td>2015</td>\n",
" <td>10</td>\n",
" <td>friday</td>\n",
" <td>21</td>\n",
" <td>part two</td>\n",
" <td>homestead st</td>\n",
" <td>42.311277</td>\n",
" <td>-71.089093</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319051</th>\n",
" <td>I110177502-00</td>\n",
" <td>3125</td>\n",
" <td>warrant arrests</td>\n",
" <td>warrant arrest</td>\n",
" <td>B2</td>\n",
" <td>318</td>\n",
" <td>N</td>\n",
" <td>2015-10-02 21:00:00</td>\n",
" <td>2015</td>\n",
" <td>10</td>\n",
" <td>friday</td>\n",
" <td>21</td>\n",
" <td>part three</td>\n",
" <td>homestead st</td>\n",
" <td>42.311277</td>\n",
" <td>-71.089093</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319052</th>\n",
" <td>I100636670-00</td>\n",
" <td>629</td>\n",
" <td>larceny</td>\n",
" <td>larceny other $50 to $199</td>\n",
" <td>D4</td>\n",
" <td>285</td>\n",
" <td>N</td>\n",
" <td>2016-06-05 17:23:00</td>\n",
" <td>2016</td>\n",
" <td>6</td>\n",
" <td>sunday</td>\n",
" <td>17</td>\n",
" <td>part one</td>\n",
" <td>coventry st</td>\n",
" <td>42.336951</td>\n",
" <td>-71.085748</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319053</th>\n",
" <td>I100636670-00</td>\n",
" <td>3125</td>\n",
" <td>warrant arrests</td>\n",
" <td>warrant arrest</td>\n",
" <td>D4</td>\n",
" <td>285</td>\n",
" <td>N</td>\n",
" <td>2016-06-05 17:23:00</td>\n",
" <td>2016</td>\n",
" <td>6</td>\n",
" <td>sunday</td>\n",
" <td>17</td>\n",
" <td>part three</td>\n",
" <td>coventry st</td>\n",
" <td>42.336951</td>\n",
" <td>-71.085748</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319054</th>\n",
" <td>I100340225-00</td>\n",
" <td>3125</td>\n",
" <td>warrant arrests</td>\n",
" <td>warrant arrest</td>\n",
" <td>A1</td>\n",
" <td>77</td>\n",
" <td>N</td>\n",
" <td>2015-07-27 10:47:00</td>\n",
" <td>2015</td>\n",
" <td>7</td>\n",
" <td>monday</td>\n",
" <td>10</td>\n",
" <td>part three</td>\n",
" <td>bowdoin sq</td>\n",
" <td>42.361645</td>\n",
" <td>-71.062299</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319055</th>\n",
" <td>I100340225-00</td>\n",
" <td>339</td>\n",
" <td>robbery</td>\n",
" <td>robbery - unarmed - street</td>\n",
" <td>A1</td>\n",
" <td>77</td>\n",
" <td>N</td>\n",
" <td>2015-07-27 10:47:00</td>\n",
" <td>2015</td>\n",
" <td>7</td>\n",
" <td>monday</td>\n",
" <td>10</td>\n",
" <td>part one</td>\n",
" <td>bowdoin sq</td>\n",
" <td>42.361645</td>\n",
" <td>-71.062299</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319056</th>\n",
" <td>I100222105-02</td>\n",
" <td>3125</td>\n",
" <td>warrant arrests</td>\n",
" <td>warrant arrest</td>\n",
" <td>E13</td>\n",
" <td>572</td>\n",
" <td>N</td>\n",
" <td>2015-08-03 16:22:00</td>\n",
" <td>2015</td>\n",
" <td>8</td>\n",
" <td>monday</td>\n",
" <td>16</td>\n",
" <td>part three</td>\n",
" <td>columbus ave</td>\n",
" <td>42.313628</td>\n",
" <td>-71.095603</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319057</th>\n",
" <td>I100033064-00</td>\n",
" <td>2907</td>\n",
" <td>violations</td>\n",
" <td>val - operating after rev/susp.</td>\n",
" <td>B2</td>\n",
" <td>304</td>\n",
" <td>N</td>\n",
" <td>2016-07-29 18:20:00</td>\n",
" <td>2016</td>\n",
" <td>7</td>\n",
" <td>friday</td>\n",
" <td>18</td>\n",
" <td>part two</td>\n",
" <td>slayton way</td>\n",
" <td>42.321770</td>\n",
" <td>-71.097798</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319058</th>\n",
" <td>I100033064-00</td>\n",
" <td>2910</td>\n",
" <td>violations</td>\n",
" <td>val - operating after rev/susp.</td>\n",
" <td>B2</td>\n",
" <td>304</td>\n",
" <td>N</td>\n",
" <td>2016-07-29 18:20:00</td>\n",
" <td>2016</td>\n",
" <td>7</td>\n",
" <td>friday</td>\n",
" <td>18</td>\n",
" <td>part two</td>\n",
" <td>slayton way</td>\n",
" <td>42.321770</td>\n",
" <td>-71.097798</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319061</th>\n",
" <td>I090317057-00</td>\n",
" <td>403</td>\n",
" <td>aggravated assault</td>\n",
" <td>assault &amp; battery d/w - other</td>\n",
" <td>B3</td>\n",
" <td>458</td>\n",
" <td>N</td>\n",
" <td>2015-11-20 11:15:00</td>\n",
" <td>2015</td>\n",
" <td>11</td>\n",
" <td>friday</td>\n",
" <td>11</td>\n",
" <td>part one</td>\n",
" <td>blue hill ave</td>\n",
" <td>42.301897</td>\n",
" <td>-71.085549</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319062</th>\n",
" <td>I090317057-00</td>\n",
" <td>3125</td>\n",
" <td>warrant arrests</td>\n",
" <td>warrant arrest</td>\n",
" <td>B3</td>\n",
" <td>458</td>\n",
" <td>N</td>\n",
" <td>2015-11-20 11:15:00</td>\n",
" <td>2015</td>\n",
" <td>11</td>\n",
" <td>friday</td>\n",
" <td>11</td>\n",
" <td>part three</td>\n",
" <td>blue hill ave</td>\n",
" <td>42.301897</td>\n",
" <td>-71.085549</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319063</th>\n",
" <td>I080542626-00</td>\n",
" <td>3125</td>\n",
" <td>warrant arrests</td>\n",
" <td>warrant arrest</td>\n",
" <td>A1</td>\n",
" <td>111</td>\n",
" <td>N</td>\n",
" <td>2015-08-12 12:00:00</td>\n",
" <td>2015</td>\n",
" <td>8</td>\n",
" <td>wednesday</td>\n",
" <td>12</td>\n",
" <td>part three</td>\n",
" <td>boylston st</td>\n",
" <td>42.352312</td>\n",
" <td>-71.063705</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319064</th>\n",
" <td>I080542626-00</td>\n",
" <td>1848</td>\n",
" <td>drug violation</td>\n",
" <td>drugs - poss class b - intent to mfr dist disp</td>\n",
" <td>A1</td>\n",
" <td>111</td>\n",
" <td>N</td>\n",
" <td>2015-08-12 12:00:00</td>\n",
" <td>2015</td>\n",
" <td>8</td>\n",
" <td>wednesday</td>\n",
" <td>12</td>\n",
" <td>part two</td>\n",
" <td>boylston st</td>\n",
" <td>42.352312</td>\n",
" <td>-71.063705</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319065</th>\n",
" <td>I080542626-00</td>\n",
" <td>1849</td>\n",
" <td>drug violation</td>\n",
" <td>drugs - poss class b - cocaine, etc.</td>\n",
" <td>A1</td>\n",
" <td>111</td>\n",
" <td>N</td>\n",
" <td>2015-08-12 12:00:00</td>\n",
" <td>2015</td>\n",
" <td>8</td>\n",
" <td>wednesday</td>\n",
" <td>12</td>\n",
" <td>part two</td>\n",
" <td>boylston st</td>\n",
" <td>42.352312</td>\n",
" <td>-71.063705</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319066</th>\n",
" <td>I060168073-00</td>\n",
" <td>1864</td>\n",
" <td>drug violation</td>\n",
" <td>drugs - poss class d - intent mfr dist disp</td>\n",
" <td>E13</td>\n",
" <td>912</td>\n",
" <td>N</td>\n",
" <td>2018-01-27 14:01:00</td>\n",
" <td>2018</td>\n",
" <td>1</td>\n",
" <td>saturday</td>\n",
" <td>14</td>\n",
" <td>part two</td>\n",
" <td>centre st</td>\n",
" <td>42.322838</td>\n",
" <td>-71.100967</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319067</th>\n",
" <td>I060168073-00</td>\n",
" <td>3125</td>\n",
" <td>warrant arrests</td>\n",
" <td>warrant arrest</td>\n",
" <td>E13</td>\n",
" <td>912</td>\n",
" <td>N</td>\n",
" <td>2018-01-27 14:01:00</td>\n",
" <td>2018</td>\n",
" <td>1</td>\n",
" <td>saturday</td>\n",
" <td>14</td>\n",
" <td>part three</td>\n",
" <td>centre st</td>\n",
" <td>42.322838</td>\n",
" <td>-71.100967</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319068</th>\n",
" <td>I050310906-00</td>\n",
" <td>3125</td>\n",
" <td>warrant arrests</td>\n",
" <td>warrant arrest</td>\n",
" <td>D4</td>\n",
" <td>285</td>\n",
" <td>N</td>\n",
" <td>2016-06-05 17:25:00</td>\n",
" <td>2016</td>\n",
" <td>6</td>\n",
" <td>sunday</td>\n",
" <td>17</td>\n",
" <td>part three</td>\n",
" <td>coventry st</td>\n",
" <td>42.336951</td>\n",
" <td>-71.085748</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319069</th>\n",
" <td>I030217815-08</td>\n",
" <td>111</td>\n",
" <td>homicide</td>\n",
" <td>murder, non-negligient manslaughter</td>\n",
" <td>E18</td>\n",
" <td>520</td>\n",
" <td>N</td>\n",
" <td>2015-07-09 13:38:00</td>\n",
" <td>2015</td>\n",
" <td>7</td>\n",
" <td>thursday</td>\n",
" <td>13</td>\n",
" <td>part one</td>\n",
" <td>river st</td>\n",
" <td>42.255926</td>\n",
" <td>-71.123172</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319070</th>\n",
" <td>I030217815-08</td>\n",
" <td>3125</td>\n",
" <td>warrant arrests</td>\n",
" <td>warrant arrest</td>\n",
" <td>E18</td>\n",
" <td>520</td>\n",
" <td>N</td>\n",
" <td>2015-07-09 13:38:00</td>\n",
" <td>2015</td>\n",
" <td>7</td>\n",
" <td>thursday</td>\n",
" <td>13</td>\n",
" <td>part three</td>\n",
" <td>river st</td>\n",
" <td>42.255926</td>\n",
" <td>-71.123172</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319071</th>\n",
" <td>I010370257-00</td>\n",
" <td>3125</td>\n",
" <td>warrant arrests</td>\n",
" <td>warrant arrest</td>\n",
" <td>E13</td>\n",
" <td>569</td>\n",
" <td>N</td>\n",
" <td>2016-05-31 19:35:00</td>\n",
" <td>2016</td>\n",
" <td>5</td>\n",
" <td>tuesday</td>\n",
" <td>19</td>\n",
" <td>part three</td>\n",
" <td>new washington st</td>\n",
" <td>42.302333</td>\n",
" <td>-71.111565</td>\n",
" </tr>\n",
" <tr>\n",
" <th>319072</th>\n",
" <td>142052550</td>\n",
" <td>3125</td>\n",
" <td>warrant arrests</td>\n",
" <td>warrant arrest</td>\n",
" <td>D4</td>\n",
" <td>903</td>\n",
" <td>N</td>\n",
" <td>2015-06-22 00:12:00</td>\n",
" <td>2015</td>\n",
" <td>6</td>\n",
" <td>monday</td>\n",
" <td>0</td>\n",
" <td>part three</td>\n",
" <td>washington st</td>\n",
" <td>42.333839</td>\n",
" <td>-71.080290</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>296421 rows × 16 columns</p>\n",
"</div>"
],
"text/plain": [
" INCIDENT_NUMBER OFFENSE_CODE OFFENSE_CODE_GROUP \\\n",
"0 I182070945 619 larceny \n",
"1 I182070943 1402 vandalism \n",
"2 I182070941 3410 towed \n",
"3 I182070940 3114 investigate property \n",
"4 I182070938 3114 investigate property \n",
"5 I182070936 3820 motor vehicle accident response \n",
"6 I182070933 724 auto theft \n",
"7 I182070932 3301 verbal disputes \n",
"8 I182070931 301 robbery \n",
"9 I182070929 3301 verbal disputes \n",
"10 I182070928 3301 verbal disputes \n",
"11 I182070927 3114 investigate property \n",
"12 I182070923 3108 fire related reports \n",
"13 I182070922 2647 other \n",
"14 I182070921 3201 property lost \n",
"16 I182070919 3301 verbal disputes \n",
"17 I182070918 3305 assembly or gathering violations \n",
"18 I182070917 2647 other \n",
"19 I182070915 614 larceny from motor vehicle \n",
"21 I182070911 3801 motor vehicle accident response \n",
"22 I182070910 3006 medical assistance \n",
"23 I182070909 3803 motor vehicle accident response \n",
"24 I182070908 522 residential burglary \n",
"26 I182070905 3006 medical assistance \n",
"27 I182070904 802 simple assault \n",
"28 I182070904 2007 restraining order violations \n",
"29 I182070903 2900 other \n",
"30 I182070901 2907 violations \n",
"31 I182070900 2629 harassment \n",
"32 I182070898 802 simple assault \n",
"... ... ... ... \n",
"319040 I110694557-00 3125 warrant arrests \n",
"319041 I110694557-00 3115 investigate person \n",
"319043 I110551302-00 3125 warrant arrests \n",
"319044 I110551302-00 623 larceny \n",
"319045 I110372326-00 403 aggravated assault \n",
"319046 I110372326-00 3125 warrant arrests \n",
"319047 I110261417-00 3125 warrant arrests \n",
"319048 I110261417-00 619 larceny \n",
"319049 I110177502-00 3125 warrant arrests \n",
"319050 I110177502-00 802 simple assault \n",
"319051 I110177502-00 3125 warrant arrests \n",
"319052 I100636670-00 629 larceny \n",
"319053 I100636670-00 3125 warrant arrests \n",
"319054 I100340225-00 3125 warrant arrests \n",
"319055 I100340225-00 339 robbery \n",
"319056 I100222105-02 3125 warrant arrests \n",
"319057 I100033064-00 2907 violations \n",
"319058 I100033064-00 2910 violations \n",
"319061 I090317057-00 403 aggravated assault \n",
"319062 I090317057-00 3125 warrant arrests \n",
"319063 I080542626-00 3125 warrant arrests \n",
"319064 I080542626-00 1848 drug violation \n",
"319065 I080542626-00 1849 drug violation \n",
"319066 I060168073-00 1864 drug violation \n",
"319067 I060168073-00 3125 warrant arrests \n",
"319068 I050310906-00 3125 warrant arrests \n",
"319069 I030217815-08 111 homicide \n",
"319070 I030217815-08 3125 warrant arrests \n",
"319071 I010370257-00 3125 warrant arrests \n",
"319072 142052550 3125 warrant arrests \n",
"\n",
" OFFENSE_DESCRIPTION DISTRICT \\\n",
"0 larceny all others D14 \n",
"1 vandalism C11 \n",
"2 towed motor vehicle D4 \n",
"3 investigate property D4 \n",
"4 investigate property B3 \n",
"5 m/v accident involving pedestrian - injury C11 \n",
"6 auto theft B2 \n",
"7 verbal dispute B2 \n",
"8 robbery - street C6 \n",
"9 verbal dispute C11 \n",
"10 verbal dispute C6 \n",
"11 investigate property C6 \n",
"12 fire report - house, building, etc. D4 \n",
"13 threats to do bodily harm B3 \n",
"14 property - lost B3 \n",
"16 verbal dispute C11 \n",
"17 demonstrations/riot D4 \n",
"18 threats to do bodily harm B2 \n",
"19 larceny theft from mv - non-accessory B2 \n",
"21 m/v accident - other A1 \n",
"22 sick/injured/medical - person B3 \n",
"23 m/v accident - personal injury E5 \n",
"24 burglary - residential - no force B2 \n",
"26 sick/injured/medical - person D4 \n",
"27 assault simple - battery C11 \n",
"28 viol. of restraining order w no arrest C11 \n",
"29 val - violation of auto law - other B3 \n",
"30 val - operating after rev/susp. B3 \n",
"31 harassment B3 \n",
"32 assault simple - battery C11 \n",
"... ... ... \n",
"319040 warrant arrest B3 \n",
"319041 investigate person B3 \n",
"319043 warrant arrest D4 \n",
"319044 larceny shoplifting $50 to $199 D4 \n",
"319045 assault & battery d/w - other A1 \n",
"319046 warrant arrest A1 \n",
"319047 warrant arrest B2 \n",
"319048 larceny other $200 & over B2 \n",
"319049 warrant arrest B2 \n",
"319050 assault & battery B2 \n",
"319051 warrant arrest B2 \n",
"319052 larceny other $50 to $199 D4 \n",
"319053 warrant arrest D4 \n",
"319054 warrant arrest A1 \n",
"319055 robbery - unarmed - street A1 \n",
"319056 warrant arrest E13 \n",
"319057 val - operating after rev/susp. B2 \n",
"319058 val - operating after rev/susp. B2 \n",
"319061 assault & battery d/w - other B3 \n",
"319062 warrant arrest B3 \n",
"319063 warrant arrest A1 \n",
"319064 drugs - poss class b - intent to mfr dist disp A1 \n",
"319065 drugs - poss class b - cocaine, etc. A1 \n",
"319066 drugs - poss class d - intent mfr dist disp E13 \n",
"319067 warrant arrest E13 \n",
"319068 warrant arrest D4 \n",
"319069 murder, non-negligient manslaughter E18 \n",
"319070 warrant arrest E18 \n",
"319071 warrant arrest E13 \n",
"319072 warrant arrest D4 \n",
"\n",
" REPORTING_AREA SHOOTING OCCURRED_ON_DATE YEAR MONTH DAY_OF_WEEK \\\n",
"0 808 N 2018-09-02 13:00:00 2018 9 sunday \n",
"1 347 N 2018-08-21 00:00:00 2018 8 tuesday \n",
"2 151 N 2018-09-03 19:27:00 2018 9 monday \n",
"3 272 N 2018-09-03 21:16:00 2018 9 monday \n",
"4 421 N 2018-09-03 21:05:00 2018 9 monday \n",
"5 398 N 2018-09-03 21:09:00 2018 9 monday \n",
"6 330 N 2018-09-03 21:25:00 2018 9 monday \n",
"7 584 N 2018-09-03 20:39:37 2018 9 monday \n",
"8 177 N 2018-09-03 20:48:00 2018 9 monday \n",
"9 364 N 2018-09-03 20:38:00 2018 9 monday \n",
"10 913 N 2018-09-03 19:55:00 2018 9 monday \n",
"11 936 N 2018-09-03 20:19:00 2018 9 monday \n",
"12 139 N 2018-09-03 19:58:00 2018 9 monday \n",
"13 429 N 2018-09-03 20:39:00 2018 9 monday \n",
"14 469 N 2018-09-02 14:00:00 2018 9 sunday \n",
"16 341 N 2018-09-03 18:52:00 2018 9 monday \n",
"17 130 N 2018-09-03 17:00:00 2018 9 monday \n",
"18 901 N 2018-09-03 19:52:00 2018 9 monday \n",
"19 181 N 2018-09-02 18:00:00 2018 9 sunday \n",
"21 69 N 2018-09-03 18:30:00 2018 9 monday \n",
"22 434 N 2018-09-03 18:42:00 2018 9 monday \n",
"23 550 N 2018-09-03 18:33:00 2018 9 monday \n",
"24 911 N 2018-09-03 18:38:00 2018 9 monday \n",
"26 172 N 2018-09-03 18:50:00 2018 9 monday \n",
"27 242 N 2018-09-03 18:34:00 2018 9 monday \n",
"28 242 N 2018-09-03 18:34:00 2018 9 monday \n",
"29 463 N 2018-09-03 18:55:00 2018 9 monday \n",
"30 428 N 2018-09-03 18:41:00 2018 9 monday \n",
"31 464 N 2018-09-03 18:17:00 2018 9 monday \n",
"32 351 N 2018-09-03 19:11:00 2018 9 monday \n",
"... ... ... ... ... ... ... \n",
"319040 436 N 2016-01-22 09:45:00 2016 1 friday \n",
"319041 436 N 2016-01-22 09:45:00 2016 1 friday \n",
"319043 171 N 2015-07-22 22:00:00 2015 7 wednesday \n",
"319044 171 N 2015-07-22 22:00:00 2015 7 wednesday \n",
"319045 97 N 2016-06-14 09:40:00 2016 6 tuesday \n",
"319046 97 N 2016-06-14 09:40:00 2016 6 tuesday \n",
"319047 324 N 2016-07-29 00:00:00 2016 7 friday \n",
"319048 324 N 2016-07-29 00:00:00 2016 7 friday \n",
"319049 318 N 2015-10-02 21:00:00 2015 10 friday \n",
"319050 318 N 2015-10-02 21:00:00 2015 10 friday \n",
"319051 318 N 2015-10-02 21:00:00 2015 10 friday \n",
"319052 285 N 2016-06-05 17:23:00 2016 6 sunday \n",
"319053 285 N 2016-06-05 17:23:00 2016 6 sunday \n",
"319054 77 N 2015-07-27 10:47:00 2015 7 monday \n",
"319055 77 N 2015-07-27 10:47:00 2015 7 monday \n",
"319056 572 N 2015-08-03 16:22:00 2015 8 monday \n",
"319057 304 N 2016-07-29 18:20:00 2016 7 friday \n",
"319058 304 N 2016-07-29 18:20:00 2016 7 friday \n",
"319061 458 N 2015-11-20 11:15:00 2015 11 friday \n",
"319062 458 N 2015-11-20 11:15:00 2015 11 friday \n",
"319063 111 N 2015-08-12 12:00:00 2015 8 wednesday \n",
"319064 111 N 2015-08-12 12:00:00 2015 8 wednesday \n",
"319065 111 N 2015-08-12 12:00:00 2015 8 wednesday \n",
"319066 912 N 2018-01-27 14:01:00 2018 1 saturday \n",
"319067 912 N 2018-01-27 14:01:00 2018 1 saturday \n",
"319068 285 N 2016-06-05 17:25:00 2016 6 sunday \n",
"319069 520 N 2015-07-09 13:38:00 2015 7 thursday \n",
"319070 520 N 2015-07-09 13:38:00 2015 7 thursday \n",
"319071 569 N 2016-05-31 19:35:00 2016 5 tuesday \n",
"319072 903 N 2015-06-22 00:12:00 2015 6 monday \n",
"\n",
" HOUR UCR_PART STREET Lat Long \n",
"0 13 part one lincoln st 42.357791 -71.139371 \n",
"1 0 part two hecla st 42.306821 -71.060300 \n",
"2 19 part three cazenove st 42.346589 -71.072429 \n",
"3 21 part three newcomb st 42.334182 -71.078664 \n",
"4 21 part three delhi st 42.275365 -71.090361 \n",
"5 21 part three talbot ave 42.290196 -71.071590 \n",
"6 21 part one normandy st 42.306072 -71.082733 \n",
"7 20 part three lawn st 42.327016 -71.105551 \n",
"8 20 part one massachusetts ave 42.331521 -71.070853 \n",
"9 20 part three leslie st 42.295147 -71.058608 \n",
"10 19 part three ocean view dr 42.319579 -71.040328 \n",
"11 20 part three dalessio ct 42.340115 -71.053390 \n",
"12 19 part three marlborough st 42.350388 -71.087853 \n",
"13 20 part two woodrow ave 42.286470 -71.087147 \n",
"14 14 part three mulvey st 42.279241 -71.096674 \n",
"16 18 part three stonehurst st 42.305264 -71.066838 \n",
"17 17 part three huntington ave 42.348577 -71.077720 \n",
"18 19 part two horadan way 42.333717 -71.096658 \n",
"19 18 part one shirley st 42.325695 -71.068168 \n",
"21 18 part three beacon st 42.355644 -71.071681 \n",
"22 18 part three capen st 42.283402 -71.080797 \n",
"23 18 part three washington st 42.275818 -71.139913 \n",
"24 18 part one annunciation rd 42.335062 -71.093168 \n",
"26 18 part three massachusetts ave 42.333112 -71.072764 \n",
"27 18 part two annapolis st 42.317319 -71.061509 \n",
"28 18 part two annapolis st 42.317319 -71.061509 \n",
"29 18 part two blue hill ave 42.295904 -71.087733 \n",
"30 18 part two clarkwood st 42.280137 -71.090798 \n",
"31 18 part two hansborough st 42.288104 -71.091533 \n",
"32 19 part two salisbury park 42.299284 -71.059172 \n",
"... ... ... ... ... ... \n",
"319040 9 part three withington st 42.288767 -71.072897 \n",
"319041 9 part three withington st 42.288767 -71.072897 \n",
"319043 22 part three harrison ave 42.335560 -71.074364 \n",
"319044 22 part one harrison ave 42.335560 -71.074364 \n",
"319045 9 part one school st 42.357428 -71.058326 \n",
"319046 9 part three school st 42.357428 -71.058326 \n",
"319047 0 part three bowdoin st 42.307038 -71.066153 \n",
"319048 0 part one bowdoin st 42.307038 -71.066153 \n",
"319049 21 part three homestead st 42.311277 -71.089093 \n",
"319050 21 part two homestead st 42.311277 -71.089093 \n",
"319051 21 part three homestead st 42.311277 -71.089093 \n",
"319052 17 part one coventry st 42.336951 -71.085748 \n",
"319053 17 part three coventry st 42.336951 -71.085748 \n",
"319054 10 part three bowdoin sq 42.361645 -71.062299 \n",
"319055 10 part one bowdoin sq 42.361645 -71.062299 \n",
"319056 16 part three columbus ave 42.313628 -71.095603 \n",
"319057 18 part two slayton way 42.321770 -71.097798 \n",
"319058 18 part two slayton way 42.321770 -71.097798 \n",
"319061 11 part one blue hill ave 42.301897 -71.085549 \n",
"319062 11 part three blue hill ave 42.301897 -71.085549 \n",
"319063 12 part three boylston st 42.352312 -71.063705 \n",
"319064 12 part two boylston st 42.352312 -71.063705 \n",
"319065 12 part two boylston st 42.352312 -71.063705 \n",
"319066 14 part two centre st 42.322838 -71.100967 \n",
"319067 14 part three centre st 42.322838 -71.100967 \n",
"319068 17 part three coventry st 42.336951 -71.085748 \n",
"319069 13 part one river st 42.255926 -71.123172 \n",
"319070 13 part three river st 42.255926 -71.123172 \n",
"319071 19 part three new washington st 42.302333 -71.111565 \n",
"319072 0 part three washington st 42.333839 -71.080290 \n",
"\n",
"[296421 rows x 16 columns]"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Większość danych o strzelaninach jest pusta więc zakładam, że są to inceydenty bez strzelanin\n",
"crime[\"SHOOTING\"].fillna(\"N\", inplace=True)\n",
"\n",
"# Kolumna location powtarza wartości z Lat i Long\n",
"crime.drop(columns=[\"Location\"], inplace=True)\n",
"\n",
"# Usuwam błędne/brakujące wartości współrzędnych\n",
"crime = crime[(crime[\"Lat\"] > 35) & (crime[\"Long\"] < -65)]\n",
"\n",
"# Lowercase na polach tekstowych\n",
"crime[\"OFFENSE_CODE_GROUP\"] = crime[\"OFFENSE_CODE_GROUP\"].str.lower()\n",
"crime[\"OFFENSE_DESCRIPTION\"] = crime[\"OFFENSE_DESCRIPTION\"].str.lower()\n",
"crime[\"DAY_OF_WEEK\"] = crime[\"DAY_OF_WEEK\"].str.lower()\n",
"crime[\"UCR_PART\"] = crime[\"UCR_PART\"].str.lower()\n",
"crime[\"STREET\"] = crime[\"STREET\"].str.lower()\n",
"\n",
"# Usuwam pozostałe wiersze zawierające nulle\n",
"crime.dropna()"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "lucky-compression",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: scikit-learn in /usr/lib/python3/dist-packages (0.20.2)\n",
"Note: you may need to restart the kernel to use updated packages.\n"
]
}
],
"source": [
"pip install --user scikit-learn"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "further-asset",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(238329, 16)\n",
"(30000, 16)\n",
"(30000, 16)\n"
]
}
],
"source": [
"from sklearn.model_selection import train_test_split\n",
"\n",
"# Zbiór jest całkiem duży - 300k wierszy po oczyszczeniu, więc wybieram podział 8:1:1, czyli w przybliżeniu 30k na dev i test\n",
"crime_train, crime_test = train_test_split(crime, test_size=60000, random_state=1)\n",
"crime_test, crime_dev = train_test_split(crime_test, test_size=30000, random_state=1)\n",
"print(crime_train.shape)\n",
"print(crime_test.shape)\n",
"print(crime_dev.shape)"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "united-belly",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>INCIDENT_NUMBER</th>\n",
" <th>OFFENSE_CODE</th>\n",
" <th>OFFENSE_CODE_GROUP</th>\n",
" <th>OFFENSE_DESCRIPTION</th>\n",
" <th>DISTRICT</th>\n",
" <th>REPORTING_AREA</th>\n",
" <th>SHOOTING</th>\n",
" <th>OCCURRED_ON_DATE</th>\n",
" <th>YEAR</th>\n",
" <th>MONTH</th>\n",
" <th>DAY_OF_WEEK</th>\n",
" <th>HOUR</th>\n",
" <th>UCR_PART</th>\n",
" <th>STREET</th>\n",
" <th>Lat</th>\n",
" <th>Long</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>count</th>\n",
" <td>238329</td>\n",
" <td>238329.000000</td>\n",
" <td>238329</td>\n",
" <td>238329</td>\n",
" <td>237585</td>\n",
" <td>238329</td>\n",
" <td>238329</td>\n",
" <td>238329</td>\n",
" <td>238329.000000</td>\n",
" <td>238329.000000</td>\n",
" <td>238329</td>\n",
" <td>238329.000000</td>\n",
" <td>238253</td>\n",
" <td>236876</td>\n",
" <td>238329.000000</td>\n",
" <td>238329.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>unique</th>\n",
" <td>215646</td>\n",
" <td>NaN</td>\n",
" <td>66</td>\n",
" <td>233</td>\n",
" <td>12</td>\n",
" <td>878</td>\n",
" <td>2</td>\n",
" <td>183782</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>7</td>\n",
" <td>NaN</td>\n",
" <td>4</td>\n",
" <td>3760</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>top</th>\n",
" <td>I162030584</td>\n",
" <td>NaN</td>\n",
" <td>motor vehicle accident response</td>\n",
" <td>sick/injured/medical - person</td>\n",
" <td>B2</td>\n",
" <td>111</td>\n",
" <td>N</td>\n",
" <td>2016-08-01 00:00:00</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>friday</td>\n",
" <td>NaN</td>\n",
" <td>part three</td>\n",
" <td>washington st</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>freq</th>\n",
" <td>11</td>\n",
" <td>NaN</td>\n",
" <td>24783</td>\n",
" <td>14380</td>\n",
" <td>36780</td>\n",
" <td>1851</td>\n",
" <td>237575</td>\n",
" <td>22</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>36273</td>\n",
" <td>NaN</td>\n",
" <td>117492</td>\n",
" <td>11305</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>mean</th>\n",
" <td>NaN</td>\n",
" <td>2296.198717</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2016.551754</td>\n",
" <td>6.615175</td>\n",
" <td>NaN</td>\n",
" <td>13.129107</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>42.322310</td>\n",
" <td>-71.082836</td>\n",
" </tr>\n",
" <tr>\n",
" <th>std</th>\n",
" <td>NaN</td>\n",
" <td>1182.831284</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1.001031</td>\n",
" <td>3.277604</td>\n",
" <td>NaN</td>\n",
" <td>6.278188</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0.031891</td>\n",
" <td>0.029754</td>\n",
" </tr>\n",
" <tr>\n",
" <th>min</th>\n",
" <td>NaN</td>\n",
" <td>111.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2015.000000</td>\n",
" <td>1.000000</td>\n",
" <td>NaN</td>\n",
" <td>0.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>42.232413</td>\n",
" <td>-71.178674</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25%</th>\n",
" <td>NaN</td>\n",
" <td>802.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2016.000000</td>\n",
" <td>4.000000</td>\n",
" <td>NaN</td>\n",
" <td>9.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>42.297555</td>\n",
" <td>-71.097193</td>\n",
" </tr>\n",
" <tr>\n",
" <th>50%</th>\n",
" <td>NaN</td>\n",
" <td>2907.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2017.000000</td>\n",
" <td>7.000000</td>\n",
" <td>NaN</td>\n",
" <td>14.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>42.325629</td>\n",
" <td>-71.077551</td>\n",
" </tr>\n",
" <tr>\n",
" <th>75%</th>\n",
" <td>NaN</td>\n",
" <td>3201.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2017.000000</td>\n",
" <td>9.000000</td>\n",
" <td>NaN</td>\n",
" <td>18.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>42.348624</td>\n",
" <td>-71.062563</td>\n",
" </tr>\n",
" <tr>\n",
" <th>max</th>\n",
" <td>NaN</td>\n",
" <td>3831.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2018.000000</td>\n",
" <td>12.000000</td>\n",
" <td>NaN</td>\n",
" <td>23.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>42.395042</td>\n",
" <td>-70.963676</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" INCIDENT_NUMBER OFFENSE_CODE OFFENSE_CODE_GROUP \\\n",
"count 238329 238329.000000 238329 \n",
"unique 215646 NaN 66 \n",
"top I162030584 NaN motor vehicle accident response \n",
"freq 11 NaN 24783 \n",
"mean NaN 2296.198717 NaN \n",
"std NaN 1182.831284 NaN \n",
"min NaN 111.000000 NaN \n",
"25% NaN 802.000000 NaN \n",
"50% NaN 2907.000000 NaN \n",
"75% NaN 3201.000000 NaN \n",
"max NaN 3831.000000 NaN \n",
"\n",
" OFFENSE_DESCRIPTION DISTRICT REPORTING_AREA SHOOTING \\\n",
"count 238329 237585 238329 238329 \n",
"unique 233 12 878 2 \n",
"top sick/injured/medical - person B2 111 N \n",
"freq 14380 36780 1851 237575 \n",
"mean NaN NaN NaN NaN \n",
"std NaN NaN NaN NaN \n",
"min NaN NaN NaN NaN \n",
"25% NaN NaN NaN NaN \n",
"50% NaN NaN NaN NaN \n",
"75% NaN NaN NaN NaN \n",
"max NaN NaN NaN NaN \n",
"\n",
" OCCURRED_ON_DATE YEAR MONTH DAY_OF_WEEK \\\n",
"count 238329 238329.000000 238329.000000 238329 \n",
"unique 183782 NaN NaN 7 \n",
"top 2016-08-01 00:00:00 NaN NaN friday \n",
"freq 22 NaN NaN 36273 \n",
"mean NaN 2016.551754 6.615175 NaN \n",
"std NaN 1.001031 3.277604 NaN \n",
"min NaN 2015.000000 1.000000 NaN \n",
"25% NaN 2016.000000 4.000000 NaN \n",
"50% NaN 2017.000000 7.000000 NaN \n",
"75% NaN 2017.000000 9.000000 NaN \n",
"max NaN 2018.000000 12.000000 NaN \n",
"\n",
" HOUR UCR_PART STREET Lat Long \n",
"count 238329.000000 238253 236876 238329.000000 238329.000000 \n",
"unique NaN 4 3760 NaN NaN \n",
"top NaN part three washington st NaN NaN \n",
"freq NaN 117492 11305 NaN NaN \n",
"mean 13.129107 NaN NaN 42.322310 -71.082836 \n",
"std 6.278188 NaN NaN 0.031891 0.029754 \n",
"min 0.000000 NaN NaN 42.232413 -71.178674 \n",
"25% 9.000000 NaN NaN 42.297555 -71.097193 \n",
"50% 14.000000 NaN NaN 42.325629 -71.077551 \n",
"75% 18.000000 NaN NaN 42.348624 -71.062563 \n",
"max 23.000000 NaN NaN 42.395042 -70.963676 "
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"crime_train.describe(include=\"all\")"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "instrumental-procurement",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>INCIDENT_NUMBER</th>\n",
" <th>OFFENSE_CODE</th>\n",
" <th>OFFENSE_CODE_GROUP</th>\n",
" <th>OFFENSE_DESCRIPTION</th>\n",
" <th>DISTRICT</th>\n",
" <th>REPORTING_AREA</th>\n",
" <th>SHOOTING</th>\n",
" <th>OCCURRED_ON_DATE</th>\n",
" <th>YEAR</th>\n",
" <th>MONTH</th>\n",
" <th>DAY_OF_WEEK</th>\n",
" <th>HOUR</th>\n",
" <th>UCR_PART</th>\n",
" <th>STREET</th>\n",
" <th>Lat</th>\n",
" <th>Long</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>count</th>\n",
" <td>30000</td>\n",
" <td>30000.000000</td>\n",
" <td>30000</td>\n",
" <td>30000</td>\n",
" <td>29925</td>\n",
" <td>30000</td>\n",
" <td>30000</td>\n",
" <td>30000</td>\n",
" <td>30000.000000</td>\n",
" <td>30000.000000</td>\n",
" <td>30000</td>\n",
" <td>30000.000000</td>\n",
" <td>29995</td>\n",
" <td>29836</td>\n",
" <td>30000.000000</td>\n",
" <td>30000.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>unique</th>\n",
" <td>29560</td>\n",
" <td>NaN</td>\n",
" <td>62</td>\n",
" <td>183</td>\n",
" <td>12</td>\n",
" <td>869</td>\n",
" <td>2</td>\n",
" <td>28717</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>7</td>\n",
" <td>NaN</td>\n",
" <td>4</td>\n",
" <td>2646</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>top</th>\n",
" <td>I162050329</td>\n",
" <td>NaN</td>\n",
" <td>motor vehicle accident response</td>\n",
" <td>sick/injured/medical - person</td>\n",
" <td>B2</td>\n",
" <td>111</td>\n",
" <td>N</td>\n",
" <td>2015-12-16 20:00:00</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>friday</td>\n",
" <td>NaN</td>\n",
" <td>part three</td>\n",
" <td>washington st</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>freq</th>\n",
" <td>4</td>\n",
" <td>NaN</td>\n",
" <td>3087</td>\n",
" <td>1800</td>\n",
" <td>4659</td>\n",
" <td>229</td>\n",
" <td>29889</td>\n",
" <td>6</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>4667</td>\n",
" <td>NaN</td>\n",
" <td>14698</td>\n",
" <td>1374</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>mean</th>\n",
" <td>NaN</td>\n",
" <td>2289.794500</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2016.560633</td>\n",
" <td>6.584300</td>\n",
" <td>NaN</td>\n",
" <td>13.063833</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>42.322205</td>\n",
" <td>-71.082903</td>\n",
" </tr>\n",
" <tr>\n",
" <th>std</th>\n",
" <td>NaN</td>\n",
" <td>1182.877414</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0.996171</td>\n",
" <td>3.295642</td>\n",
" <td>NaN</td>\n",
" <td>6.281078</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0.031885</td>\n",
" <td>0.029818</td>\n",
" </tr>\n",
" <tr>\n",
" <th>min</th>\n",
" <td>NaN</td>\n",
" <td>111.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2015.000000</td>\n",
" <td>1.000000</td>\n",
" <td>NaN</td>\n",
" <td>0.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>42.233157</td>\n",
" <td>-71.176805</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25%</th>\n",
" <td>NaN</td>\n",
" <td>802.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2016.000000</td>\n",
" <td>4.000000</td>\n",
" <td>NaN</td>\n",
" <td>9.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>42.297344</td>\n",
" <td>-71.097374</td>\n",
" </tr>\n",
" <tr>\n",
" <th>50%</th>\n",
" <td>NaN</td>\n",
" <td>2906.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2017.000000</td>\n",
" <td>7.000000</td>\n",
" <td>NaN</td>\n",
" <td>14.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>42.325474</td>\n",
" <td>-71.077720</td>\n",
" </tr>\n",
" <tr>\n",
" <th>75%</th>\n",
" <td>NaN</td>\n",
" <td>3201.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2017.000000</td>\n",
" <td>9.000000</td>\n",
" <td>NaN</td>\n",
" <td>18.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>42.348610</td>\n",
" <td>-71.062570</td>\n",
" </tr>\n",
" <tr>\n",
" <th>max</th>\n",
" <td>NaN</td>\n",
" <td>3831.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2018.000000</td>\n",
" <td>12.000000</td>\n",
" <td>NaN</td>\n",
" <td>23.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>42.395042</td>\n",
" <td>-70.996769</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" INCIDENT_NUMBER OFFENSE_CODE OFFENSE_CODE_GROUP \\\n",
"count 30000 30000.000000 30000 \n",
"unique 29560 NaN 62 \n",
"top I162050329 NaN motor vehicle accident response \n",
"freq 4 NaN 3087 \n",
"mean NaN 2289.794500 NaN \n",
"std NaN 1182.877414 NaN \n",
"min NaN 111.000000 NaN \n",
"25% NaN 802.000000 NaN \n",
"50% NaN 2906.000000 NaN \n",
"75% NaN 3201.000000 NaN \n",
"max NaN 3831.000000 NaN \n",
"\n",
" OFFENSE_DESCRIPTION DISTRICT REPORTING_AREA SHOOTING \\\n",
"count 30000 29925 30000 30000 \n",
"unique 183 12 869 2 \n",
"top sick/injured/medical - person B2 111 N \n",
"freq 1800 4659 229 29889 \n",
"mean NaN NaN NaN NaN \n",
"std NaN NaN NaN NaN \n",
"min NaN NaN NaN NaN \n",
"25% NaN NaN NaN NaN \n",
"50% NaN NaN NaN NaN \n",
"75% NaN NaN NaN NaN \n",
"max NaN NaN NaN NaN \n",
"\n",
" OCCURRED_ON_DATE YEAR MONTH DAY_OF_WEEK \\\n",
"count 30000 30000.000000 30000.000000 30000 \n",
"unique 28717 NaN NaN 7 \n",
"top 2015-12-16 20:00:00 NaN NaN friday \n",
"freq 6 NaN NaN 4667 \n",
"mean NaN 2016.560633 6.584300 NaN \n",
"std NaN 0.996171 3.295642 NaN \n",
"min NaN 2015.000000 1.000000 NaN \n",
"25% NaN 2016.000000 4.000000 NaN \n",
"50% NaN 2017.000000 7.000000 NaN \n",
"75% NaN 2017.000000 9.000000 NaN \n",
"max NaN 2018.000000 12.000000 NaN \n",
"\n",
" HOUR UCR_PART STREET Lat Long \n",
"count 30000.000000 29995 29836 30000.000000 30000.000000 \n",
"unique NaN 4 2646 NaN NaN \n",
"top NaN part three washington st NaN NaN \n",
"freq NaN 14698 1374 NaN NaN \n",
"mean 13.063833 NaN NaN 42.322205 -71.082903 \n",
"std 6.281078 NaN NaN 0.031885 0.029818 \n",
"min 0.000000 NaN NaN 42.233157 -71.176805 \n",
"25% 9.000000 NaN NaN 42.297344 -71.097374 \n",
"50% 14.000000 NaN NaN 42.325474 -71.077720 \n",
"75% 18.000000 NaN NaN 42.348610 -71.062570 \n",
"max 23.000000 NaN NaN 42.395042 -70.996769 "
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"crime_test.describe(include=\"all\")"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "piano-gambling",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>INCIDENT_NUMBER</th>\n",
" <th>OFFENSE_CODE</th>\n",
" <th>OFFENSE_CODE_GROUP</th>\n",
" <th>OFFENSE_DESCRIPTION</th>\n",
" <th>DISTRICT</th>\n",
" <th>REPORTING_AREA</th>\n",
" <th>SHOOTING</th>\n",
" <th>OCCURRED_ON_DATE</th>\n",
" <th>YEAR</th>\n",
" <th>MONTH</th>\n",
" <th>DAY_OF_WEEK</th>\n",
" <th>HOUR</th>\n",
" <th>UCR_PART</th>\n",
" <th>STREET</th>\n",
" <th>Lat</th>\n",
" <th>Long</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>count</th>\n",
" <td>30000</td>\n",
" <td>30000.000000</td>\n",
" <td>30000</td>\n",
" <td>30000</td>\n",
" <td>29922</td>\n",
" <td>30000</td>\n",
" <td>30000</td>\n",
" <td>30000</td>\n",
" <td>30000.000000</td>\n",
" <td>30000.000000</td>\n",
" <td>30000</td>\n",
" <td>30000.000000</td>\n",
" <td>29991</td>\n",
" <td>29836</td>\n",
" <td>30000.000000</td>\n",
" <td>30000.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>unique</th>\n",
" <td>29561</td>\n",
" <td>NaN</td>\n",
" <td>61</td>\n",
" <td>189</td>\n",
" <td>12</td>\n",
" <td>868</td>\n",
" <td>2</td>\n",
" <td>28778</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>7</td>\n",
" <td>NaN</td>\n",
" <td>4</td>\n",
" <td>2689</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>top</th>\n",
" <td>I162010747</td>\n",
" <td>NaN</td>\n",
" <td>motor vehicle accident response</td>\n",
" <td>investigate person</td>\n",
" <td>B2</td>\n",
" <td>111</td>\n",
" <td>N</td>\n",
" <td>2017-06-01 00:00:00</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>thursday</td>\n",
" <td>NaN</td>\n",
" <td>part three</td>\n",
" <td>washington st</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>freq</th>\n",
" <td>4</td>\n",
" <td>NaN</td>\n",
" <td>3145</td>\n",
" <td>1908</td>\n",
" <td>4762</td>\n",
" <td>258</td>\n",
" <td>29882</td>\n",
" <td>6</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>4425</td>\n",
" <td>NaN</td>\n",
" <td>14910</td>\n",
" <td>1434</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>mean</th>\n",
" <td>NaN</td>\n",
" <td>2303.541933</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2016.560700</td>\n",
" <td>6.626700</td>\n",
" <td>NaN</td>\n",
" <td>13.157033</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>42.322292</td>\n",
" <td>-71.082911</td>\n",
" </tr>\n",
" <tr>\n",
" <th>std</th>\n",
" <td>NaN</td>\n",
" <td>1185.561127</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0.998874</td>\n",
" <td>3.264563</td>\n",
" <td>NaN</td>\n",
" <td>6.282363</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0.031804</td>\n",
" <td>0.029857</td>\n",
" </tr>\n",
" <tr>\n",
" <th>min</th>\n",
" <td>NaN</td>\n",
" <td>111.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2015.000000</td>\n",
" <td>1.000000</td>\n",
" <td>NaN</td>\n",
" <td>0.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>42.232656</td>\n",
" <td>-71.178674</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25%</th>\n",
" <td>NaN</td>\n",
" <td>802.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2016.000000</td>\n",
" <td>4.000000</td>\n",
" <td>NaN</td>\n",
" <td>9.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>42.297555</td>\n",
" <td>-71.097193</td>\n",
" </tr>\n",
" <tr>\n",
" <th>50%</th>\n",
" <td>NaN</td>\n",
" <td>2907.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2017.000000</td>\n",
" <td>7.000000</td>\n",
" <td>NaN</td>\n",
" <td>14.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>42.325834</td>\n",
" <td>-71.077564</td>\n",
" </tr>\n",
" <tr>\n",
" <th>75%</th>\n",
" <td>NaN</td>\n",
" <td>3201.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2017.000000</td>\n",
" <td>9.000000</td>\n",
" <td>NaN</td>\n",
" <td>18.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>42.348610</td>\n",
" <td>-71.062607</td>\n",
" </tr>\n",
" <tr>\n",
" <th>max</th>\n",
" <td>NaN</td>\n",
" <td>3831.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2018.000000</td>\n",
" <td>12.000000</td>\n",
" <td>NaN</td>\n",
" <td>23.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>42.395042</td>\n",
" <td>-70.996769</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" INCIDENT_NUMBER OFFENSE_CODE OFFENSE_CODE_GROUP \\\n",
"count 30000 30000.000000 30000 \n",
"unique 29561 NaN 61 \n",
"top I162010747 NaN motor vehicle accident response \n",
"freq 4 NaN 3145 \n",
"mean NaN 2303.541933 NaN \n",
"std NaN 1185.561127 NaN \n",
"min NaN 111.000000 NaN \n",
"25% NaN 802.000000 NaN \n",
"50% NaN 2907.000000 NaN \n",
"75% NaN 3201.000000 NaN \n",
"max NaN 3831.000000 NaN \n",
"\n",
" OFFENSE_DESCRIPTION DISTRICT REPORTING_AREA SHOOTING \\\n",
"count 30000 29922 30000 30000 \n",
"unique 189 12 868 2 \n",
"top investigate person B2 111 N \n",
"freq 1908 4762 258 29882 \n",
"mean NaN NaN NaN NaN \n",
"std NaN NaN NaN NaN \n",
"min NaN NaN NaN NaN \n",
"25% NaN NaN NaN NaN \n",
"50% NaN NaN NaN NaN \n",
"75% NaN NaN NaN NaN \n",
"max NaN NaN NaN NaN \n",
"\n",
" OCCURRED_ON_DATE YEAR MONTH DAY_OF_WEEK \\\n",
"count 30000 30000.000000 30000.000000 30000 \n",
"unique 28778 NaN NaN 7 \n",
"top 2017-06-01 00:00:00 NaN NaN thursday \n",
"freq 6 NaN NaN 4425 \n",
"mean NaN 2016.560700 6.626700 NaN \n",
"std NaN 0.998874 3.264563 NaN \n",
"min NaN 2015.000000 1.000000 NaN \n",
"25% NaN 2016.000000 4.000000 NaN \n",
"50% NaN 2017.000000 7.000000 NaN \n",
"75% NaN 2017.000000 9.000000 NaN \n",
"max NaN 2018.000000 12.000000 NaN \n",
"\n",
" HOUR UCR_PART STREET Lat Long \n",
"count 30000.000000 29991 29836 30000.000000 30000.000000 \n",
"unique NaN 4 2689 NaN NaN \n",
"top NaN part three washington st NaN NaN \n",
"freq NaN 14910 1434 NaN NaN \n",
"mean 13.157033 NaN NaN 42.322292 -71.082911 \n",
"std 6.282363 NaN NaN 0.031804 0.029857 \n",
"min 0.000000 NaN NaN 42.232656 -71.178674 \n",
"25% 9.000000 NaN NaN 42.297555 -71.097193 \n",
"50% 14.000000 NaN NaN 42.325834 -71.077564 \n",
"75% 18.000000 NaN NaN 42.348610 -71.062607 \n",
"max 23.000000 NaN NaN 42.395042 -70.996769 "
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"crime_dev.describe(include=\"all\")"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "historical-rebecca",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"3006 14380\n",
"3115 14336\n",
"1402 11677\n",
"3831 11635\n",
"802 11229\n",
"3301 10373\n",
"3410 8577\n",
"3114 8462\n",
"617 7114\n",
"2647 7010\n",
"3201 6734\n",
"614 6614\n",
"613 6250\n",
"3125 6060\n",
"619 4490\n",
"3802 4308\n",
"413 3625\n",
"3502 3470\n",
"1102 3461\n",
"2629 3159\n",
"3803 3123\n",
"3501 2975\n",
"3207 2763\n",
"724 2676\n",
"1106 2466\n",
"2610 2461\n",
"301 2182\n",
"423 2162\n",
"520 2039\n",
"2900 1973\n",
" ... \n",
"1302 2\n",
"2910 2\n",
"1002 2\n",
"803 2\n",
"2672 2\n",
"629 2\n",
"1866 2\n",
"633 2\n",
"123 2\n",
"770 2\n",
"1807 2\n",
"627 1\n",
"349 1\n",
"624 1\n",
"112 1\n",
"402 1\n",
"527 1\n",
"637 1\n",
"530 1\n",
"1620 1\n",
"2609 1\n",
"404 1\n",
"1105 1\n",
"547 1\n",
"335 1\n",
"315 1\n",
"714 1\n",
"1864 1\n",
"1863 1\n",
"639 1\n",
"Name: OFFENSE_CODE, Length: 215, dtype: int64"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"crime_train[\"OFFENSE_CODE\"].value_counts()"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "advance-profile",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"B2 36780\n",
"C11 32723\n",
"D4 30659\n",
"B3 26864\n",
"A1 25879\n",
"C6 17285\n",
"D14 15259\n",
"E18 13366\n",
"E13 13297\n",
"A7 10412\n",
"E5 10149\n",
"A15 4912\n",
"Name: DISTRICT, dtype: int64"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"crime_train[\"DISTRICT\"].value_counts()"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "three-horizontal",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"2017 74671\n",
"2016 73720\n",
"2018 48922\n",
"2015 41016\n",
"Name: YEAR, dtype: int64"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"crime_train[\"YEAR\"].value_counts()"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "certain-opera",
"metadata": {},
"outputs": [],
"source": [
"crime_test.to_csv(\"crime_test.csv\", encoding=\"utf-8\", index=False)\n",
"crime_dev.to_csv(\"crime_dev.csv\", encoding=\"utf-8\", index=False)\n",
"crime_train.to_csv(\"crime_train.csv\", encoding=\"utf-8\", index=False)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 5
}