SlideShare a Scribd company logo
San Francisco Crime Analysis – Report
-By Rohit Dandona and Sameer Darekar
Introduction:
From 1934 to 1963, San Francisco was infamous for housing some of the world's most notorious
criminals on the inescapable island of Alcatraz. Today, the city is known more for its tech scene than its
criminal past. But, with rising wealth inequality, housing shortages, and a proliferation of expensive
digital toys riding BART to work, there is no scarcity of crime in the city by the bay. This project examines
the San Francisco Police Department crime records between January 1st 2003 and May 13st 2015. It
visualizes the trends of major crimes and drugs in the city across time and locations. This analysis has
been carried out to facilitate law enforcement officers to enhance their strategies based on time and
location.
R and Tableau have been used for data processing and visualizations.
Dataset:
This dataset contains incidents derived from SFPD Crime Incident Reporting system. The data ranges
from 1/1/2003 to 5/13/2015.
Data fields:
 Dates - timestamp of the crime incident
 Category - category of the crime incident
 Descript - detailed description of the crime incident
 DayOfWeek - the day of the week
 PdDistrict - name of the Police Department District
 Resolution - how the crime incident was resolved
 Address - the approximate street address of the crime incident
 X – Longitude
 Y - Latitude
Data-Preprocessing:
The date field in the dataset is a timestamp present in the “MM/dd/yyyy hh:mm:ss” format and is not of
much utility if used as such.
Tableau provides the facility of parsing through a timestamp through a utility called “DATEPART ” and
extract specific segments of the timestamp. For example:
DATEPART('hour',[Dates])
A part of the analysis required representing the data by five separate parts of the day. The following
construct was used to derive a column in Tableau:
IF DAY([Dates]) >= 4 AND DAY([Dates]) <= 8 THEN 'EARLY MORNING(4 AM to 8 AM)'
ELSEIF DAY([Dates]) > 8 AND DAY([Dates]) < 12 THEN 'MORNING(8 AM to 12 PM)'
ELSEIF DAY([Dates]) >= 12 AND DAY([Dates]) < 17 THEN 'AFTERNOON(12 PM to 5 PM)'
ELSEIF DAY([Dates]) >= 17 AND DAY([Dates]) <= 21 THEN 'EVENING (5 PM to 9 PM)'
ELSE 'NIGHT(9 PM to 4 AM)' END
The address data is of the following form
1. 1500 Block of LOMBARD ST
2. OAK ST / LAGUNA ST
The first one is actually a location on the street but the second one is the intersection of two streets, we
extracted the streets from both of them for plotting the bubble chart shown in analysis section. The rest
of the columns are clean and no further processing was required.
Analysis of Crime
 Trends:
There are 39 categories of crime report incidents available in the dataset including “Other offenses”
and “Non-criminal”.
Larceny and theft was the most common crime in San Francisco between January 1st 2003 and May
13th 2015, with a total of 174,900 reported incidents. The next two highest crime categories, “Other
offenses” (98,281 reported incidents) and “Non-criminal” (98,172 reported incidents), are omitted
from discussion in the analyses. Instead, the key focus is on the following high crime categories:
larceny and theft, assault (76,876 reported incidents), drugs (53,971 reported incidents), vehicle
theft (53,781 reported incidents), vandalism (44,725 reported incidents), drugs (21,910 reported
incidents) and burglary (19,226 reported incidents).
 Month wise distribution:
Since the crime incidents recorded in 2015 are only till May, those records have been removed
for this analysis. The month of February is the safest and is observed to have the least crime
incidents reported. October is the least safe with the maximum number of reported crime
incidents.
 Region wise distribution:
A contour plot to represent the region wise density of crime leveraging the available
latitude/longitude information of the reported crime, is as follows:
A giant hotspot can be observed in the Southern and Tenderloin region with relatively less
dense plots in the surrounding neighborhoods. Majority of the crime seems to be concentrated
in these and surrounding regions.
Plotting a line graph to represent crime in each region on each day of a week uncovers some
interesting trends:
Crime rate by day of the week:
Clearly, the Southern region is the most notorious with the maximum number of crimes
reported followed by the Northern region. Richmond is the safest place to be in San Francisco.
The rate of crime is observed to increase over the weekend. The number of reported incidents
seems to be the maximum on Fridays with a total number of 133,743 reported incidents. For
almost all regions, the same trend can be observed. Tenderloin, however, is an exception as the
crime rate in this region decreases over the weekend and is the highest on Wednesdays.
Wednesday, Friday and Saturday are the most crime prominent days. Interestingly, the least
amount of incidents were reported on Mondays (116,707 reported incidents) followed by
Sundays. In the Southern, Northern, Central and Mission districts, the number of crimes
increased sharply on Friday and Saturday, then declined for rest of the week.
 Specific crime trends
We examine the crime trends of a hand full of crimes (Kidnapping, Fraud, Robbery, Missing
Person, Burglary, Vandalism, Vehicle Theft, Drug/Narcotics, Assault and Larceny/Theft). The
following trends are observed:
Interestingly, Drug/Narcotic related crimes decrease over the weekend (unlike other
categories). The related reported incidents are the maximum on a Friday.
Among the high crime categories, larceny and theft tend to occur on Friday and Saturday. On
the other hand, the occurrences of assault steadily increased from Thursday to Sunday, while
burglary generally occurred more often during the weekdays than the weekends. Drug crimes
were most commonly reported on Wednesday and least reported during the weekends, and
robberies happened by approximately the same frequency every day.
 Hourly Crime Analysis
The overall hourly crime trends are as follows:
Hourly trend analysis for specific crimes:
The hourly trends unravel some interesting crime facts:
 5 am is the safest part of a day with 8,637 reported incidents and 6 pm is the most
dangerous hour with 55,104 reported incidents.
 Surprisingly, 12 pm is the second most dangerous hour during a day and in fact is the
hour where incidents reported under some crime categories is maximum.
 Kidnapping and stolen property incidents take place uniformly throughout the day
Violent Crimes in San Francisco: Assault, Robbery and Sex Offences (forcible)
Distribution:
Violent crime density (each) by parts of day:
 Assault:
Part of Day
Time
Frame
Early
Morning
4am to
8am
Morning
8am to
12pm
Afternoon
12pm to
5 pm
Evening
5pm to
9pm
Night
9pm to
4am
Distribution of Assault crimes is more or less the same at different times of the day.
 Robbery:
A slight shift in epicenter of the crime can be observed over different parts of the day.
 Sex Offences(forcible):
Different Patterns can be observed at different time with increase in density at night.
 Larceny and Theft:
Crime is spread across multiple regions early in the mornings and at night. It is concentrated on
a single region in the afternoon.
Food for thought
 The following shows a bar graph representing the percentage of incidents which have been
investigated by law enforcement agencies vs the ones that haven’t been.
Surprisingly, for 61.02% of the reported incidents no conclusive action has been taken.
 The following graph shows the top three streets where the maximum crime incidents were
reported [Bryant Street, Market Street, Mission Street]:
The police commission office is located on 850 Bryant Street which is just near the 800 Bryant
Street which has the most crime rate in terms of streets.
Market Street, with the second highest number of crime incidents reported, has a police station
0.5 miles away from it:
Conclusion
 Tenderloin and Southern are the PD districts needing special attention
 Famous Neighborhoods have more crime rate
 Violent crime seems to be concentrated around Tenderloin.
 Assault is most common violent crime.
 Crime rate is highest at 6 pm and lowest at 5 am with a spike at 12 in afternoon that means
whenever there are people on the streets the crime rate is higher.
 Pattern observed for each crime should be followed while deploying police personnel
 SFPD needs to work more proactively as the 61% of cases are still not resolved
 Also the crime rate near the police station needs to be decreased the SFPD needs to create
terror in the minds of criminals.
 Need to find out why the months February has the lowest and October has the highest crime
commited
 The second part of the Kaggle competetion that is predicting the classes of the crime has also
been completed and in process for further improvement, the current rank is 672 out of
1886[4].
References
[1] https://www.kaggle.com/c/sf-crime/data for Dataset
[2] http://www.r-bloggers.com/google-maps-and-ggmap/ for google maps and using ggmap in
R.
[3] http://blog.dominodatalab.com/geographic-visualization-with-rs-ggmaps/ creating clusters
and heatmaps in R
[4] https://www.kaggle.com/c/sf-crime/leaderboard?submissionId=2963937 Kaggle competition
submission

More Related Content

What's hot

Google Earth Basics
Google Earth BasicsGoogle Earth Basics
Google Earth Basics
teedawg12
 
Gis gps
Gis gpsGis gps
Gis gps
rrodri37
 
Characterizing Forest Degradation using Multiple SAR Approaches
Characterizing Forest Degradation using Multiple SAR ApproachesCharacterizing Forest Degradation using Multiple SAR Approaches
Characterizing Forest Degradation using Multiple SAR Approaches
CIFOR-ICRAF
 
GIS and Its Components.pptx
GIS and Its Components.pptxGIS and Its Components.pptx
GIS and Its Components.pptx
Dr. B. Sarkar, Dinhata College
 
What is GIS
What is GISWhat is GIS
What is GIS
Esri
 
Introduction to statistics
Introduction to statisticsIntroduction to statistics
Introduction to statistics
Kapil Dev Ghante
 
Arc Geographic Information System (GIS) Digital Elevation Models (DEM).
Arc Geographic Information System (GIS) Digital Elevation Models (DEM).Arc Geographic Information System (GIS) Digital Elevation Models (DEM).
Arc Geographic Information System (GIS) Digital Elevation Models (DEM).
Uday Kumar Shil
 
Geographic coordinate system & map projection
Geographic coordinate system & map projectionGeographic coordinate system & map projection
Geographic coordinate system & map projection
vishalkedia119
 
Aerial photogrammetry ppt 2
Aerial photogrammetry ppt 2Aerial photogrammetry ppt 2
Aerial photogrammetry ppt 2
Mr Amol Ghogare
 
Introduction to Statistics
Introduction to StatisticsIntroduction to Statistics
Introduction to Statistics
Robert Tinaro
 
Google Earth Engine: Health Applications of Google’s Cloud Platform for Big E...
Google Earth Engine: Health Applications of Google’s Cloud Platform for Big E...Google Earth Engine: Health Applications of Google’s Cloud Platform for Big E...
Google Earth Engine: Health Applications of Google’s Cloud Platform for Big E...
MEASURE Evaluation
 
Map projection
Map projectionMap projection
Map projection
lila_mahato1971
 
Gis (geographical information system)
Gis (geographical information system)Gis (geographical information system)
Gis (geographical information system)
AlfahadFarwa
 
Operational Remote sensing Applications
Operational Remote sensing ApplicationsOperational Remote sensing Applications
Operational Remote sensing Applications
Tushar Dholakia
 
GIS and Remote Sensing
GIS and Remote SensingGIS and Remote Sensing
GIS and Remote Sensing
Kamal Abdurahman
 
Spatial data analysis 1
Spatial data analysis 1Spatial data analysis 1
Spatial data analysis 1
Johan Blomme
 
Tecnologías de la información y la comunicación aplicadas a geologia
Tecnologías de la información y la comunicación aplicadas a geologiaTecnologías de la información y la comunicación aplicadas a geologia
Tecnologías de la información y la comunicación aplicadas a geologia
johnatan stiven valencia
 
Geographic information system(gis)
Geographic information system(gis)Geographic information system(gis)
Geographic information system(gis)
MapQuest.Inc
 
Analysis-of-data-with-missing-values.pptx
Analysis-of-data-with-missing-values.pptxAnalysis-of-data-with-missing-values.pptx
Analysis-of-data-with-missing-values.pptx
AASTHAJAJOO
 
BASIC CONCEPTS OF PHOTOGRAMMETRY
BASIC CONCEPTS OF PHOTOGRAMMETRYBASIC CONCEPTS OF PHOTOGRAMMETRY
BASIC CONCEPTS OF PHOTOGRAMMETRY
Namitha M R
 

What's hot (20)

Google Earth Basics
Google Earth BasicsGoogle Earth Basics
Google Earth Basics
 
Gis gps
Gis gpsGis gps
Gis gps
 
Characterizing Forest Degradation using Multiple SAR Approaches
Characterizing Forest Degradation using Multiple SAR ApproachesCharacterizing Forest Degradation using Multiple SAR Approaches
Characterizing Forest Degradation using Multiple SAR Approaches
 
GIS and Its Components.pptx
GIS and Its Components.pptxGIS and Its Components.pptx
GIS and Its Components.pptx
 
What is GIS
What is GISWhat is GIS
What is GIS
 
Introduction to statistics
Introduction to statisticsIntroduction to statistics
Introduction to statistics
 
Arc Geographic Information System (GIS) Digital Elevation Models (DEM).
Arc Geographic Information System (GIS) Digital Elevation Models (DEM).Arc Geographic Information System (GIS) Digital Elevation Models (DEM).
Arc Geographic Information System (GIS) Digital Elevation Models (DEM).
 
Geographic coordinate system & map projection
Geographic coordinate system & map projectionGeographic coordinate system & map projection
Geographic coordinate system & map projection
 
Aerial photogrammetry ppt 2
Aerial photogrammetry ppt 2Aerial photogrammetry ppt 2
Aerial photogrammetry ppt 2
 
Introduction to Statistics
Introduction to StatisticsIntroduction to Statistics
Introduction to Statistics
 
Google Earth Engine: Health Applications of Google’s Cloud Platform for Big E...
Google Earth Engine: Health Applications of Google’s Cloud Platform for Big E...Google Earth Engine: Health Applications of Google’s Cloud Platform for Big E...
Google Earth Engine: Health Applications of Google’s Cloud Platform for Big E...
 
Map projection
Map projectionMap projection
Map projection
 
Gis (geographical information system)
Gis (geographical information system)Gis (geographical information system)
Gis (geographical information system)
 
Operational Remote sensing Applications
Operational Remote sensing ApplicationsOperational Remote sensing Applications
Operational Remote sensing Applications
 
GIS and Remote Sensing
GIS and Remote SensingGIS and Remote Sensing
GIS and Remote Sensing
 
Spatial data analysis 1
Spatial data analysis 1Spatial data analysis 1
Spatial data analysis 1
 
Tecnologías de la información y la comunicación aplicadas a geologia
Tecnologías de la información y la comunicación aplicadas a geologiaTecnologías de la información y la comunicación aplicadas a geologia
Tecnologías de la información y la comunicación aplicadas a geologia
 
Geographic information system(gis)
Geographic information system(gis)Geographic information system(gis)
Geographic information system(gis)
 
Analysis-of-data-with-missing-values.pptx
Analysis-of-data-with-missing-values.pptxAnalysis-of-data-with-missing-values.pptx
Analysis-of-data-with-missing-values.pptx
 
BASIC CONCEPTS OF PHOTOGRAMMETRY
BASIC CONCEPTS OF PHOTOGRAMMETRYBASIC CONCEPTS OF PHOTOGRAMMETRY
BASIC CONCEPTS OF PHOTOGRAMMETRY
 

Viewers also liked

San Francisco Crime Prediction Report
San Francisco Crime Prediction ReportSan Francisco Crime Prediction Report
San Francisco Crime Prediction Report
Rohit Dandona
 
San Francisco Crime Infographics
San Francisco Crime InfographicsSan Francisco Crime Infographics
San Francisco Crime Infographics
Rohit Dandona
 
San Francisco Crime Analysis Classification Kaggle contest
San Francisco Crime Analysis Classification Kaggle contestSan Francisco Crime Analysis Classification Kaggle contest
San Francisco Crime Analysis Classification Kaggle contest
Sameer Darekar
 
San Francisco Crime Analysis
San Francisco Crime AnalysisSan Francisco Crime Analysis
San Francisco Crime Analysis
Rohit Dandona
 
Story Tellers: Hartford Crime Analysis
Story Tellers: Hartford Crime AnalysisStory Tellers: Hartford Crime Analysis
Story Tellers: Hartford Crime Analysis
Neil Ryan
 
2014 Chicago Crime Data Analysis
2014 Chicago Crime Data Analysis 2014 Chicago Crime Data Analysis
2014 Chicago Crime Data Analysis
Yawen Li
 
Crime Analysis
Crime AnalysisCrime Analysis
Crime Analysis
Hi Tech Criminal Justice
 
Crime Analysis & Prediction System
Crime Analysis & Prediction SystemCrime Analysis & Prediction System
Crime Analysis & Prediction System
BigDataCloud
 

Viewers also liked (8)

San Francisco Crime Prediction Report
San Francisco Crime Prediction ReportSan Francisco Crime Prediction Report
San Francisco Crime Prediction Report
 
San Francisco Crime Infographics
San Francisco Crime InfographicsSan Francisco Crime Infographics
San Francisco Crime Infographics
 
San Francisco Crime Analysis Classification Kaggle contest
San Francisco Crime Analysis Classification Kaggle contestSan Francisco Crime Analysis Classification Kaggle contest
San Francisco Crime Analysis Classification Kaggle contest
 
San Francisco Crime Analysis
San Francisco Crime AnalysisSan Francisco Crime Analysis
San Francisco Crime Analysis
 
Story Tellers: Hartford Crime Analysis
Story Tellers: Hartford Crime AnalysisStory Tellers: Hartford Crime Analysis
Story Tellers: Hartford Crime Analysis
 
2014 Chicago Crime Data Analysis
2014 Chicago Crime Data Analysis 2014 Chicago Crime Data Analysis
2014 Chicago Crime Data Analysis
 
Crime Analysis
Crime AnalysisCrime Analysis
Crime Analysis
 
Crime Analysis & Prediction System
Crime Analysis & Prediction SystemCrime Analysis & Prediction System
Crime Analysis & Prediction System
 

Similar to San Francisco crime analysis

Units 4, 5, 24, 31 task 4 secondary evidence (3)
Units 4, 5, 24, 31   task 4 secondary evidence (3)Units 4, 5, 24, 31   task 4 secondary evidence (3)
Units 4, 5, 24, 31 task 4 secondary evidence (3)
bentheman21
 
Units 4, 5, 24, 31 task 4 secondary evidence
Units 4, 5, 24, 31   task 4 secondary evidenceUnits 4, 5, 24, 31   task 4 secondary evidence
Units 4, 5, 24, 31 task 4 secondary evidence
lrosenfeld1
 
Secondary evidence task 4
Secondary evidence task 4Secondary evidence task 4
Secondary evidence task 4
nikonmedia
 
Secondary evidence
Secondary evidenceSecondary evidence
Secondary evidence
karrass1
 
Police Minister Bheki Cele's speaking notes on the Crime Statistics
Police Minister Bheki Cele's speaking notes on the Crime StatisticsPolice Minister Bheki Cele's speaking notes on the Crime Statistics
Police Minister Bheki Cele's speaking notes on the Crime Statistics
SABC News
 
Units 4, 5, 24, 31 task 4 secondary evidence (1)
Units 4, 5, 24, 31   task 4 secondary evidence (1)Units 4, 5, 24, 31   task 4 secondary evidence (1)
Units 4, 5, 24, 31 task 4 secondary evidence (1)
lrosenfeld1
 
Secondary Evidence
Secondary EvidenceSecondary Evidence
Secondary Evidence
MilliesMedia1
 
Data-Analysis for Chicago Crime Data 2023
Data-Analysis for Chicago Crime Data  2023Data-Analysis for Chicago Crime Data  2023
Data-Analysis for Chicago Crime Data 2023
ymrp368
 
San Francisco Crime Classification with Tableau 10.4
San Francisco Crime Classification with Tableau 10.4San Francisco Crime Classification with Tableau 10.4
San Francisco Crime Classification with Tableau 10.4
RAHUL SINGH
 
Crimes Project - Data Mining & Analytics
Crimes Project - Data Mining & AnalyticsCrimes Project - Data Mining & Analytics
Crimes Project - Data Mining & Analytics
Teri Grossheim
 
M.Gallagher Exam2
M.Gallagher Exam2M.Gallagher Exam2
M.Gallagher Exam2mgalla22
 
FBI report compared to crimes in Sweden
FBI report compared to crimes in SwedenFBI report compared to crimes in Sweden
FBI report compared to crimes in Sweden
ADVICEDERNBACK
 
Student #1 I have chosen to write about the history of data anal.docx
Student #1 I have chosen to write about the history of data anal.docxStudent #1 I have chosen to write about the history of data anal.docx
Student #1 I have chosen to write about the history of data anal.docx
johniemcm5zt
 
Crime Analysis at Chicago
Crime Analysis at ChicagoCrime Analysis at Chicago
Crime Analysis at Chicago
Roshik Ganesan
 
An Intelligence Analysis of Crime Data for Law Enforcement Using Data Mining
An Intelligence Analysis of Crime Data for Law Enforcement Using Data MiningAn Intelligence Analysis of Crime Data for Law Enforcement Using Data Mining
An Intelligence Analysis of Crime Data for Law Enforcement Using Data Mining
Waqas Tariq
 
Analyzing the Spatial Distribution of Crime in Annapolis County
Analyzing the Spatial Distribution of Crime in Annapolis CountyAnalyzing the Spatial Distribution of Crime in Annapolis County
Analyzing the Spatial Distribution of Crime in Annapolis CountyCOGS Presentations
 
Building an urban theft map by analyzing newspaper - SMAP 2018
Building an urban theft map by analyzing newspaper - SMAP 2018Building an urban theft map by analyzing newspaper - SMAP 2018
Building an urban theft map by analyzing newspaper - SMAP 2018
Laura Po
 
georgia-tech-atlanta
georgia-tech-atlantageorgia-tech-atlanta
georgia-tech-atlantaPeter Kim
 
Untold story of karachi
Untold story of karachiUntold story of karachi
Untold story of karachi
Robin Patras
 
Stategic_Crime_Report_Crime_Analyses_340[1]
Stategic_Crime_Report_Crime_Analyses_340[1]Stategic_Crime_Report_Crime_Analyses_340[1]
Stategic_Crime_Report_Crime_Analyses_340[1]Erasmo Skylar Ruiz
 

Similar to San Francisco crime analysis (20)

Units 4, 5, 24, 31 task 4 secondary evidence (3)
Units 4, 5, 24, 31   task 4 secondary evidence (3)Units 4, 5, 24, 31   task 4 secondary evidence (3)
Units 4, 5, 24, 31 task 4 secondary evidence (3)
 
Units 4, 5, 24, 31 task 4 secondary evidence
Units 4, 5, 24, 31   task 4 secondary evidenceUnits 4, 5, 24, 31   task 4 secondary evidence
Units 4, 5, 24, 31 task 4 secondary evidence
 
Secondary evidence task 4
Secondary evidence task 4Secondary evidence task 4
Secondary evidence task 4
 
Secondary evidence
Secondary evidenceSecondary evidence
Secondary evidence
 
Police Minister Bheki Cele's speaking notes on the Crime Statistics
Police Minister Bheki Cele's speaking notes on the Crime StatisticsPolice Minister Bheki Cele's speaking notes on the Crime Statistics
Police Minister Bheki Cele's speaking notes on the Crime Statistics
 
Units 4, 5, 24, 31 task 4 secondary evidence (1)
Units 4, 5, 24, 31   task 4 secondary evidence (1)Units 4, 5, 24, 31   task 4 secondary evidence (1)
Units 4, 5, 24, 31 task 4 secondary evidence (1)
 
Secondary Evidence
Secondary EvidenceSecondary Evidence
Secondary Evidence
 
Data-Analysis for Chicago Crime Data 2023
Data-Analysis for Chicago Crime Data  2023Data-Analysis for Chicago Crime Data  2023
Data-Analysis for Chicago Crime Data 2023
 
San Francisco Crime Classification with Tableau 10.4
San Francisco Crime Classification with Tableau 10.4San Francisco Crime Classification with Tableau 10.4
San Francisco Crime Classification with Tableau 10.4
 
Crimes Project - Data Mining & Analytics
Crimes Project - Data Mining & AnalyticsCrimes Project - Data Mining & Analytics
Crimes Project - Data Mining & Analytics
 
M.Gallagher Exam2
M.Gallagher Exam2M.Gallagher Exam2
M.Gallagher Exam2
 
FBI report compared to crimes in Sweden
FBI report compared to crimes in SwedenFBI report compared to crimes in Sweden
FBI report compared to crimes in Sweden
 
Student #1 I have chosen to write about the history of data anal.docx
Student #1 I have chosen to write about the history of data anal.docxStudent #1 I have chosen to write about the history of data anal.docx
Student #1 I have chosen to write about the history of data anal.docx
 
Crime Analysis at Chicago
Crime Analysis at ChicagoCrime Analysis at Chicago
Crime Analysis at Chicago
 
An Intelligence Analysis of Crime Data for Law Enforcement Using Data Mining
An Intelligence Analysis of Crime Data for Law Enforcement Using Data MiningAn Intelligence Analysis of Crime Data for Law Enforcement Using Data Mining
An Intelligence Analysis of Crime Data for Law Enforcement Using Data Mining
 
Analyzing the Spatial Distribution of Crime in Annapolis County
Analyzing the Spatial Distribution of Crime in Annapolis CountyAnalyzing the Spatial Distribution of Crime in Annapolis County
Analyzing the Spatial Distribution of Crime in Annapolis County
 
Building an urban theft map by analyzing newspaper - SMAP 2018
Building an urban theft map by analyzing newspaper - SMAP 2018Building an urban theft map by analyzing newspaper - SMAP 2018
Building an urban theft map by analyzing newspaper - SMAP 2018
 
georgia-tech-atlanta
georgia-tech-atlantageorgia-tech-atlanta
georgia-tech-atlanta
 
Untold story of karachi
Untold story of karachiUntold story of karachi
Untold story of karachi
 
Stategic_Crime_Report_Crime_Analyses_340[1]
Stategic_Crime_Report_Crime_Analyses_340[1]Stategic_Crime_Report_Crime_Analyses_340[1]
Stategic_Crime_Report_Crime_Analyses_340[1]
 

Recently uploaded

Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
vcaxypu
 
Machine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptxMachine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptx
balafet
 
社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .
NABLAS株式会社
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
haila53
 
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
Tiktokethiodaily
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
ewymefz
 
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
vcaxypu
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
NABLAS株式会社
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
ewymefz
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
ocavb
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
ArpitMalhotra16
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
axoqas
 
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Subhajit Sahu
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
AbhimanyuSinha9
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
slg6lamcq
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
axoqas
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
ewymefz
 
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project PresentationPredicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Boston Institute of Analytics
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 

Recently uploaded (20)

Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
 
Machine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptxMachine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptx
 
社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
 
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
 
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
 
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
 
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project PresentationPredicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 

San Francisco crime analysis

  • 1. San Francisco Crime Analysis – Report -By Rohit Dandona and Sameer Darekar Introduction: From 1934 to 1963, San Francisco was infamous for housing some of the world's most notorious criminals on the inescapable island of Alcatraz. Today, the city is known more for its tech scene than its criminal past. But, with rising wealth inequality, housing shortages, and a proliferation of expensive digital toys riding BART to work, there is no scarcity of crime in the city by the bay. This project examines the San Francisco Police Department crime records between January 1st 2003 and May 13st 2015. It visualizes the trends of major crimes and drugs in the city across time and locations. This analysis has been carried out to facilitate law enforcement officers to enhance their strategies based on time and location. R and Tableau have been used for data processing and visualizations. Dataset: This dataset contains incidents derived from SFPD Crime Incident Reporting system. The data ranges from 1/1/2003 to 5/13/2015. Data fields:  Dates - timestamp of the crime incident  Category - category of the crime incident  Descript - detailed description of the crime incident  DayOfWeek - the day of the week  PdDistrict - name of the Police Department District  Resolution - how the crime incident was resolved  Address - the approximate street address of the crime incident  X – Longitude  Y - Latitude Data-Preprocessing: The date field in the dataset is a timestamp present in the “MM/dd/yyyy hh:mm:ss” format and is not of much utility if used as such. Tableau provides the facility of parsing through a timestamp through a utility called “DATEPART ” and extract specific segments of the timestamp. For example: DATEPART('hour',[Dates])
  • 2. A part of the analysis required representing the data by five separate parts of the day. The following construct was used to derive a column in Tableau: IF DAY([Dates]) >= 4 AND DAY([Dates]) <= 8 THEN 'EARLY MORNING(4 AM to 8 AM)' ELSEIF DAY([Dates]) > 8 AND DAY([Dates]) < 12 THEN 'MORNING(8 AM to 12 PM)' ELSEIF DAY([Dates]) >= 12 AND DAY([Dates]) < 17 THEN 'AFTERNOON(12 PM to 5 PM)' ELSEIF DAY([Dates]) >= 17 AND DAY([Dates]) <= 21 THEN 'EVENING (5 PM to 9 PM)' ELSE 'NIGHT(9 PM to 4 AM)' END The address data is of the following form 1. 1500 Block of LOMBARD ST 2. OAK ST / LAGUNA ST The first one is actually a location on the street but the second one is the intersection of two streets, we extracted the streets from both of them for plotting the bubble chart shown in analysis section. The rest of the columns are clean and no further processing was required. Analysis of Crime  Trends: There are 39 categories of crime report incidents available in the dataset including “Other offenses” and “Non-criminal”. Larceny and theft was the most common crime in San Francisco between January 1st 2003 and May 13th 2015, with a total of 174,900 reported incidents. The next two highest crime categories, “Other offenses” (98,281 reported incidents) and “Non-criminal” (98,172 reported incidents), are omitted from discussion in the analyses. Instead, the key focus is on the following high crime categories: larceny and theft, assault (76,876 reported incidents), drugs (53,971 reported incidents), vehicle theft (53,781 reported incidents), vandalism (44,725 reported incidents), drugs (21,910 reported incidents) and burglary (19,226 reported incidents).
  • 3.  Month wise distribution: Since the crime incidents recorded in 2015 are only till May, those records have been removed for this analysis. The month of February is the safest and is observed to have the least crime incidents reported. October is the least safe with the maximum number of reported crime incidents.  Region wise distribution: A contour plot to represent the region wise density of crime leveraging the available latitude/longitude information of the reported crime, is as follows:
  • 4. A giant hotspot can be observed in the Southern and Tenderloin region with relatively less dense plots in the surrounding neighborhoods. Majority of the crime seems to be concentrated in these and surrounding regions. Plotting a line graph to represent crime in each region on each day of a week uncovers some interesting trends: Crime rate by day of the week:
  • 5. Clearly, the Southern region is the most notorious with the maximum number of crimes reported followed by the Northern region. Richmond is the safest place to be in San Francisco. The rate of crime is observed to increase over the weekend. The number of reported incidents seems to be the maximum on Fridays with a total number of 133,743 reported incidents. For almost all regions, the same trend can be observed. Tenderloin, however, is an exception as the crime rate in this region decreases over the weekend and is the highest on Wednesdays. Wednesday, Friday and Saturday are the most crime prominent days. Interestingly, the least amount of incidents were reported on Mondays (116,707 reported incidents) followed by Sundays. In the Southern, Northern, Central and Mission districts, the number of crimes increased sharply on Friday and Saturday, then declined for rest of the week.  Specific crime trends We examine the crime trends of a hand full of crimes (Kidnapping, Fraud, Robbery, Missing Person, Burglary, Vandalism, Vehicle Theft, Drug/Narcotics, Assault and Larceny/Theft). The following trends are observed: Interestingly, Drug/Narcotic related crimes decrease over the weekend (unlike other categories). The related reported incidents are the maximum on a Friday. Among the high crime categories, larceny and theft tend to occur on Friday and Saturday. On the other hand, the occurrences of assault steadily increased from Thursday to Sunday, while burglary generally occurred more often during the weekdays than the weekends. Drug crimes
  • 6. were most commonly reported on Wednesday and least reported during the weekends, and robberies happened by approximately the same frequency every day.  Hourly Crime Analysis The overall hourly crime trends are as follows: Hourly trend analysis for specific crimes:
  • 7. The hourly trends unravel some interesting crime facts:  5 am is the safest part of a day with 8,637 reported incidents and 6 pm is the most dangerous hour with 55,104 reported incidents.  Surprisingly, 12 pm is the second most dangerous hour during a day and in fact is the hour where incidents reported under some crime categories is maximum.  Kidnapping and stolen property incidents take place uniformly throughout the day Violent Crimes in San Francisco: Assault, Robbery and Sex Offences (forcible) Distribution: Violent crime density (each) by parts of day:  Assault: Part of Day Time Frame Early Morning 4am to 8am Morning 8am to 12pm Afternoon 12pm to 5 pm Evening 5pm to 9pm Night 9pm to 4am
  • 8. Distribution of Assault crimes is more or less the same at different times of the day.  Robbery: A slight shift in epicenter of the crime can be observed over different parts of the day.  Sex Offences(forcible): Different Patterns can be observed at different time with increase in density at night.
  • 9.  Larceny and Theft: Crime is spread across multiple regions early in the mornings and at night. It is concentrated on a single region in the afternoon. Food for thought  The following shows a bar graph representing the percentage of incidents which have been investigated by law enforcement agencies vs the ones that haven’t been. Surprisingly, for 61.02% of the reported incidents no conclusive action has been taken.
  • 10.  The following graph shows the top three streets where the maximum crime incidents were reported [Bryant Street, Market Street, Mission Street]: The police commission office is located on 850 Bryant Street which is just near the 800 Bryant Street which has the most crime rate in terms of streets. Market Street, with the second highest number of crime incidents reported, has a police station 0.5 miles away from it:
  • 11. Conclusion  Tenderloin and Southern are the PD districts needing special attention  Famous Neighborhoods have more crime rate  Violent crime seems to be concentrated around Tenderloin.  Assault is most common violent crime.  Crime rate is highest at 6 pm and lowest at 5 am with a spike at 12 in afternoon that means whenever there are people on the streets the crime rate is higher.  Pattern observed for each crime should be followed while deploying police personnel  SFPD needs to work more proactively as the 61% of cases are still not resolved  Also the crime rate near the police station needs to be decreased the SFPD needs to create terror in the minds of criminals.  Need to find out why the months February has the lowest and October has the highest crime commited  The second part of the Kaggle competetion that is predicting the classes of the crime has also been completed and in process for further improvement, the current rank is 672 out of 1886[4]. References [1] https://www.kaggle.com/c/sf-crime/data for Dataset [2] http://www.r-bloggers.com/google-maps-and-ggmap/ for google maps and using ggmap in R. [3] http://blog.dominodatalab.com/geographic-visualization-with-rs-ggmaps/ creating clusters and heatmaps in R [4] https://www.kaggle.com/c/sf-crime/leaderboard?submissionId=2963937 Kaggle competition submission