As requested by John Stokes, here are per-capita numbers for gun-related homicides, relating to GDP and total homicides, so the situation in the United States can be put in context relative to other nations.
main data source is UNODC (via Wikipedia here and here).
GDP data from World Bank, again via Wikipedia.
If the numbers on Wikipedia are inaccurate, or their relationship is not sound (e.g. numbers taken from different years, during which significant change occured) then obviously None of this analysis is valid.
To summarize the data, every possible way you look at it the US is lousy at preventing gun violence. Even when compared to significantly more violent places, gun violence in the US is a serious problem, and when compared to similarly wealthy places, the US is an outstanding disaster.
UPDATE: the relationship of the gun data and totals does not seem to be valid. FBI data suggests that the relative contribution of guns to homicides in the US is 47%, but relating these two data sources gives 80%. Internal comparisons should still be fine, but 'fraction' analysis has been stricken.
UPDATE: this is an updated version of the original notebook, run with data provided by Haruo Kamioka.
%matplotlib inline
import matplotlib.pyplot as plt
import seaborn as sns
from IPython.display import display, set_matplotlib_formats
set_matplotlib_formats('retina')
import pandas
pandas.set_option('display.precision', 2)
Some utility functions for display
def plot_percent(df, limit=10):
df['Gun Percent'][:limit].plot()
plt.ylim(0,100)
plt.title("% Gun Homicide")
plt.show()
def plot_percapita(df, limit=10):
df = df.ix[:,['Homicides', 'Gun Homicides']][:limit]
df['Total Homicides'] = df['Homicides'] - df['Gun Homicides']
del df['Homicides']
df.plot(kind='bar', stacked=True, sort_columns=True)
plt.ylabel("per 100k")
plt.show()
def display_relevant(df, limit=10):
display(df.ix[:,['Homicides', 'Gun Homicides', 'Sources and notes']][:limit])
Load the data
totals = pandas.read_csv('totals.csv', sep=';', index_col='Country')
guns = pandas.read_csv('guns.csv', sep=';', index_col='Country')
gdp = pandas.read_csv('gdp.csv', sep=';', index_col='Country', thousands=',')
# rename a few columns:
gdp.columns = ['Rank', 'GDP', 'Year']
guns['Gun Homicides'] = guns['Homicides']
del guns['Homicides']
totals['Homicides'] = totals['Rate']
data = totals.join(guns).join(gdp, rsuffix=' (GDP)')
data['Gun Percent'] = 100 * data['Gun Homicides'] / data['Homicides']
del data['Unintentional'], data['Undetermined'], data['Suicides']
data = data.dropna()
data
Rate | Count | Region | Subregion | Year | Homicides | Total | calculated | Homicides year | Sucides Year | Unintentional year | Undetermined Year | Sources and notes | Gun Homicides | Rank | GDP | Year (GDP) | Gun Percent | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Country | ||||||||||||||||||
South Africa | 31.0 | 52 | Africa | Southern Africa | 2012 | 31.0 | 21.5 | mixed years | 2007 | 1999 | 1999 | 1999 | Guns in South Africa[59] | 17.0 | 82 | 12867 | 2013 | 54.8 |
Costa Rica | 8.5 | 110 | Americas | Central America | 2012 | 8.5 | 6.3 | mixed years | 2006 | 2002 | 2002 | 2000 | Guns in Costa Rica[13] | 4.6 | 79 | 13876 | 2013 | 54.1 |
Mexico | 21.5 | 81 | Americas | Central America | 2012 | 21.5 | 11.2 | mixed years | 2010 | 2001 | 2001 | 2001 | Guns in Mexico[40] | 10.0 | 67 | 1637 | 2013 | 46.5 |
Nicaragua | 11.3 | 146 | Americas | Central America | 2012 | 11.3 | 7.3 | mixed years | 2008 | 2002 | 2002 | 2001 | Guns in Nicaragua[45] | 5.9 | 131 | 4643 | 2013 | 52.2 |
Panama | 17.2 | 142 | Americas | Central America | 2012 | 17.2 | 17.6 | mixed years | 2010 | 2002 | 2002 | 2002 | Guns in Panama[47] | 16.1 | 57 | 19416 | 2013 | 93.6 |
Canada | 1.6 | 131 | Americas | Northern America | 2012 | 1.6 | 2.2 | 2007-2011 | 2007-2011 | 2007-2011 avg | 2007-2011 | 2007-2011 | Statistics Canada[10] | 0.5 | 20 | 42753 | 2013 | 31.9 |
United States | 4.7 | 43 | Americas | Northern America | 2012 | 4.7 | 10.6 | 2013 | 2013 | 2013 | 2013 | 2013 | Guns in United States[68] | 3.5 | 10 | 53042 | 2013 | 75.5 |
Brazil | 25.2 | 125 | Americas | South America | 2012 | 25.2 | 19.0 | mixed years | 2008 | 2000 | 2000 | 2000 | Guns in Brazil[8] | 18.1 | 74 | 15038 | 2013 | 71.8 |
Chile | 3.1 | 132 | Americas | South America | 2012 | 3.1 | 3.7 | mixed years | 2005 | 2002 | 2002 | 2001 | Guns in Chile[11] | 2.2 | 51 | 21942 | 2013 | 71.0 |
Colombia | 30.8 | 42 | Americas | South America | 2012 | 30.8 | 28.1 | mixed years | 2010 | 2009 | 1999 | 1999 | Guns in Colombia[12] | 27.1 | 83 | 12424 | 2013 | 88.0 |
Paraguay | 9.7 | 138 | Americas | South America | 2012 | 9.7 | 8.2 | mixed years | 2009 | 2000 | 2000 | 2000 | Guns in Paraguay[48] | 7.3 | 107 | 8093 | 2013 | 75.3 |
Peru | 9.6 | 72 | Americas | South America | 2012 | 9.6 | 3.7 | mixed years | 2009 | 2000 | 2000 | 2000 | Guns in Peru[49] | 2.6 | 87 | 11774 | 2013 | 27.1 |
Uruguay | 7.9 | 83 | Americas | South America | 2012 | 7.9 | 14.0 | mixed years | 2009 | 2000 | 2000 | 2000 | Guns in Uruguay[69] | 3.4 | 56 | 19594 | 2013 | 43.4 |
Venezuela | 53.7 | 51 | Americas | South America | 2012 | 53.7 | 50.9 | mixed years | 2000 | 2000 | 2000 | 2000 | Guns in Venezuela[70] | 39.0 | 62 | 18198 | 2013 | 72.6 |
Kyrgyzstan | 9.1 | 123 | Asia | Central Asia | 2011 | 9.1 | 1.0 | 2010 | 2010 | 2010 | 2010 | 2010 | Guns in Kyrgyzstan[36] | 0.5 | 141 | 3213 | 2013 | 5.8 |
Hong Kong | 0.4 | 84 | Asia | Eastern Asia | 2012 | 0.4 | 0.0 | mixed years | 2004 | 1999 | 1996 | 1996 | Guns in Hong Kong[27] | 0.0 | - | 53216 | 2013 | 0.0 |
Japan | 0.3 | 116 | Asia | Eastern Asia | 2011 | 0.3 | 0.1 | mixed years | 2008 | 1999 | 1999 | 1999 | Guns in Japan[34] | 0.0 | 26 | 36223 | 2013 | 0.0 |
Singapore | 0.2 | 26 | Asia | South-Eastern Asia | 2012 | 0.2 | 0.2 | mixed years | 2006 | 1998 | 1998 | 1998 | Guns in Singapore[56] | 0.0 | 4 | 78763 | 2013 | 10.0 |
Cyprus | 2.0 | 76 | Asia | Western Asia | 2012 | 2.0 | 1.0 | mixed years | 2010 | 2010 | 2009 | 2010 | Guns in Cyprus[15] | 0.2 | 37 | 28225 | 2013 | 12.0 |
Georgia | 4.3 | 58 | Asia | Western Asia | 2010 | 4.3 | 1.9 | mixed years | 2010 | 2009 | 2009 | 2009 | Guns in Georgia[22] | 0.6 | 115 | 716 | 2013 | 14.0 |
Israel | 1.8 | 39 | Asia | Western Asia | 2012 | 1.8 | 1.9 | 2009 | 2009 | 2009 | 2009 | 2009 | Guns in Israel[31] | 0.9 | 32 | 32491 | 2013 | 52.2 |
Kuwait | 0.4 | 30 | Asia | Western Asia | 2012 | 0.4 | 0.4 | mixed years | 1995 | 1999 | 2000 | 2000 | Guns in Kuwait[35] | 0.4 | 3 | 8384 | 2012 | 90.0 |
Bulgaria | 1.9 | 45 | Europe | Eastern Europe | 2012 | 1.9 | 2.4 | 2011 | 2011 | 2011 | 2011 | 2011 | Guns in Bulgaria[9] | 0.2 | 70 | 15732 | 2013 | 12.1 |
Czech Republic | 1.0 | 25 | Europe | Eastern Europe | 2012 | 1.0 | 1.8 | 2010 | 2010 | 2010 | 2010 | 2010 | Guns in Czech Republic[16] | 0.1 | 35 | 29018 | 2013 | 12.0 |
Hungary | 1.3 | 37 | Europe | Eastern Europe | 2012 | 1.3 | 0.9 | mixed years | 2009 | 2009 | 2008 | 2002 | Guns in Hungary[28] | 0.1 | 47 | 23334 | 2013 | 10.0 |
Poland | 1.2 | 117 | Europe | Eastern Europe | 2011 | 1.2 | 0.2 | 2010 | 2010 | 2010 | 2010 | 2010 | Guns in Poland[51] | 0.0 | 45 | 2369 | 2013 | 1.7 |
Moldova | 6.5 | 75 | Europe | Eastern Europe | 2012 | 6.5 | 1.0 | 2011 | 2011 | 2011 | 2011 | 2011 | Guns in Moldova[41] | 0.5 | 130 | 4671 | 2013 | 6.9 |
Romania | 1.7 | 102 | Europe | Eastern Europe | 2012 | 1.7 | 0.2 | 2010 | 2010 | 2010 | 2010 | 2010 | Guns in Romania[54] | 0.0 | 59 | 18974 | 2013 | 2.4 |
Slovakia | 1.4 | 156 | Europe | Eastern Europe | 2012 | 1.4 | 1.8 | 2010 | 2010 | 2010 | 2010 | 2010 | Guns in Slovakia[57] | 0.2 | 39 | 26497 | 2013 | 12.9 |
Denmark | 0.8 | 120 | Europe | Northern Europe | 2012 | 0.8 | 1.3 | 2011 | 2011 | 2011 | 2008 | 2004 | Guns in Denmark[17] | 0.2 | 18 | 43782 | 2013 | 27.5 |
Estonia | 5.0 | 139 | Europe | Northern Europe | 2011 | 5.0 | 2.5 | 2010 | 2010 | 2010 | 2010 | 2010 | Guns in Estonia[19] | 0.3 | 40 | 25823 | 2013 | 6.0 |
Finland | 1.6 | 168 | Europe | Northern Europe | 2012 | 1.6 | 3.6 | 2010 | 2010 | 2010 | 2010 | 2010 | Guns in Finland[20] | 0.3 | 23 | 3974 | 2013 | 16.2 |
Latvia | 4.7 | 173 | Europe | Northern Europe | 2012 | 4.7 | 1.4 | 2010 | 2010 | 2010 | 2010 | 2010 | Guns in Latvia[37] | 0.2 | 50 | 22569 | 2013 | 3.8 |
Norway | 2.2 | 28 | Europe | Northern Europe | 2011 | 2.2 | 1.8 | mixed years | 2010 | 2010 | 2010 | 2008 | Guns in Norway[46] | 0.0 | 6 | 64406 | 2013 | 1.8 |
Sweden | 0.7 | 147 | Europe | Northern Europe | 2012 | 0.7 | 1.5 | 2010 | 2010 | 2010 | 2010 | 2010 | Guns in Sweden[63] | 0.2 | 15 | 44658 | 2013 | 27.1 |
United Kingdom | 1.0 | 141 | Europe | Northern Europe | 2011 | 1.0 | 0.3 | 2010 | 2010 | 2010 | 2010 | 2010 | Guns in the United Kingdom[67] | 0.1 | 24 | 38259 | 2013 | 5.0 |
Croatia | 1.2 | 126 | Europe | Southern Europe | 2012 | 1.2 | 3.5 | mixed years | 2009 | 2010 | 2010 | 2010 | Guns in Croatia[14] | 1.1 | 53 | 21351 | 2013 | 91.7 |
Greece | 1.7 | 57 | Europe | Southern Europe | 2011 | 1.7 | 1.6 | mixed years | 2009 | 2009 | 2009 | 1998 | Guns in Greece[24] | 0.6 | 41 | 25667 | 2013 | 34.7 |
Italy | 0.9 | 127 | Europe | Southern Europe | 2012 | 0.9 | 1.3 | 2009 | 2009 | 2009 | 2009 | 2009 | Guns in Italy[32] | 0.4 | 27 | 35281 | 2013 | 40.0 |
Portugal | 1.2 | 31 | Europe | Southern Europe | 2012 | 1.2 | 1.8 | 2010 | 2010 | 2010 | 2010 | 2010 | Guns in Portugal[52] | 0.5 | 38 | 27804 | 2013 | 40.0 |
Serbia | 1.2 | 28 | Europe | Southern Europe | 2012 | 1.2 | 3.9 | 2010 | 2010 | 2010 | 2010 | 2010 | Guns in Serbia[55] | 0.6 | 81 | 1302 | 2013 | 51.7 |
Slovenia | 0.7 | 41 | Europe | Southern Europe | 2012 | 0.7 | 2.5 | mixed years | 2010 | 2010 | 2009 | 2010 | Guns in Slovenia[58] | 0.1 | 36 | 28859 | 2013 | 7.1 |
Spain | 0.8 | 100 | Europe | Southern Europe | 2012 | 0.8 | 0.6 | mixed years | 2010 | 2010 | 2010 | 2007 | Guns in Spain[61] | 0.1 | 30 | 33094 | 2013 | 18.8 |
Macedonia | 1.4 | 93 | Europe | Southern Europe | 2011 | 1.4 | 1.9 | mixed years | 2010 | 2010 | 2010 | 1997 | Guns in Macedonia[39] | 1.1 | 90 | 11612 | 2013 | 76.4 |
Austria | 0.9 | 158 | Europe | Western Europe | 2012 | 0.9 | 3.0 | mixed years | 2010 | 2010 | 2009 | 2010 | Guns in Austria[3] | 0.2 | 13 | 45079 | 2013 | 20.0 |
Belgium | 1.6 | 56 | Europe | Western Europe | 2012 | 1.6 | 2.4 | 2006 | 2006 | 2006 | 2006 | 2006 | Guns in Belgium[7] | 0.3 | 22 | 41575 | 2013 | 18.1 |
France | 1.0 | 145 | Europe | Western Europe | 2012 | 1.0 | 3.0 | 2009 | 2009 | 2009 | 2009 | 2009 | Guns in France[21] | 0.2 | 25 | 37532 | 2013 | 22.0 |
Germany | 0.8 | 144 | Europe | Western Europe | 2011 | 0.8 | 1.2 | 2010 | 2010 | 2010 | 2010 | 2010 | Guns in Germany[23] | 0.2 | 16 | 43884 | 2013 | 25.0 |
Luxembourg | 0.8 | 107 | Europe | Western Europe | 2011 | 0.8 | 2.0 | mixed years | 2009 | 2009 | 2004 | 2009 | Guns in Luxembourg[38] | 0.6 | 2 | 91048 | 2013 | 75.0 |
Netherlands | 0.9 | 47 | Europe | Western Europe | 2012 | 0.9 | 0.5 | 2010 | 2010 | 2010 | 2010 | 2010 | Guns in Netherlands[43] | 0.2 | 11 | 46162 | 2013 | 22.2 |
Australia | 1.1 | 80 | Oceania | Australasia | 2012 | 1.1 | 0.9 | 2011 | 2011 | 2011 | 2011 | 2011 | Guns in Australia[2] | 0.1 | 19 | 43202 | 2013 | 10.0 |
New Zealand | 0.9 | 111 | Oceania | Australasia | 2012 | 0.9 | 1.4 | mixed years | 2009 | 2007 | 2006 | 2006 | Guns in New Zealand[44] | 0.3 | 28 | 34732 | 2013 | 28.9 |
Of all sampled countries (Found data for 68 countries), the US is in the top 15 in Gun Homicides per capita.
Numbers are per 100k.
data = data.sort("Gun Homicides", ascending=False)
display_relevant(data, 15)
Homicides | Gun Homicides | Sources and notes | |
---|---|---|---|
Country | |||
Venezuela | 53.7 | 39.0 | Guns in Venezuela[70] |
Colombia | 30.8 | 27.1 | Guns in Colombia[12] |
Brazil | 25.2 | 18.1 | Guns in Brazil[8] |
South Africa | 31.0 | 17.0 | Guns in South Africa[59] |
Panama | 17.2 | 16.1 | Guns in Panama[47] |
Mexico | 21.5 | 10.0 | Guns in Mexico[40] |
Paraguay | 9.7 | 7.3 | Guns in Paraguay[48] |
Nicaragua | 11.3 | 5.9 | Guns in Nicaragua[45] |
Costa Rica | 8.5 | 4.6 | Guns in Costa Rica[13] |
United States | 4.7 | 3.5 | Guns in United States[68] |
Uruguay | 7.9 | 3.4 | Guns in Uruguay[69] |
Peru | 9.6 | 2.6 | Guns in Peru[49] |
Chile | 3.1 | 2.2 | Guns in Chile[11] |
Croatia | 1.2 | 1.1 | Guns in Croatia[14] |
Macedonia | 1.4 | 1.1 | Guns in Macedonia[39] |
Take top 30 Countries by GDP
top = data.sort('GDP')[-30:]
and rank them by Gun Homicides per capita:
top_by_guns = top.sort("Gun Homicides", ascending=False)
display_relevant(top_by_guns, 5)
plot_percapita(top_by_guns, 10)
Homicides | Gun Homicides | Sources and notes | |
---|---|---|---|
Country | |||
United States | 4.7 | 3.5 | Guns in United States[68] |
Chile | 3.1 | 2.2 | Guns in Chile[11] |
Israel | 1.8 | 0.9 | Guns in Israel[31] |
Luxembourg | 0.8 | 0.6 | Guns in Luxembourg[38] |
Greece | 1.7 | 0.6 | Guns in Greece[24] |
NOTE: these bar graphs should not be interpreted as fractions of a total, as the two data sources do not appear to be comparable. But the red and blue bar graphs should still be internally comparable.
The US is easily #1 of 30 wealthiest countries in Gun Homicides per capita, by a factor of 4:1
Adding USA, Canada, and Mexico to all of Europe, USA is a strong #2 behind Mexico in total gun homicides per-capita
index = (data['Region'] == 'Europe') | \
(data.index == 'United States') | \
(data.index == 'Canada') | \
(data.index == 'Mexico')
selected = data[index]
print("By Total Gun Homicides")
sys.stdout.flush()
by_guns = selected.sort("Gun Homicides", ascending=False)
#by_guns['Gun Homicides'].plot(kind='bar')
plot_percapita(by_guns, limit=25)
display_relevant(selected, limit=None)
By Total Gun Homicides
Homicides | Gun Homicides | Sources and notes | |
---|---|---|---|
Country | |||
Mexico | 21.5 | 10.0 | Guns in Mexico[40] |
United States | 4.7 | 3.5 | Guns in United States[68] |
Croatia | 1.2 | 1.1 | Guns in Croatia[14] |
Macedonia | 1.4 | 1.1 | Guns in Macedonia[39] |
Serbia | 1.2 | 0.6 | Guns in Serbia[55] |
Luxembourg | 0.8 | 0.6 | Guns in Luxembourg[38] |
Greece | 1.7 | 0.6 | Guns in Greece[24] |
Canada | 1.6 | 0.5 | Statistics Canada[10] |
Portugal | 1.2 | 0.5 | Guns in Portugal[52] |
Moldova | 6.5 | 0.5 | Guns in Moldova[41] |
Italy | 0.9 | 0.4 | Guns in Italy[32] |
Estonia | 5.0 | 0.3 | Guns in Estonia[19] |
Belgium | 1.6 | 0.3 | Guns in Belgium[7] |
Finland | 1.6 | 0.3 | Guns in Finland[20] |
Bulgaria | 1.9 | 0.2 | Guns in Bulgaria[9] |
Denmark | 0.8 | 0.2 | Guns in Denmark[17] |
France | 1.0 | 0.2 | Guns in France[21] |
Netherlands | 0.9 | 0.2 | Guns in Netherlands[43] |
Germany | 0.8 | 0.2 | Guns in Germany[23] |
Sweden | 0.7 | 0.2 | Guns in Sweden[63] |
Slovakia | 1.4 | 0.2 | Guns in Slovakia[57] |
Latvia | 4.7 | 0.2 | Guns in Latvia[37] |
Austria | 0.9 | 0.2 | Guns in Austria[3] |
Spain | 0.8 | 0.1 | Guns in Spain[61] |
Hungary | 1.3 | 0.1 | Guns in Hungary[28] |
Czech Republic | 1.0 | 0.1 | Guns in Czech Republic[16] |
United Kingdom | 1.0 | 0.1 | Guns in the United Kingdom[67] |
Slovenia | 0.7 | 0.1 | Guns in Slovenia[58] |
Romania | 1.7 | 0.0 | Guns in Romania[54] |
Norway | 2.2 | 0.0 | Guns in Norway[46] |
Poland | 1.2 | 0.0 | Guns in Poland[51] |
Let's just compare US, Canada, and UK:
select = data.ix[['United States', 'Canada', 'United Kingdom']]
plot_percapita(select)
Normalize to the US numbers (inverse)
select['Homicides'] = select['Homicides']['United States'] / select['Homicides']
select['Gun Homicides'] = select['Gun Homicides']['United States'] / select['Gun Homicides']
display_relevant(select)
Homicides | Gun Homicides | Sources and notes | |
---|---|---|---|
Country | |||
United States | 1.0 | 1 | Guns in United States[68] |
Canada | 2.9 | 7 | Statistics Canada[10] |
United Kingdom | 4.7 | 71 | Guns in the United Kingdom[67] |
select['Homicides'] = select['Homicides']['United States'] / select['Homicides']
select['Gun Homicides'] = select['Gun Homicides']['United States'] / select['Gun Homicides']
display_relevant(select)
Homicides | Gun Homicides | Sources and notes | |
---|---|---|---|
Country | |||
United States | 1.0 | 1.0 | Guns in United States[68] |
Canada | 0.3 | 0.1 | Statistics Canada[10] |
United Kingdom | 0.2 | 0.0 | Guns in the United Kingdom[67] |
So, you are 2.6 times more likely to be killed in the US than Canada, and 3.5 times more likely than in the UK. That's bad, but not extreme.
However, you are 4.9 times more likely to be killed with a gun in the US than Canada, and almost 100 times more likely than in the UK. That is pretty extreme.
Countries represented:
for country in data.index:
print(country)
Venezuela Colombia Brazil South Africa Panama Mexico Paraguay Nicaragua Costa Rica United States Uruguay Peru Chile Croatia Macedonia Israel Serbia Luxembourg Georgia Greece Kyrgyzstan Canada Portugal Moldova Italy Kuwait Estonia Belgium Finland New Zealand Cyprus Bulgaria Denmark France Netherlands Germany Sweden Slovakia Latvia Austria Spain Hungary Czech Republic Australia United Kingdom Slovenia Romania Norway Singapore Poland Japan Hong Kong