Predictive Analytics: Gun Violence in Tristate Cities

Drashti Patel

Data Scientist
Data Visualizer
Data Analyst
Canva
Microsoft Excel
Tableau

Project Overview

Data related to gun violence was collected and analyzed through a supervised learning approach, utilizing methods such as classification algorithms, including One-R, Random Forest, J48, and Naive Bayes. The initial assumption was that the Random Forest algorithm would perform the best on the collected data. By comparing the performance of numerous classification algorithms, this study helped to validate this assumption.

Data Processing & Analysis

The study focuses on identifying the cities susceptible to gun violence in the Tristate area using various attributes. These attributes include demographic, population, and crime-related data, such as city/state, type/number of incidents, and population/demographic data. The data was collected from various sources, including the Gun Violence Archive and city-data.com, and was processed to create two datasets with 120 and 180 instances, respectively. Data processing took up the majority of the time, as is typical in data analytics. The crime data was normalized and averaged over a five-year period, and county-level unemployment data from 2017 was added to the dataset. The goal of the study is to use classification algorithms and 10-fold cross-validation to determine the propensity of violence in each city.

Key Insights & Results

We found that the Random Forest algorithm outperformed J48 and Naive Bayes in accurately predicting the class attribute "Gun Violence." The study also showed that the accuracy of the algorithm improved with an increase in data instances. The chosen attributes were highly predictive in classifying which cities were prone to gun violence and showed correlations between demographic data and crime data, emphasizing the importance of accounting for the dependence between variables. Suggestions for future improvements to the study included adding more instances of data and years of crime data, considering trends of crime data, accounting for the degree to which a city is prone to gun violence, and potentially including gun ownership data. The findings of the study can assist in ensuring appropriate safety measures and proactive decision-making at both the city and state level to reduce the likelihood of firearm violence in the community.
Partner With Drashti
View Services

More Projects by Drashti