Skip to content

yashasvimisra2798/Crime-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Denver Crime Analysis

Introduction

It is seen that in many cities when crime is rampant, a dataset is generated to help authorities by bringing out insights and take better decisions for allocating resources. Here we try to analyse the occurrence of crimes in Denver a city in Colorado. We use this dataset to understand the pattern of crimes to possibly enable better action against them.


Methodology

I conducted exploratory data analysis and generated various visualizations. These were done using python libraries including Seaborn and Folium. They were very helpful to draw insights from the data and also reach certain conclusions. Further insights are explained in following sections.


Data

This dataset includes criminal offenses in the City and County of Denver for the previous five years plus the current year to date. It is based on the National Incident Based Reporting System (NIBRS). It is dynamic, which allows for additions, deletions and/or modifications at any time, resulting in more accurate and updated information in the database.


Exploratory Data Analysis(EDA)

I conducted descriptive analysis about these features, by their statistical values or distribution plots. Then I further explored the correlation between the features.

  • Here is a Heatmap to show the correlation between different features:
  • The features with Null values are visualised here using bar plots:
  • Year with the highest number of crimes:
  • Month with the highest number of crimes:
  • Day of the month with the highest number of crimes:
  • Most dangerous hours of the day:
  • The district with the highest number of crimes till date:
  • Which Precinct is most dangerous?
  • The number of crime precincts in different districts:
  • Which crime is most prevalent in wich hour?
  • Which crime is most prevalent on which day of the month?
  • Which crime is most prevalent in which month?
  • Which neighborhood is most dangerous?
  • Which is neighborhood is the safest?
  • Which crime category has the highest frequency?
  • All-other-crimes has the highest frequency of crimes, so we do in-depth analysis of All-other-crimes:
  • To conclude the Analysis we plot a heatmap using folium over the regions in Denver where crimes related to drug and alcohol are the most.

Conclusion

The whole analysis shows which specific year, day, month, district, precinct and neighbourhood is most prone to crimes. This can be very helpful to authorities to act in a specific and a smart manner by targeting those particular dangerous districts, hours, days, months and precincts. The comparisons and in-depth analysis gives a much better insight to the patterns of these crimes which may help in following and catching the criminals to stop more henious crimes that might take place in the future. The seaborn library of python was used to give synthetic visualisations and folium library was used in the end to give regional visualization of the crimes related to drug and alcohol.