For this project, I will be observing the reasons for crashes in New York State. Through the datasets seen below, I will be answering question such as: What are the most common reason for crashes? How do certain attributes (type of vehicle, what combination of vehicle, amount of people in the car, and/or which borough) affects the rate of crashes? This data's purpose is to help educate younger, novice drivers and experienced drivers to be more alert in someparts of their driving to create a safer environment.
There is one dataset for this project. The data is quite recent (2021), showcasing both vehicles in the crash, the borough, and the reason for the accident which are the most important information. There are many undected reasons for car crashes, and finding patterns, such as one borough having a high accident rate, could stem from needing to change
Through the various characteristics car accidents in New York, we can evaluate trends of causes in vehicle accidents. This will ultimately lead to a better education for drivers, as there are many reasons and variables affecting the accidents.
import pandas as pd
df = pd.read_csv("Motor_Vehicle_Collisions.csv")
dataframe = pd.DataFrame(df)
/var/folders/xf/q51vqvcd7tldds39hdqsmqsw0000gn/T/ipykernel_29637/2179601569.py:3: DtypeWarning: Columns (3) have mixed types. Specify dtype option on import or set low_memory=False. df = pd.read_csv("Motor_Vehicle_Collisions.csv")
dataframe
CRASH DATE | CRASH TIME | BOROUGH | ZIP CODE | LATITUDE | LONGITUDE | LOCATION | ON STREET NAME | CROSS STREET NAME | OFF STREET NAME | ... | CONTRIBUTING FACTOR VEHICLE 2 | CONTRIBUTING FACTOR VEHICLE 3 | CONTRIBUTING FACTOR VEHICLE 4 | CONTRIBUTING FACTOR VEHICLE 5 | COLLISION_ID | VEHICLE TYPE CODE 1 | VEHICLE TYPE CODE 2 | VEHICLE TYPE CODE 3 | VEHICLE TYPE CODE 4 | VEHICLE TYPE CODE 5 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 09/11/2021 | 2:39 | NaN | NaN | NaN | NaN | NaN | WHITESTONE EXPRESSWAY | 20 AVENUE | NaN | ... | Unspecified | NaN | NaN | NaN | 4455765 | Sedan | Sedan | NaN | NaN | NaN |
1 | 03/26/2022 | 11:45 | NaN | NaN | NaN | NaN | NaN | QUEENSBORO BRIDGE UPPER | NaN | NaN | ... | NaN | NaN | NaN | NaN | 4513547 | Sedan | NaN | NaN | NaN | NaN |
2 | 06/29/2022 | 6:55 | NaN | NaN | NaN | NaN | NaN | THROGS NECK BRIDGE | NaN | NaN | ... | Unspecified | NaN | NaN | NaN | 4541903 | Sedan | Pick-up Truck | NaN | NaN | NaN |
3 | 09/11/2021 | 9:35 | BROOKLYN | 11208.0 | 40.667202 | -73.866500 | (40.667202, -73.8665) | NaN | NaN | 1211 LORING AVENUE | ... | NaN | NaN | NaN | NaN | 4456314 | Sedan | NaN | NaN | NaN | NaN |
4 | 12/14/2021 | 8:13 | BROOKLYN | 11233.0 | 40.683304 | -73.917274 | (40.683304, -73.917274) | SARATOGA AVENUE | DECATUR STREET | NaN | ... | NaN | NaN | NaN | NaN | 4486609 | NaN | NaN | NaN | NaN | NaN |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
1971216 | 02/09/2023 | 20:00 | BROOKLYN | 11237.0 | 40.707684 | -73.928860 | (40.707684, -73.92886) | NaN | NaN | 89 PORTER AVENUE | ... | Unspecified | NaN | NaN | NaN | 4607751 | Motorcycle | NaN | NaN | NaN | NaN |
1971217 | 02/21/2023 | 12:08 | BRONX | 10457.0 | 40.844177 | -73.902920 | (40.844177, -73.90292) | WEBSTER AVENUE | EAST 174 STREET | NaN | ... | Unsafe Speed | NaN | NaN | NaN | 4607512 | Sedan | Bike | NaN | NaN | NaN |
1971218 | 01/27/2023 | 20:13 | QUEENS | 11373.0 | 40.734135 | -73.869180 | (40.734135, -73.86918) | 92 STREET | 59 AVENUE | NaN | ... | NaN | NaN | NaN | NaN | 4607965 | NaN | NaN | NaN | NaN | NaN |
1971219 | 02/16/2023 | 8:30 | QUEENS | 11101.0 | 40.755928 | -73.919280 | (40.755928, -73.91928) | 34 AVENUE | 42 STREET | NaN | ... | Unspecified | NaN | NaN | NaN | 4607996 | Sedan | NaN | NaN | NaN | NaN |
1971220 | 02/21/2023 | 12:25 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 59-11 Arnold Avenue | ... | Unspecified | NaN | NaN | NaN | 4607592 | Dump | Sedan | NaN | NaN | NaN |
1971221 rows × 29 columns