Killed by Police


Main Infographic

About the project

This project obtained data from killedbypolice.net and used that data to look at the statistics of the people killed by the U.S. police force, e.g race, gender and age. The data on killedbypolice.net nearly always has a news articles attached the deaths are only recorded from U.S. Police and not police around the world.

Visualization of data

The code used to obtain and look at the data is available on GitHub, the main images is shown above, other images with just the specific area (race, gender ect.) are shown below. All killedbypolice images are licensed under Creative Commons, Atribution-ShareAlike (CC BY-SA) so you can share them on Facebook, Twitter or other social media sites.

Other Images

(Please don’t hotlink, just save the images and reupload)

The Code

This project was coded in Python 3 (although it should work in Python 2 aswell), the code is available on GitHub https://github.com/AceLewis/killedbypolice. The data was obtained from killedbypolice.net on this website there is a big table of data, the table’s HTML is difficult to parser (due to broken HMTL) so I had to resort to using Selenium and Firefox to obtain the HTML for two of the years.

As mentioned in the main image a better Histogram can be obtained using matplotlib, this is shown below. The software I used to make the image looked ugly when the number of bars was this high.

Nicer Histogram

Comparison to the UK

I live in the UK so I would like to compare the USA police killing to the police killings here. The population of USA in 2014 was 318.9 million [REF] the population of the UK in 2014 was only 64.5 million [REF], the population of the USA is roughly 4.94 times larger. If the rates of police killings in the UK were similar to the US we would expect (3,916/4.94) 793 people to be killed by police from May 2013 to the end of 2015.

Since May 2013 only 4 people were killed by law enforcement officers in the UK [REF], so you are about 19,825% more likely to be killed by a police officer in the US than in the UK. This comparison is not that fair as people in the US have access to guns and can more easily put other peoples lives in danger, whilst in the UK guns are illegal other than shotguns and some sporting rifles with a license.

Project Details

Date: January 2016

Language: Python

Tagged: Killed by Police, Data

Other Projects.

  • Killed by Police - A project scraping and processing data obtained from killedbypolice.net
  • This website - This website is made using Jekyll a open source static website builder.
  • Spintax - A Python module to parse spintax, this was created so one of my bots can send people messages that are not the same every time.
  • Steam Trading Bot - A Steam trading bot used to automatically trade items.

About me

I am interested in Physics, Maths, Programming and also play a few games in my spare time. I have an interest in data and have made webscrapers to gather and process information, I am currently looking into nice ways to display information easily in infographics using Python. I can code in Matlab, Python and have also made a Steam trading bot in Node.JS.

Social Links