The objective of this project is to conduct a comprehensive space-time exploration of crime data and crime types from April 2021 to March 2024, obtained from the metropolitan police. By analyzing the temporal and spatial patterns of crime, we aim to uncover insights that can inform law enforcement strategies and policy decisions. This project will utilize various statistical and data visualization techniques to identify trends, hotspots, and correlations in the crime data.
Understanding the dynamics of crime over time and space is crucial for effective crime prevention and resource allocation. By identifying temporal trends and spatial hotspots, law enforcement agencies can deploy resources more efficiently and develop targeted interventions. This study will provide valuable insights into the patterns of criminal activities, helping to improve public safety and reduce crime rates.
The dataset provided by the metropolitan police includes detailed records of crime incidents from April 2021 to March 2024. Each record contains multiple fields, which are described below:
-
Crime ID: A unique identifier for each crime incident.
- Count: 702,265
- Description: Each crime incident has a unique Crime ID to distinguish it from others.
-
Month: The month when the crime occurred.
- Count: 702,265 (no missing values)
- Description: The month is recorded to track the temporal pattern of crime incidents.
-
Reported by: The organization that reported the crime.
- Count: 702,265 (no missing values)
- Description: Indicates the reporting authority for the crime incident.
-
Falls within: The jurisdiction under which the crime falls.
- Count: 702,265 (no missing values)
- Description: Specifies the jurisdiction or geographical boundary.
-
Longitude: The longitude coordinate where the crime occurred.
- Count: 702,265 (no missing values)
- Description: Used for spatial analysis of crime locations.
-
Latitude: The latitude coordinate where the crime occurred.
- Count: 702,265 (no missing values)
- Description: Used for spatial analysis of crime locations.
-
Location: A textual description of the crime location.
- Count: 702,265 (no missing values)
- Description: Provides additional context about the crime location.
-
LSOA code: The Lower Layer Super Output Area code where the crime occurred.
- Count: 702,265 (no missing values)
- Description: Used for demographic and geographical analysis.
-
LSOA name: The name corresponding to the LSOA code.
- Count: 702,265 (no missing values)
- Description: Provides a readable name for the LSOA code.
-
Crime type: The category of the crime.
- Count: 702,265 (no missing values)
- Description: Categorizes the nature of the crime (e.g., burglary, robbery).
-
Last outcome category: The outcome of the crime investigation.
- Count: 702,265 (no missing values)
- Description: Indicates the final status or resolution of the crime.
-
Context: Any additional context or information about the crime.
- Count: 702,265 (no missing values)
- Description: Provides supplementary details.
- Data Cleaning and Preprocessing.ipynb: Notebook for cleaning and preparing the data for analysis.
- Exploratory Data Analysis.ipynb: Notebook containing various EDA techniques to understand the data.
- Spatial Analysis.ipynb: Notebook focusing on the spatial patterns and hotspots of crime incidents.
- Temporal Analysis.ipynb: Notebook focusing on the temporal trends and patterns in the crime data.
- Visualization.ipynb: Notebook containing various visualizations to represent the findings.
- crime_data.csv: The main dataset containing crime records from April 2021 to March 2024.
- Reports: Generated reports and findings from the analysis.
- Visualizations: Plots and maps generated from the data.
To run the notebooks and reproduce the analysis, you need to have Python installed along with the following packages:
- pandas
- numpy
- matplotlib
- seaborn
- geopandas
- folium
- jupyter
You can install the necessary packages using pip:
pip install pandas numpy matplotlib seaborn geopandas folium jupyter- Clone the repository.
- Navigate to the project directory.
- Launch Jupyter Notebook:
jupyter notebook- Open the desired notebook and run the cells to perform the analysis.
Contributions to this project are welcome. You can contribute by:
- Reporting issues
- Forking the repository and making changes
- Submitting pull requests
This project is licensed under the MIT License. See the LICENSE file for more details.
I would like to thank the metropolitan police for providing the crime data used in this analysis.