{"id":31133057,"url":"https://github.com/sankaran-s2001/us-traffic-accidents-analysis-python-eda","last_synced_at":"2026-05-06T04:32:57.341Z","repository":{"id":313508618,"uuid":"1051672525","full_name":"sankaran-s2001/US-Traffic-Accidents-Analysis-Python-EDA","owner":"sankaran-s2001","description":"Exploratory data analysis of US traffic accidents from 2016-2023, analyzing patterns by time, location, weather, and severity using Python data science libraries.","archived":false,"fork":false,"pushed_at":"2025-09-06T13:57:17.000Z","size":612,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-06T15:27:03.746Z","etag":null,"topics":["data-analysis","data-science","data-visualization","eda","matplolib","numpy","pandas","python"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sankaran-s2001.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-06T13:43:10.000Z","updated_at":"2025-09-06T13:57:20.000Z","dependencies_parsed_at":"2025-09-06T15:27:08.303Z","dependency_job_id":"b317a5af-ef27-4b25-9de5-9497e7a066d5","html_url":"https://github.com/sankaran-s2001/US-Traffic-Accidents-Analysis-Python-EDA","commit_stats":null,"previous_names":["sankaran-s2001/us-traffic-accidents-analysis-python-eda"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/sankaran-s2001/US-Traffic-Accidents-Analysis-Python-EDA","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sankaran-s2001%2FUS-Traffic-Accidents-Analysis-Python-EDA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sankaran-s2001%2FUS-Traffic-Accidents-Analysis-Python-EDA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sankaran-s2001%2FUS-Traffic-Accidents-Analysis-Python-EDA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sankaran-s2001%2FUS-Traffic-Accidents-Analysis-Python-EDA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sankaran-s2001","download_url":"https://codeload.github.com/sankaran-s2001/US-Traffic-Accidents-Analysis-Python-EDA/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sankaran-s2001%2FUS-Traffic-Accidents-Analysis-Python-EDA/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275712384,"owners_count":25514205,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-18T02:00:09.552Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-analysis","data-science","data-visualization","eda","matplolib","numpy","pandas","python"],"created_at":"2025-09-18T05:08:03.960Z","updated_at":"2025-09-18T05:08:06.271Z","avatar_url":"https://github.com/sankaran-s2001.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚗 US Traffic Accidents Analysis - Python EDA\n\n![Python](https://img.shields.io/badge/Python-3776AB?style=for-the-badge\u0026logo=python\u0026logoColor=white) ![Pandas](https://img.shields.io/badge/Pandas-150458?style=for-the-badge\u0026logo=pandas\u0026logoColor=white) ![NumPy](https://img.shields.io/badge/NumPy-013243?style=for-the-badge\u0026logo=numpy\u0026logoColor=white) ![Matplotlib](https://img.shields.io/badge/Matplotlib-11557C?style=for-the-badge\u0026logo=plotly\u0026logoColor=white) ![Seaborn](https://img.shields.io/badge/Seaborn-4C8CBF?style=for-the-badge\u0026logo=seaborn\u0026logoColor=white) ![EDA](https://img.shields.io/badge/EDA-FF9800?style=for-the-badge\u0026logo=googleanalytics\u0026logoColor=white) ![Jupyter Notebook](https://img.shields.io/badge/Jupyter-F37626?style=for-the-badge\u0026logo=jupyter\u0026logoColor=white) ![CSV](https://img.shields.io/badge/CSV-1572B6?style=for-the-badge\u0026logo=files\u0026logoColor=white) \n\nExploratory data analysis of US traffic accidents from 2016-2023, analyzing patterns by time, location, weather, and severity using Python data science libraries.\n\n## 🎯 What This Project Shows\n\nThis analysis explores US traffic accident patterns to understand:\n\n- When accidents happen most (time, day, season)\n- Where accidents occur most frequently (states)\n- Weather conditions during accidents\n- Accident severity patterns\n- Rush hour and weekend vs weekday trends\n\n\n## 📊 Dataset Information\n\n**Source**: [US Accidents Dataset (Kaggle)](https://www.kaggle.com/datasets/sobhanmoosavi/us-accidents)\n\n- **Time Period**: 2016-2023 (7 years of data)\n- **Total Records**: 1 million accident records\n- **Coverage**: 49 US states\n- **Data Points**: Location, time, weather, severity, and more\n\n\n## 📈 Key Analysis Results\n\n### 1. **Day vs Night Accidents**\n\n- **Day Accidents**: 538,199 (69%) - Much higher\n- **Night Accidents**: 242,235 (31%) - Lower\n- **Insight**: More accidents happen during daylight hours due to higher traffic volume\n\n\n### 2. **Weekly Accident Patterns**\n\n- **Highest**: Friday (172,961 accidents)\n- **Weekdays**: 154k-173k accidents each day\n- **Weekend**: Much lower (Sunday: 70,340)\n- **Insight**: Work commute days have significantly more accidents\n\n\n### 3. **Hourly Accident Distribution**\n\n- **Morning Rush**: 7-9 AM peak (70k+ accidents)\n- **Evening Rush**: 4-6 PM peak (73k+ accidents)\n- **Lowest**: Late night/early morning (2-5 AM)\n- **Insight**: Clear correlation with commuting patterns\n\n\n### 4. **Geographic Distribution**\n\n- **California**: 220,429 accidents (highest)\n- **Florida**: 112,111 accidents\n- **Texas**: 74,404 accidents\n- **Other top states**: SC, NY, NC, PA, VA, MN, OR\n- **Insight**: High-population states dominate accident statistics\n\n\n### 5. **Temperature Analysis**\n\n- **Peak Temperature**: 50°F-80°F (normal driving weather)\n- **Highest**: Around 70°F (202,254 accidents)\n- **Pattern**: Most accidents in moderate temperatures\n- **Insight**: Accidents occur mainly in normal weather, not extreme conditions\n\n\n## 🔍 Key Insights from Analysis\n\n### Traffic Patterns\n\n- **Weekday Dominance**: 85% of accidents happen Monday-Friday\n- **Rush Hour Impact**: Clear spikes during 7-9 AM and 4-6 PM\n- **Commuter Correlation**: Accidents align with work travel patterns\n\n\n### Geographic Trends\n\n- **Population Factor**: States with more people have more accidents\n- **California Leading**: Nearly 2x more accidents than second-place Florida\n- **Regional Distribution**: Concentrated in highly populated areas\n\n\n### Weather Conditions\n\n- **Normal Weather**: Most accidents happen in 50°F-80°F range\n- **Moderate Conditions**: Extreme weather doesn't cause most accidents\n- **Daily Activity**: Regular driving conditions see highest accident rates\n\n\n### Severity Analysis\n\n- **Severity 2**: Most common accident type (538k)\n- **Day vs Night**: Day accidents show higher severity patterns\n- **Traffic Volume**: More accidents when more cars are on road\n\n\n### Time-Based Patterns\n\n- **Daily Cycle**: Accidents follow work/commute schedules\n- **Weekend Drop**: 60% fewer accidents on weekends\n- **Seasonal Consistency**: Temperature data shows year-round patterns\n\n\n## 🛠️ Python Libraries Used\n\n- **pandas**: Data manipulation and cleaning\n- **matplotlib**: Creating visualizations\n- **seaborn**: Statistical plotting\n- **numpy**: Numerical analysis\n- **plotly**: Interactive charts\n\n\n## 📁 Project Files\n\n```\n📦 us-accidents-eda/\n├── 📄 README.md                           (This file)\n├── 📓 EDA_US_accidents.pdf               (Jupyter notebook pdf version)\n├── 📊 Accidents_by_Day_of_Week.png        (Weekly patterns)\n├── 📊 Accidents_by_Daylight_vs_Night.png  (Day/night analysis)\n├── 📊 Accidents_by_state.png              (Geographic distribution)\n├── 📊 Accidents_vary_by_time_of_day.png   (Hourly patterns)\n└── 📊 Temperature_Distribution_During_Accidents.png (Weather analysis)\n```\n\n\n## 🚀 How to Run This Analysis\n\n### Prerequisites\n\n- Python 3.7+\n- Jupyter Notebook\n- Libraries: pandas, matplotlib, seaborn, numpy\n\n\n### Steps\n\n1. **Download dataset** from [Kaggle](https://www.kaggle.com/datasets/sobhanmoosavi/us-accidents)\n2. **Install packages**: `pip install pandas matplotlib seaborn numpy`\n3. **Open notebook**: `jupyter notebook EDA_US_accidents.html`\n4. **Run analysis** to see all visualizations and insights\n\n## 💡 Data Science Skills Demonstrated\n\n- ✅ **Large Dataset Handling**: Processing 3+ million records\n- ✅ **Time Series Analysis**: Hourly, daily, weekly patterns\n- ✅ **Geographic Analysis**: State-wise distribution\n- ✅ **Data Visualization**: Multiple chart types and insights\n- ✅ **Statistical Analysis**: Pattern recognition and correlation\n- ✅ **Business Intelligence**: Actionable traffic safety insights\n\n\n## 🔮 Real-World Applications\n\n### Traffic Safety Planning\n\n- **Rush Hour Management**: Focus safety measures during peak times\n- **Weekend vs Weekday**: Different safety strategies needed\n- **State-Level Insights**: Resource allocation based on accident volume\n\n\n### Policy Development\n\n- **Work Schedule Impact**: Understanding commute-related accidents\n- **Geographic Targeting**: Focus on high-accident states\n- **Weather Preparedness**: Most accidents in normal weather conditions\n\n\n### Urban Planning\n\n- **Infrastructure Design**: Account for rush hour accident patterns\n- **Traffic Flow**: Reduce congestion during peak accident times\n- **Public Transportation**: Alternative options during high-risk periods\n\n\n## 📝 Key Findings Summary\n\n1. **69% of accidents happen during day** due to higher traffic\n2. **Weekdays have 2.5x more accidents** than weekends\n3. **Rush hours (7-9 AM, 4-6 PM) show clear peaks** in accidents\n4. **California leads with 220k+ accidents** - population correlation\n5. **Most accidents occur in 50°F-80°F weather** - normal conditions\n6. **Friday is the highest accident day** of the week\n7. **Commuting patterns directly correlate** with accident timing\n\n***\n\n**Created by**: [sankaran-s2001](https://github.com/sankaran-s2001)\n**Tools Used**: Python, Jupyter Notebook, pandas, matplotlib, seaborn\n**Project Type**: Exploratory Data Analysis\n**Domain**: Traffic Safety \\\u0026 Transportation Analytics\n**Dataset**: 1 million US accident records (2016-2023)\n\n## ✉️ Contact\n\n**Sankaran S**  \n[![GitHub](https://img.shields.io/badge/GitHub-181717?style=for-the-badge\u0026logo=github\u0026logoColor=white)](https://github.com/sankaran-s2001) [![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white)](https://www.linkedin.com/in/sankaran-s21/) [![Email](https://img.shields.io/badge/Email-D14836?style=for-the-badge\u0026logo=gmail\u0026logoColor=white)](mailto:sankaran121101@gmail.com)\n\n*Complete analysis of US traffic accidents revealing critical patterns for traffic safety and urban planning*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsankaran-s2001%2Fus-traffic-accidents-analysis-python-eda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsankaran-s2001%2Fus-traffic-accidents-analysis-python-eda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsankaran-s2001%2Fus-traffic-accidents-analysis-python-eda/lists"}