This project analyzes road traffic accident data from Great Britain for the year 2020. The objective is to identify patterns and propose strategies to enhance road safety. The analysis includes data exploration, cleaning, visualization, statistical analysis, and predictive modeling.
Understanding the patterns and causes of road traffic accidents is critical for improving road safety. This project aims to leverage data analysis and machine learning techniques to uncover insights that can inform better safety measures and policies.
The data includes records from four tables: accidents, vehicles, casualties, and LSOA for the year 2020. The dataset was sourced from the UK government’s open data portal.
- Python Version: 3.8
- Packages: pandas, matplotlib, seaborn, scikit-learn
- Requirements:
pip install -r requirements.txt
import pandas as pd
# Load the accident data
accidents = pd.read_csv('data/accident_data.csv')
from src.data_preprocessing import clean_data
# Clean the accident data
cleaned_accidents = clean_data(accidents)
plot_accidents(cleaned_accidents)
Statistical Analysis
from src.statistical_analysis import analyze_data
analysis_results = analyze_data(cleaned_accidents)
Predictive Modeling
from src.predictive_modeling import build_model
model, evaluation = build_model(cleaned_accidents)