Git Product home page Git Product logo

crime's Introduction

Orris J. Disney II

Python/SQL project for spring 2019

Violent Crime and Police Officer report

-- United States Population Count Over The Years

-- Violent Crimes Counts Compared to Police Officers Count Over The Years

This project was an attempt to answer the following question:

"Does the number of violent crimes rises or fall depending on the number of police officers in United States?"

The data gathered for this project is the yearly count for the following items:

a. Population

b. Violent Crimes

c. Police Officers

1. The following steps of this project:

a. Download/create the two csv files

- Population and Violent Crimes is from one location

- Number of Police Officers from another location

b. Create a database only if it is not already created or connect to the database if it already exists. The name of the database is violentcrimes.db. It's created in the same folder as the python program and the two CSV files.

c. In the SQLite database, import the data from two of the csv files into two different tables:

  - If the tables already exist, they will be deleted to prevent importing duplicate csv files into the same table
  
  - Once the table is created, the data will be imported

d. Once the import is completed, a printout of the data in the two tables is displayed. The printout will confirm that the data was correctly imported from the CSV file to the sqlite database tables.

e. Create a query that links the two tables. I use the year data column to link both tables.

f. Data results are graphed using matplotlib.

2. Dependencies:

a. sqlite3

b. csv

c. matplotlib.pyplot

d. panda

3. Make sure the following files in the same folder:

a. yearlycrime.ipynb

b. population_and_violent_crime_97_2016.csv

c. number_of_peace_officers_table.csv

Please reach out to me if you found any issues or have any questions.

Thanks.

References:

  1. Count of Police Officers https://www.bjs.gov/content/pub/pdf/nsleed.pdf The table with title "Number and rate of full-time officers reported to the UCR, by sworn status, 1992โ€“2012" Note about the data: There were three different table of data but I only focused on the UCR data.

The FBI collects data on the number and type of law enforcement employees as part of its Uniform Crime Reporting (UCR) Program.

  1. Population and Violent Crimes Count - https://ucr.fbi.gov/crime-in-the-u.s/2016/crime-in-the-u.s.-2016/topic-pages/tables/table-1

  2. Help from mentors with the programming and the wording in my README.md. Thank you!

crime's People

Contributors

odisney2 avatar

Forkers

summonholmes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.