Skip to content

CrashGuard is an informative program made to educate users on the dangers of the road by analyzing high risk areas. Data set of 7.7 million US accidents is used and analyzed with custom-made heap and hash-map data structures.

Notifications You must be signed in to change notification settings

luiswtheds/CrashGuard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 

Repository files navigation

COP3530 Project 3 - CrashGuard

Our project explores the performance of hashmaps and heaps by comparing how effectively each data structure can retrieve the top k elements.

  • Language: C++ 20
  • Compiler: GCC 13.2

Group Documentation and Video:

Project Report

Overview - YouTube

Project Directory:

  • resources
    • US_Accidents_March23.csv: contains the dataset from Kaggle
  • src
    • AttributeData.h: contains a struct that is used by both data structures
    • DataNode.h: contains a struct that is used to contain a single crash and all its data when parsing
    • HashMap.cpp
    • HashMap.h : a hashmap template class implemented from scratch with hashing and separate-chaining collision resolution
    • Heap.cpp
    • Heap.h: a heap template class implemented from scratch using comparators and function pointers
    • main.cpp: menu-driven program allowing users to learn about US accidents and compares data structures

Instructions for Running:

Clone Repository

cd [where you want to download]
git clone https://github.com/raglandconnor/CrashGuard

Place Dataset in Directory

  1. Download US vehicle crash dataset
  2. Place inside resources folder

Create Compiled Program

g++ -std=c++17 -c src/main.cpp -o main.o && g++ -std=c++17 -c src/HashMap.cpp -o HashMap.o && g++ -std=c++17 -c src/Heap.cpp -o Heap.o && g++ -std=c++17 main.o HashMap.o Heap.o -o CrashGuard

Execute

./CrashGuard

References:

  • US Accidents (2016 - 2023) Dataset
    • Moosavi, Sobhan, Mohammad Hossein Samavatian, Srinivasan Parthasarathy, and Rajiv Ramnath. “A Countrywide Traffic Accident Dataset.”, 2019.
    • Moosavi, Sobhan, Mohammad Hossein Samavatian, Srinivasan Parthasarathy, Radu Teodorescu, and Rajiv Ramnath. "Accident Risk Prediction based on Heterogeneous Sparse Data: New Dataset and Insights." In proceedings of the 27th ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems, ACM, 2019.

About

CrashGuard is an informative program made to educate users on the dangers of the road by analyzing high risk areas. Data set of 7.7 million US accidents is used and analyzed with custom-made heap and hash-map data structures.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages