Today a lot of Accidents have been spotted due to many reasons. Most of these are weather conditions like Humidity, Temperature, Wind, Visibility, Precipitation, and so on. These reasons have made the Accidents very common these days. Using the existing dataset on the website Kaggle, we aim to :-
- Observe the causes favouring these accidents
- Exploratory Data Analysis of Data i.e. Visualisation of Data
- Predict the SEVERITY of these accidents using the Best Machine Learning Model
- opendatasets
- numpy
- pandas
- matplotlib
- seaborn
- calendar
- collections
- scikit-learn
- warnings
- xgboost
Dataset Link : https://www.kaggle.com/datasets/sobhanmoosavi/us-accidents/US_Accidents_March23.csv
This "US_Accidents_March23.csv" Dataset contains the 7728394 records and 46 attributes Moreover, the details of the attributes are given below :
- ID : Specifies the Accident Identity Number
- Source : Source from which the accident is reported (Source : 1/2/3)
- Severity : Values ranging from 1 (Least Impact) to 4 (Highest Impact)
- Start_Time : Start time of accident (yyyy/mm/dd hr:min:ss Format)
- End_Time : End time of accident (yyyy/mm/dd hr:min:ss Format)
- Start_Lat : Lattitude in GPS of Start Position
- Start_Lng : Longitude in GPS of Start Position
- End_Lat : Lattitude in GPS of End Position
- End_Lng : Longitude in GPS of End Position
- Distance(mi) : Length of road extent affected in miles
- Description : Extra details of the accident
- Street : Street where accident took place
- City : City where accident took place
- County : County where accident took place
- State : State where accident took place
- Zipcode : Zipcode where accident took place
- Country : Country in US where accident took place
- Timezone : Timezone based on Accident Location
- Airport_Code : Unique Identity Code of Airport nearest to Accident Location
- Weather_Timestamp : Timestamp of Weather Observation
- Temperature(F) : Temperature in Fahrenheit
- Wind_Chill(F) : Wind Chill in Fahrenheit
- Humidity(%) : Humidity
- Pressure(in) : Air Pressure in inches
- Visibility(mi) : Visibility in miles
- Wind_Direction : Wind direction
- Wind_Speed(mph) : Wind Speed in miles per hour
- Precipitation(in) : Precipitation amount in inches
- Weather_Condition : Weather Condition (e.g. Storm, Rain, Fog, etc.)
- Amenity : Indicates presence of Amenity nearby
- Bump : Indicates presence of Speed Bump or Hump nearby
- Crossing : Indicates presence of Crossing nearby
- Give_Way : Indicates presence of Give-Way nearby
- Junction : Indicates presence of Junction nearby
- No_Exit : Indicates presence of No-Exit nearby
- Railway : Indicates presence of Railway nearby
- Roundabout : Indicates presence of Roundabout nearby
- Station : Indicates presence of Station nearby
- Stop : Indicates presence of Stop nearby
- Traffic_Calming : Indicates presence of Traffic-Calming nearby
- Traffic_Signal : Indicates presence of Traffic-Signal nearby
- Turning_Loop : Indicates presence of Turning-Loop nearby
- Sunrise_Sunset : Indicates period of day (day/night) based on Sunrise or Sunset when accident took place
- Civil_Twilight : Indicates period of day (day/night) based on Civil Twilight when accident took place
- Nautical_Twilight : Indicates period of day (day/night) based on Nautical Twilight when accident took place
- Astronomical_Twilight : Indicates period of day (day/night) based on Astronomical Twilight when accident took place
- Decision Tree Classifier
- XG Boost Classifier (XGB)
- K Neighbors Classifier (KNN)
- Random Forest Classifier
- Support Vector Classifier (SVC)
- Gaussian Naive Bayes
- Logistic Regression