Git Product home page Git Product logo

us-accidents's Introduction

Repository

This publicly available GitHub repository provides detailed insights, visualizations, and code related to the study of accidents in the United States.

Requirements

For more information check out requirements.txt

Note: The code has been developed and tested with Python 3.12.1. While it is expected to work with any version of Python 3, the author has specifically used and verified it with Python 3.12.1.

python: 3 (3.12.1)
pandas: 2.1.4
holidays: 0.40
seaborn: 0.13.1
plotly: 5.18.0
ipykernel: 6.28.0
nbformat: 5.9.2

Directory structure

.
└── root/
    ├── config/             # shareable configuration
    │   ├── ...
    │   └── const.py
    ├── data/
    │   ├── processed/      # save file after processing by `preprocess.ipynb`
    │   └── raw/            # save raw csv file
    ├── dist/               # hidden directory to save bundled files
    ├── explore/            # for data exploration purposes
    │   └── notebook.ipynb
    ├── images/
    ├── presenatation/      # contains files for presentation purposes
    ├── scripts/
    │   ├── ...
    │   └── pack.sh         # bundle repo into `./dist dir`
    ├── utils/
    │   ├── ...
    │   └── convert.py      # shareable, simple function
    ├── ...
    ├── main.ipynb          # main file that processes data
    ├── preprocess.ipynb    
    ├── README.md           # here we are
    └── setup.py
  • config: main

Installation

Before installing

  • Due to the nature of file size, we would not commit the raw data file here. Instead, we can be downloaded as a document available here.
  • Download, extract the file, and place it in the <root>/data/raw directory with the name:
    • full.csv for full version of dataset
    • sample.csv for sample 500K-rows version of dataset
  • Open and run file preprocess.ipynb, to split the data into multiple individual files based on the year of the accidents.

Install

make sure that you installs all the necessary libraries that are mentioned in the Requirements

Analysis Topics:

  1. Accident Trends by DateTime: Explore patterns and trends in accidents based on the date and time.

  2. Association Between Accident Trends and Holidays: Investigate the correlation between accident trends by datetime and holidays.

  3. Accident Trends by Year, Month, Hour vs State: Analyze how accident rates vary across different states based on factors such as year, month, and hour.

  4. Accident DateTime and Daylight: Examine the relationship between accident occurrences and daylight conditions at the time of the incident.

us-accidents's People

Contributors

nguyenhy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.