I have recently seen quite a bit of outrage on social media aimed towards gun control in the USA. I don’t know why facebook’s algorithms decided that I should care about a topic that bears no relation to my interests, but seeing every other item in my news feed and on reddit trying to convince me to think a certain way without reference to data rings my internal “propaganda” alarms.
Normally, this would not bother me, but this time it struck a nerve. You see, many of the people sharing/liking these emotional articles and “hilarious” twitter beatdowns, none of which reference data or actual experiments, are the same people that were pointing fingers at how climate change deniers ignore science!
To be clear, it is likely that they are right! Perhaps stronger gun laws would make gun-related violence drop. I simply can’t tell from the media. That is what bothers me - a witty reply to a tweet certainly makes one feel great, but it has nothing to do with the truth of the matter. If you are inundated with such appeals, it becomes a classic example of propaganda, and I really hate it when I feel that I am being manipulated for someone’s agenda.
With that in mind, I decided to do a basic sanity check. Something stupidly simple: Take the amount of gun restrictions in each state, and plot it against the states’ firearm death rate.
This would be easy to do in excel, but python is much more fun than messing with data by hand, so I have performed the data cleaning in a jupyter notebook, which you can download here.
DownloadGun Laws vs Death Rates
It turns out that Wikipedia has a page on firearm death rates by state. That page has a nice little table for death rates per 100,000 population in 2013. Furthermore, there is also a page on gun laws per state.
Let's do something stupidly simple: Let's count up the gun laws in each state, and compare it to the firearm death rates.
This is obviously a very flawed metric, but it serves as a good initial sanity check. I expect there to be a pretty strong negative relation - the more gun control laws, the less gun-related deaths. If that is found, then sanity check passed, and barring more in-depth research showing otherwise, I can accept that adding gun control laws could plausibly decrease the gun death rate.
Scraping the wikipedia articles turns out to be surprisingly easy using pandas:
Now we combine the two datasets by just counting the laws per state:
| State | Rate | Laws |
---|
0 | Alabama | 17.79 | 3.0 |
---|
1 | Alaska | 19.59 | 4.0 |
---|
2 | Arizona | 14.20 | 3.0 |
---|
3 | Arkansas | 16.93 | 6.0 |
---|
4 | California | 7.89 | 21.0 |
---|
5 | Colorado | 11.75 | 13.0 |
---|
6 | Connecticut | 4.48 | 16.0 |
---|
7 | Delaware | 10.80 | 8.0 |
---|
8 | Florida | 12.49 | 5.0 |
---|
9 | Georgia | 12.63 | 3.0 |
---|
10 | Hawaii | 2.71 | 13.0 |
---|
11 | Idaho | 14.08 | 2.0 |
---|
12 | Illinois | 8.67 | 16.0 |
---|
13 | Indiana | 13.04 | 9.0 |
---|
14 | Iowa | 8.19 | 8.0 |
---|
15 | Kansas | 11.44 | 2.0 |
---|
16 | Kentucky | 14.15 | 5.0 |
---|
17 | Louisiana | 19.15 | 3.0 |
---|
18 | Maine | 11.89 | 4.0 |
---|
19 | Maryland | 9.75 | 10.0 |
---|
20 | Massachusetts | 3.18 | 14.0 |
---|
21 | Michigan | 12.03 | 5.0 |
---|
22 | Minnesota | 7.88 | 7.0 |
---|
23 | Mississippi | 17.55 | 4.0 |
---|
24 | Missouri | 14.56 | 4.0 |
---|
25 | Montana | 16.94 | 5.0 |
---|
26 | Nebraska | 8.99 | 5.0 |
---|
27 | Nevada | 14.16 | 5.0 |
---|
28 | New Hampshire | 7.03 | 2.0 |
---|
29 | New Jersey | 5.69 | 12.0 |
---|
30 | New Mexico | 15.63 | 7.5 |
---|
31 | New York | 4.39 | 17.0 |
---|
32 | North Carolina | 12.42 | 7.0 |
---|
33 | North Dakota | 11.89 | 4.0 |
---|
34 | Ohio | 11.14 | 6.0 |
---|
35 | Oklahoma | 16.41 | 6.0 |
---|
36 | Oregon | 11.76 | 8.0 |
---|
37 | Pennsylvania | 11.36 | 9.0 |
---|
38 | Rhode Island | 5.33 | 12.0 |
---|
39 | South Carolina | 15.60 | 4.0 |
---|
40 | South Dakota | 9.47 | 3.0 |
---|
41 | Tennessee | 15.86 | 7.0 |
---|
42 | Texas | 10.50 | 8.0 |
---|
43 | Utah | 11.69 | 12.0 |
---|
44 | Vermont | 10.37 | 2.0 |
---|
45 | Virginia | 10.46 | 5.0 |
---|
46 | Washington | 9.07 | 8.5 |
---|
47 | West Virginia | 15.10 | 4.0 |
---|
48 | Wisconsin | 9.93 | 7.0 |
---|
49 | Wyoming | 17.51 | 2.0 |
---|
<matplotlib.axes._subplots.AxesSubplot at 0x7f15b06cc978>
Given the large negative correlation, unless research is sent to me with a more in-depth analysis of the issue, I can accept that it is very plausible that adding gun control laws would decrease the firearm death rate.
Click here to download the jupyter notebook Finally, it is important to understand that even my simple analysis could lead to the wrong conclusion. Articles which do a much more in-depth analysis can easily be found online, like here. There is also peer-reviewed research which shows similar results: yes there is a correlation between guns and deaths, but no, causation cannot be concluded. With a more in-depth analysis, even causation might be determined.
To be clear, I am not advocating for anything here. I simply felt like I was being manipulated, because there was a lot of yelling on social media, but a distinct lack of facts.