

Crime Analysis: Seattle Edition
An analysis of Seattle Police Department Crime data
Overview
​
In this blog, we will analyze Seattle's crime data to provide important insights into patterns and trends related to criminal activity. This information can be used to develop effective crime prevention strategies, allocate resources to areas with high crime rates, and improve law enforcement operations.
​
This analysis will also help us identify specific types of crimes that are on the rise, allowing law enforcement agencies to focus their efforts on combating those specific crimes. In addition, it will also help to identify areas or groups that are particularly vulnerable to criminal activity, and inform efforts to address underlying social and economic factors that contribute to crime. Ultimately, analyzing crime data can lead to more effective and efficient law enforcement, improved public safety, and stronger communities.
​

Dataset for Analysis : The dataset was derived from Seattle GeoData’s Open Data Program
Questions to consider

What is the overall crime rate in Seattle, and how has it changed over time?

Which neighborhoods have the highest and lowest crime rates, and how do these rates compare to each other and to the citywide average?

What types of crimes are most common in Seattle, and how have the frequency and distribution of these crimes changed over time?

Are there any patterns or trends in the timing or types of crimes in Seattle, such as a higher incidence of certain crimes during certain times of day?

How does the number of crimes vary for each offense category based on the day of the week? Is the trend different during weekday or weekend?
Crime Rate in Seattle by Year

Based on the dataset used, over 54000 crimes are reported every year on an average. It provides insights into the crime trends and patterns over time.
The graph shows the trend in the total number of crimes in Seattle from 2008 to 2022. There is a sharp decline in the number of crimes from 2020 to 2021, which may be due to the COVID-19 pandemic and the resulting lockdowns and social distancing measures. It is interesting to note that the number of crimes in 2020 seems to have slightly increased compared to the previous year, but it is still significantly lower than the number of crimes in earlier years. The highest number of crimes were reported in 2018, with a steady decline in the subsequent years. Overall, the graph suggests that Seattle has experienced a reduction in crime over the years. However, it is important to note that this analysis is based on the number of crimes reported, and other factors such as changes in reporting methods and policies, changes in population, and changes in law enforcement strategies may also contribute to the observed trends.
What is the overall crime rate in Seattle, and how has it changed over time?
Number of crimes/ Crime rate by Location
.png)
.png)
Which neighborhoods have the highest and lowest crime rates, and how do these rates compare to each other and to the citywide average?
​
The chart shows different crime hotspots in Seattle city with Downtown Commercial taking the lead with 16.5% crime rate, followed by Capitol Hill, Northgate and Queen Anne. These neighborhoods have a significantly higher crime rate compared to the others, with these locations accounting for around 50% of the total crime rate. The rest of the locations have a similar crime rate, each accounting for between 5% and 10% of the total crime rate.
​
This information can be used by law enforcement and city officials to prioritize crime prevention and intervention efforts in the areas with the highest crime rates. It can also be informative for residents and visitors to the city who may want to avoid or take extra precautions in these high-crime areas.
Different crimes and their Frequency with Time
.png)
.png)
What types of crimes are most common in Seattle, and how have the frequency and distribution of these crimes changed over time?
​
Looking at the graph, we can see that the top 3 categories of crimes in Seattle are "Theft","Assault" and "Burglary". These three categories account for 85% of the total crimes. This shows that these crimes are much more common in Seattle compared to other types. This can inform law enforcement and policymakers on where to allocate resources and focus their efforts in preventing and addressing these types of crimes.
This graph can also provide insights into the overall crime trends in Seattle over time. For instance, we can see that there was a significant increase in crime from 2013 to 2018, with a slight decline in recent years. This information can be useful for identifying potential causes and implementing strategies to reduce crime in the future.
Number of crimes by Time
Are there any patterns or trends in the timing or types of crimes in Seattle, such as a higher incidence of certain crimes during certain times of day?
This line plot shows the number of crimes committed during each hour of the day. We can observe that the number of crimes in Seattle start peaking from 7 AM till 8 PM in the evening. There are peaks around 11 AM and 5 PM, which is likely due to increased activity during day and evening hours. The number of crimes then gradually decreases throughout the evening and early morning hours before reaching a low point around 4 AM. This analysis suggests that there are certain times of the day when crime is more likely to occur in Seattle, and that the city's law enforcement and public safety efforts could potentially be targeted towards these high-crime periods.
.png)
.png)
From the plot, it can be observed that the number of offenses is highest during the afternoon and early evening hours, particularly between 4PM and 8PM. The offenses related to drug offenses are highest between 12PM and 6PM, while thefts occur more frequently during the day than at night. The offenses related to assaults and weapons tend to occur more frequently during the night time.
This analysis provides insights into the pattern of crimes occurring throughout the day and can be useful for law enforcement agencies in deciding the optimal time to deploy police resources. Additionally, it provides information on the types of crimes that are more likely to occur during specific times of the day, which can be used to inform crime prevention strategies.
Crime Categories and Variations by Day of the Week
How does the number of crimes vary for each offense category based on the day of the week? Is the trend different during weekday or weekend?
.png)
.png)
By looking at the chart, we can see that crimes are generally evenly distributed across the days of the week, with slightly higher proportions of crimes committed on Fridays and Saturdays. This suggests that weekends may be busier times for criminal activity.
In addition, the chart provides a visual representation of the total number of offenses committed during the time period of the data. The custom legend shows the count and percentage of offenses committed on each day of the week, allowing us to compare the absolute number of offenses across different days.
From this graph, we can analyze the total number of crimes by offense category and day of the week. It shows the the top three offense categories, which have the highest total number of crimes across all days of the week, are Larceny, Drug/Narcotic, and Assault. We can also see that the number of offenses varies across different days of the week for each offense category. This suggests that different types of crimes may have different patterns or trends based on the day of the week.
Tools Used







Conclusion
Based on the analysis presented in the blog, comprehensive and collaborative approach involving law enforcement, community members, and government agencies is necessary to address and prevent crime in Seattle.
It can be concluded that:​
-
Increase investment in education and job training programs to address underlying social and economic factors that contribute to criminal activity.
-
Implement proactive policing strategies such as hotspot policing and predictive policing to target high-crime areas and prevent crime before it occurs.
-
Enhance public safety measures such as improving street lighting, increasing surveillance, and installing security systems in high-crime areas.
-
Increase resources for drug and alcohol treatment programs to address substance abuse, which is a significant driver of criminal activity.
-
Enhance coordination between law enforcement agencies, community organizations, and government agencies to develop comprehensive strategies for preventing and responding to crime.
References
https://data.seattle.gov/Public-Safety/SPD-Crime-Data-2008-Present/tazs-3rd5
https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.plot.area.html
https://seaborn.pydata.org/tutorial/color_palettes.html
https://www.geeksforgeeks.org/plotting-multiple-bar-charts-using-matplotlib-in-python/
https://datatoanalytics.wordpress.com/2016/10/17/data-visualization-in-python-using-seaborn/