Homicide by firearms – statistics country by country

I wanted to experiment a bit with a for me previously unknown Python library, “Beautiful Soup”, which is an html and xml parser. So I used the Soup to grab data from a Wikipedia page, and massaged it a bit with Pandas:

Figure_1

The graph contains stats on about 40 different countries, in terms of homicides by firearm and gun ownership.  In the two first subplots, USA clearly sticks out, both in terms of number of guns – according to the wiki page, there are about as many guns as people in the US…! – as well as in homicides by gun.

The third subplot shows homicides per gun, and now the rankings give some surprises, e.g. that Netherlands (NL) ranks very high, obviously reason being there being very few guns, but relatively speaking many homicides.

Advertisements

About swdevperestroika

High tech industry veteran, avid hacker reluctantly transformed to mgmt consultant.
This entry was posted in Data Analytics, Python, Society, Statistics and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s