Data Insights on US Gun Violence

Posted on Dec 11, 2020
The skills I demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.

Shiny Website | Github | LinkedIn

Introduction

Guns and gun ownership have long become one of the most emblematic features of the United States, both in popular media and in policy. The vast majority of information pertaining to firearms has come to us translated through disparate, often politically partisan sources, rendering analysis problematic. With the goal of providing further clarity to national discourse surrounding gun violence, the Gun Violence Archive was established in the Fall of 2013. In order to avoid overly biasing their data, the GVA employ an extensively "inclusive" approach to report entry, utilizing thousands of sources to document every aspect of reported incidents of gun-involved incidents, rather than targeting particular descriptors that seem appropriate.

While I admire the goal of the GVA, I chose to work with their data, which had been scraped by James Ko on Kaggle, because I take issue with their presentation; in my view, they fail to encourage exploration of the data and rarely provide accessible cross-analysis. Thus the refinement of firearms policy or its criticism might likely remain clouded. Therefore, by applying visualization procedures from ggplot, DT, and GoogleVis to the GVA data in the R Shiny website platform, I was able to develop an avenue for better public understanding of these data, which are vital to modern discourse regarding firearms.

How to Use this Website

Usage of this website revolves largely around developing the focused study of a particular Target Characteristic. These terms, ranging from anything as general as "Shots Fired" to "TSA Action," were standardized and applied by the GVA accross the dataset to inclusively reflect the collective reporting of an incident, both through official and commercial channels.

The drop down on the left focuses the dataset on that particular kind of incident. From there, the app breaks down into two axes of study: 1) State & Legal trends, and 2) National Trends of the Characteristic. These can be explored respectively through the State Dashboard tab and the National Dashboard tab. It is important to note that, while I have incorporated all of the GVA's data, I have set the default start-date to January of 2014, rather than 2013. This selection reflects the significant increase in the GVA's data collection that occured at the end of 2013.

Data Tracking Incidents by Geography

The Geographical Overview should both answer one of your first questions with regards to gun violence: "where does this kind of thing happen?" Whatever the target selection, the darker the color, the more prevalent the incidence of the target descriptor. By way of adding some depth to the geographical information, noteworthy, geographical maxima are illustrated alongside the map. By default, this is weighted per capita to avoid population bias, however, you may revert the selection to raw data if you deem it useful.

Let's look at the particular scenario of Accidental Shooting, the very characteristic that led me to creating the website. In the map data, we can see a clear trend of a belt of states ranging from the Midwest to the Southeast featuring an increased per capita incidence of Accidental Shootings, alongside geographical outliers of Maine, Vermont, New Hampshire, and Alaska.

Data Insights on US Gun Violence
It's tempting to make "just so" arguments about any number of cultural or political factors here, however, this is where it is vital to investigate why data bear out such a pattern.

While these geographical data may prove useful in users better informing their decisions regarding travel or moving, I believe this may better direct our attention to a secondary question: are there any meaningful contributors to particular states' increased incidence rate? After all, this is the question which could best inform activists or policy reform.

Legal & Sub Characteristic Data Analysis

The main holdover from the Geographical analysis is the X axis, which indicates the Incidents as scaled on the same page, while the Y axis indicates the relative rate of your choice of notable statistics, namely "Injuries," "Killings," and "Guns Involved." These options should allow for greater specificity of charting legal ramifications. In our case, we would likely be most interested in "Injuries" and "Killings." The most important element, however, is the coloration, which highlights the potential relationship between restrictions and actual statewide gun violence.

With a cursory glance at both sub-categories' graphs, we can see that they both seem to feature a linear relationship with the number of incidents per capita. We can't see any consistent correlation with regards to states' legal situation with the graph set as it is, however, when we deselect "Open Carry Restricted", we begin to see that the majority of states clustered towards the origin all account for states with at least the three remaining restrictions. From there we can experiment with filtering the Weapon Regulations to ascertain which combinations of regulations may facilitate a lower rate of Accidental Shootings as well as associated Injury or Death.

Data Insights on US Gun Violence

Filtered to include only Firearm Registration & Purchase Permits

In addition to allowing us potential insight into the legal ramifications, this graph should also help spread awareness of the relative legal situation in the country regarding firearms. One element that may yet result in outliers is the contrast between municipal law and state law; these data at present only account for the latter, not the former.

National Data Trends

Under the National Dashboard, we can break down further elements of accidental gun violence. There are two main avenues of study available in the data set: 1) information about the participants, and 2) timeline and coincidental characteristic association. Depending on your goals with the targeted study, these tabs can both be used for increasing the accessibility of these data as well as for providing deeper insight.

Data Insights on US Gun Violence
Age Distribution of Victims & Suspects

The most apparent element of note from the tab is the disparate age distribution. While many of us may be familiar with the proclivity of news media to report on tragedy, unfortunately, the data do bear out a peak in younger ages amongst victims and, to a lesser extent, suspects as well. We can further ascertain that the vast majority of the victims in such incidents are classified as Injured rather than Killed, where suspects are most often Unharmed.

This graph is charted at the log scale for visibility

Conclusion: Strengths & Weaknesses

Thus far we have been able to chart geographical consistencies and to observe specific details of personal involvement in Gun Violence across the country. Still, while we can ascertain associations between a number of characteristics in the data, one of the most important aspects of this data set is that it is a collation of reporting on gun violence, not a pure collection of incidents. In order to illustrate this, I would draw your attention to certain data under the characteristic of "Murder/Suicide."

The main weakness comes in the origin of the very reporting sources: in the weaponry tracked throughout the Gun Violence Archive, the majority of information sources provide after-the-fact reporting, which only occasionally identifies the firearms involved. When this information is released, it is hardly uniform and may report the model of the firearm, the category of the firearm, or may instead report the ammunition rather than the firearm. Therefore, there is relatively little that can be asserted definitively about weaponry. This pattern extends to other elements of the personal data as well, including gender, status, and, perhaps most importantly, to personal relationships and to ownership status of weaponry involved.

Because interpretation of these data may require some nuanced understanding of the reporting, I have also provided a filtered form of the data that highlights notes and reports regarding incidents falling within your selection parameters so you might glean further insight into incident reporting.

Each included URL is clickable and will direct you to its respective source

Going Forward

This website should help to build transparency and awareness regarding the epidemic of gun violence across the country. In time, I will continue to iterate on this website with the hope of incorporating ongoing data from the present to further elucidate the issue. Furthermore I intend to find more complete data regarding municipal firearm regulations so I can better flesh out the analysis proffered by the Geographical Overview of this site.

Everything on the site shall remain open to the public for use so that we may enjoy better, more consistent dialogue moving into the future.

Should you have any questions or suggestions, please reach out at [email protected].

Shiny Website | Github | LinkedIn

About Author

Theodore Cheek

Data Science & Machine Learning Engineer | A Passionate Puzzle-Solver and Pattern-Finder who enjoys translating data into clear and beautiful visualizations. Fluent with R, SQL, and Python.
View all posts by Theodore Cheek >

Related Articles

Leave a Comment

No comments found.

View Posts by Categories


Our Recent Popular Posts


View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay gbm Get Hired ggplot2 googleVis Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI