In today’s blogpost, we take a look at the crime statistics in Philadelphia, investigation from a “data scientist” perspective, so as to speak. This is my attempt at presenting crime in Philadelphia area from a data visualization perspective. Please feel free to add your thoughts and feedback in the comments section.
The dataset for this analysis was kindly contributed on the Kaggle website, by OpenDataPhilly. This dataset contains crime information over a 10-year period from 2006-2016, including location, police districts, type of offense, etc.
First, we look at the top 10 crimes over this entire period. (2006-2016)
Next we take a look at the police districts with the most number of crimes:
Third, we take a look at crime count by year. Data is only available until Aug 2016, which explains why 2016 shows a dramatic decrease. Disregarding data for 2016, we still see that crime rates have been decreasing every year.
Next we investigate if there are specific “hotspots” for specific types of crime category. We plot this on the Philadelphia map, using color coding. Red indicates high crime counts, green indicates low.
Maps for four different categories : thefts, residential burglary, narcotics and aggravated assault. Please review the legends for each map as the counts vary for each category. Notice the similarity in plots (and counts) for both burglary and aggravated assault.
Let us also look at any changes in crime categories over this ten year period. Thefts and burglaries of various kinds seem to be the largest segments, although vehicle-related thefts are decreasing steadily. Other assaults are another major segment, which does sound rather disturbing!
Crime by hour showed a very revealing picture, as seen in image below: (24-hour format)
- 2-4 pm seems to be the most dangerous time, with most crime categories showing a peak. My guess is this might be because most people would be too busy at work/ chores, to notice anything “fishy” in their neighborhoods.
- DUI crimes seem to occur mostly around 1-2 am. (probably coinciding with closing times?)
- “all other offenses” not surprisingly peaks in the wee hours of the morning 10pm-2am.
That’s it for my work as a ‘data-detective’. Once again please do feel free to share your own observations and feedback.
Until next time, Adieu!