This project analyzes traffic crash data using SQL and Python.
The system uses SQLite as the database and Streamlit to build an interactive dashboard for traffic crash analysis.
The project helps identify:
- Crash trends
- Injury patterns
- High-risk streets
- Weather impact on crashes
- Dangerous time slots
- Hotspot zones
Interactive visualizations and advanced SQL queries are used to generate meaningful business insights.
- Traffic crash trend analysis
- Injury analysis dashboard
- Weather impact analysis
- High-risk street identification
- Crash hotspot zone analysis
- Interactive Streamlit dashboard
- CTEs
- Window Functions
- Aggregations
- Ranking Functions
- Year
- Month
- Weather condition
- Street name
| Technology | Purpose |
|---|---|
| Python | Data Analysis |
| SQL | Data Querying |
| SQLite | Database |
| Streamlit | Dashboard Development |
| Pandas | Data Manipulation |
| Matplotlib | Visualization |
Project Structure: TRAFFIC_CRASH_PROJECT/ │ ├── app.py ├── README.md ├── traffic_crash.ipynb ├── traffic_crash.sqlite ├── Traffic_CrashesData.csv ├── traffic_crash.jpg │ ├── reports/ │ └── Traffic_Crash_Project_Report.pdf │ └── screenshots/ ├── Home Page 1.png ├── Home Page 2.png ├── Query Page.png ├── Visualisation 1.png └── Visualisation 2.png
The original CSV dataset and SQLite database files have been excluded from the GitHub repository due to large file size limitations.
git clone https://github.com/your-username/TRAFFIC_CRASH PROJECT.gitcd TRAFFIC_CRASH PROJECTstreamlit run app.pyAfter running the command, Streamlit will automatically open in your browser.
- Identified dangerous weather and crash type combinations
- Found high-risk streets with maximum injuries
- Analyzed peak crash hours
- Detected dangerous time buckets
- Compared daylight vs darkness injury severity
- Identified hotspot crash zones using latitude and longitude
- Machine Learning crash prediction
- Real-time traffic monitoring
- GIS map integration
- Cloud deployment
- Advanced forecasting models
- Python
- SQL
- Streamlit
- Data Analysis
- Pandas




