The City and County of San Francisco had launched an official open data portal called SF OpenData in 2009 as a product of its official open data program, DataSF. The portal contains hundreds of city datasets for use by developers, analysts, residents and more. Under the category of Public Safety, the portal contains the list of SFPD Incidents since Jan 1, 2003.
In my previous post I performed an exploratory time-series analysis on the crime incidents data to identify any patterns.
In this post I have performed an exploratory geo analysis on the crime incidents data to identify any patterns based on the San Francisco Police Department District classification.
The data for this analysis has been downloaded from the publicly available data from the City and County of San Francisco’s OpenData website SF OpenData. The crime incidents database has data recorded from the year 2003 till date. I downloaded the full data and performed my analysis for the time period from 2003 to 2015, filtering out the data from the year 2016. There are nearly 1.9 million crime incidents in this dataset.
I have performed minimal data processing on the downloaded raw data to facilitate my analysis.
There are 10 police districts in the City and County of San Francisco. I have categorized my analysis based on these Police Districts.
• Bayview
• Central
• Ingleside
• Mission
• Northern
• Park
• Richmond
• Southern
• Taraval
• Tenderloin
The following plot depicts the number of crimes recorded from the year 2003 till the end of the year 2015 and categorized by the SFPD Police Districts.
By analyzing the plot above, we can arrive at the following insights:
The following plot depicts the number of crimes recorded by the hour and categorized by the SFPD Police Districts.
By analyzing the plot above, we can arrive at the following insights:
The following plot depicts the number of crimes recorded during different days of the week and categorized by the SFPD Police Districts.
By analyzing the plot above, we can arrive at the following insights:
This analysis was performed entirely using RStudio version 0.99 and R Version 3.2.0.
The data processing and plots were done using the R libraries ggplot2 and dplyr.
© 2021 TechTarget, Inc.
Powered by
Badges | Report an Issue | Privacy Policy | Terms of Service
Most Popular Content on DSC
To not miss this type of content in the future, subscribe to our newsletter.
Other popular resources
Archives: 2008-2014 | 2015-2016 | 2017-2019 | Book 1 | Book 2 | More
Most popular articles
You need to be a member of Data Science Central to add comments!
Join Data Science Central