Gun violence: Reflecting & Visualizing

Enzo Bergamo
7 min readApr 12, 2021

Introduction

During the past few years, gun-related violence has been a tragic but increasingly common headline in U.S. news. While both sides of the aisle agree that gun-related violence — including mass shootings — consists of a major issue in contemporary America, this topic also ranks as one of the most divisive subjects in U.S. politics. Discussions regarding more strict background check procedures as well as limiting the purchase of specific types of firearms are common themes in state and federal legislatures alike.

The reality, however, remains the same: while state and federal courts and legislatures discuss solutions to this public health crisis (as it is officially classified by the U.S. federal government), America will remain as the number one country in gun-related deaths amongst high-income countries. The graph below provides a glimpse into the dramatic extent of this issue. The information used in this section comes from the OpenInfo platform and it is available on its website (https://www.openintro.org/book/statdata/index.php?data=gun_violence).

Attempts have shown that there is no easy solution to this issue. Therefore, the focus of this post is to explore the many facets of this topic through diverse data visualization based on the Gun Violence Dataset (available on Kaggle at https://www.kaggle.com/jameslko/gun-violence-data). Throughout this article, other sources are also used and are credited where necessary. The time range of the data is between the years 2014 and 2017. This makes it impossible to analyze more recent phenomena; nonetheless, it is sufficient to obtain an overall picture of this complex situation in the United States.

A Visual Overview of the Issue

For most people, it seems that these events are becoming more common every day — and, unfortunately, this perception closely corresponds to reality. While the data varies quite a bit at each period, it shows a clear trend: a considerable increase in the number of gun-related incidents in the specified time frame. Considering the number of incidents in each of the four years, the overall picture is the same.

It is worth noting that this includes all recorded gun-related incidents (crimes, accidents, amongst others). It is interesting, therefore, to analyze the data when considering only mass shootings. Since there is no widely accepted definition of a mass shooting, we here use the definition from the FBI: 4 or more victims at one or more locations close to one another. Filtering such events, we obtain the following result.

A more interesting and informative visualization is obtained when we plot the individual mass shootings on a timeline. Some of the most prominent mass shootings are highlighted.

This visualization shows itself to be extremely powerful: in the United States, mass shootings consisted of an almost monthly occurrence during the specified time frame.

Mass Shootings: Counties, Cities, and States

It is worth exploring how these events distribute geographically throughout the United States. A natural first visualization refers to how the number of gun-related incidents relates to the population. While there are not a lot of surprises (one can effectively work as a proxy for other), one interesting aspect of this visualization refers to the outliers and the accompanying questions. What are the factors that lead to states such as Illinois and Florida having such a high number of occurrences compared to their population? And what about Texas and its comparatively low number of incidents given its own population? While these topics are of major importance, they will not be directly covered here due to their inherent complexity.

In addition to exploring states, we can also dive into the specifics of cities and counties. A natural question arises: what are the places with the highest count of incidents? A general picture can be obtained by using the longitude and latitude information of each recorded incident.

Unsurprisingly, the density of recorded crimes closely resembles the population density in the United States. For a more interesting view, we can analyze the number of incidents on a city/country basis — the result is as follows.

Chicago is a complete outlier compared to all other cities in the country; in fact, it is necessary to sum the occurrences in the four next cities — Baltimore, Washington, New Orleans, and Philadelphia — to obtain the same number of incidents. This in itself already explains why the state of Illinois (shown before) was such an outlier when compared to other states.

Of course, however, the total number of cases only provides us with half the story. It is critical to see how these numbers compare to their corresponding population sizes. In order to produce the following visualizations, a dataset with information from the 2019 Census was used; it is available for download on Kaggle as well (https://www.kaggle.com/peretzcohen/2019-census-us-population-data-by-state). The following table provides information about the states with the highest number of incidents per capita. It is rather interesting to observe that the list of states with the highest number of incidents per capita has little to do with the states with the absolute number of incidents.

Gun-related incidents & other factors

The central point of discussion between the two major political parties often revolves around the connection between gun possession and shootings. The objective of this section is to investigate whether this connection exists — and if so, to what extent. In addition to the Census information described before, this section also makes use of the dataset from OpenIntro.org, available for download on its website (https://www.openintro.org/book/statdata/index.php?data=gun_violence_us). When comparing the two datapoints — the number of incidents and firearm ownership (both per 1000 people) — the following result is obtained. Note that outliers (such as the state of Wyoming) were removed to improve the visualization.

While there is some correlation, it is most definitely not as strong as some would imagine. Additionally, it is important to observe how some states (such as Arizona and Utah) have a reasonably low number of gun-related incidents even with the high number of guns per 1000 people; analogously, states like Alaska have an extremely high number of gun-related incidents, even with a lower number of guns than Arizona per 1000 people.

We can also compare the number of incidents per capita with other factors, namely GDP per capita. For this, the GDP per capita dataset was used; it is also available for download on Kaggle (https://www.kaggle.com/solorzano/gdp-per-capita-in-us-states). The result is as follows:

As one might have predicted, there is a clear connection between poverty and gun-related incidents: as GDP per capita increases, the number of incidents decreases.

Final thoughts

This post purposely focused both on mass shootings and regular gun-related incidents. This was done for a number of reasons (including commonality between the datasets of the two phenomena); among them, however, one stands out. For both of them, the causes are complex but not mysterious — this short article showed two of them, namely gun ownership and poverty. For both of them, with a few isolated exceptions, little has been done.

At the beginning of this post, it is said “both sides of the aisle agree that gun-related violence — including mass shootings — consists of a major issue in contemporary America.” Even with bipartisan agreement, however, the trendlines continue to point up. After the Navy Yard massacre— the 2013 mass shooting that left 13 people dead — President Barack Obama said the following words:

Our tears are not enough. Our words and our prayers are not enough. If we really want to honor these twelve men and women, if we really want to be a country where we can go to work and go to school and walk our streets free from senseless violence, without so many lives being stolen by a bullet from a gun, then we’re gonna have to change. We’re gonna have to change.

Since then, thousands of mass shootings have taken place. With this post, I hope to have offered a compelling visual overview of this intricate issue and as such — maybe — have incentivized a politician or decision-maker to take the first step to change.

--

--