ziadmostafa/Road-Accidents-Severity-Analysis
0
Road Accidents Severity Analysis
๐ Project Description
This project analyzes road traffic accident (RTA) data to identify patterns and factors that contribute to accident severity. Using machine learning models, we predict the severity of accidents based on various factors such as driver characteristics, vehicle conditions, road features, and environmental conditions.
The insights from this analysis can help:
- Identify high-risk scenarios for road accidents
- Recommend preventive measures to reduce accident severity
- Support traffic management and road safety policies
- Raise awareness about factors contributing to severe accidents
๐ Dataset
The dataset contains over 12,000 records of road traffic accidents with 32+ features including:
- Driver information (age, gender, experience, education)
- Vehicle details (type, service years, defects)
- Road conditions and features
- Environmental factors (weather, light conditions)
- Accident details (collision type, vehicles involved, casualties)
- Accident severity (target variable)
๐ Features
- Comprehensive Data Analysis: Explore patterns and relationships in road accident data
- Interactive Visualizations: 8+ interactive charts to understand accident factors
- Predictive Modeling: Machine learning models to predict accident severity
- User-friendly Interface: Input accident details to get severity predictions
- Feature Importance Analysis: Understand which factors most influence accident severity
๐ ๏ธ Installation & Setup
- Clone the repository:
- Install dependencies:
pip install -r requirements.txt- Run the Jupyter notebook to train models:
jupyter notebook Road_Accidents_Severity_Analysis.ipynb- Launch the Streamlit app:
streamlit run app.py๐ง Technologies Used
- Data Processing: Pandas, NumPy
- Visualization: Plotly, Cufflinks
- Machine Learning: Scikit-learn
- Web Application: Streamlit
- Other Tools: Jupyter Notebook, Python
๐ Project Structure
road-accidents-severity/
โโโ Road_Accidents_Severity_Analysis.ipynb # Analysis & model training
โโโ app.py # Streamlit application
โโโ RTA Dataset.csv # Dataset
โโโ requirements.txt # Dependencies
โโโ README.md # Project documentation
โโโ best_accident_severity_model.pkl # Trained model
โโโ label_encoders.pkl # Saved encoders
โโโ scaler.pkl # Saved scaler๐ฎ Future Improvements
- Incorporate geographic data for spatial analysis
- Implement more advanced models (e.g., XGBoost, neural networks)
- Add time series analysis to identify temporal patterns
- Develop a mobile app for on-the-go predictions
- Include more interactive features in the dashboard
