Giter Club home page Giter Club logo

analysis-of-police-incidents-in-sf-2017's Introduction

Analysis-of-Police-Incidents-in-SF-2017

Summary

Living in the Bay Area, we love San Francisco, it is a beautiful city. But sometimes we are also concerned about safety issues in the city. I'd like to conduct an analysis and create visualziations to get a good understanding about the crime incidents happened in San Francisco, so we can be more aware. I found the interesting dataset about the police incidents in 2017 on data.sf.org. The main fields that I used are the columns about police incident categories, date and time of the incidents and the police district and location information of the incidents. I mainly used Pandas and Numpy modules to do analysis, and Matplotlib and Seaborn to create visualzations and gain interesting and useful insights.

Key Visualizations

1. How did the daily police incidents change in SF during 2017?

As we can see from the above "heart beat" of daily police incidents in San Francisco during 2017, the count of daily police incidents fluctuated drastically across the year of 2017. The count of daily police incidents was the lowest on Christmas and Thanksgiving holidays.

2. How many police incidents happened in each hour of day and day of week for 2017?

The above heatmap shows that the count of police incidents were highest during 5pm-8pm and 12pm-1pm for all days of week. The count of police incidents on Friday and Saturday nights were also quite high.

3. What are the top 10 most common police incident categories in SF during 2017?

From the top 10 most common police incident categories, we can tell that most of the police incidents in SF were non-violent crimes. The count of "larceny/theft" category was much higher than any other categories.

4. Where did the "vehicle theft" incidents happen in San Francisco?

(I personally am concerned about the vehicle theft incidents as I sometimes drive to SF)

The "vehicle theft" incident map shows that the "vehicle theft" incidents were all over the city, except the major parks in the city. The "vehicle theft" incidents were more concentrated in the business / commercial areas where there are lots of population.

Dataset

Police Department Incidents - Previous Year (2017)

Incidents derived from SFPD Crime Incident Reporting system

https://data.sfgov.org/Public-Safety/Police-Department-Incidents-Previous-Year-2017-/9v2m-8wqu

Python Jupyter Notebook in nbviewer

https://nbviewer.jupyter.org/github/andrewhuangca/Analysis-of-Police-Incidents-in-SF-2017/blob/master/Analysis%20of%20SF%20Police%20Incidents%20in%202017.ipynb

analysis-of-police-incidents-in-sf-2017's People

Contributors

andrewhuangca avatar

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.