Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

© 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

sanaipei01/crime-hotspot-prediction-kenya

Domain:

peace and securitygeospatial

Record type:

softwaremodel
Creator:
san
Host:
# Crime Hotspot Detection and Prediction System ## Overview This project is a Machine Learning and Graph Neural Network (GNN)-based system for detecting, predicting, and visualizing crime hotspots in Nairobi, Kenya. The system analyzes crime data, identifies high-risk locations, generates hotspot maps, and proposes optimized patrol routes and resource allocation strategies for law enforcement agencies. The project combines: * Exploratory Data Analysis (EDA) * Feature Engineering * Graph Construction * Graph Neural Network (GNN) Modeling * Crime Hotspot Prediction * Patrol Route Optimization * Resource Allocation Visualization --- ## Problem Statement Urban crime rates in Kenya continue to rise, creating safety challenges for citizens and law enforcement agencies. Traditional crime monitoring methods are often reactive rather than predictive. This project aims to develop an intelligent crime hotspot prediction system capable of identifying high-risk areas and assisting security agencies in proactive patrol planning and resource deployment. --- ## Objectives ### Main Objective To develop a Machine Learning-based crime hotspot detection and prediction system using Graph Neural Networks. ### Specific Objectives * Analyze crime patterns in Nairobi * Identify crime hotspots * Build predictive crime models using GNNs * Visualize hotspot regions on maps * Generate optimized patrol routes * Improve security resource allocation --- ## Technologies Used * Python * Pandas * NumPy * Matplotlib * Seaborn * Scikit-learn * PyTorch * PyTorch Geometric (GNN) * Folium * NetworkX --- ## Project Structure ```text CRIME-HOTSPOT-DETECTION/ │ ├── .venv/ ├── nairobi_crime_hotspot_detection/ │ ├── NairobiCrime_datasetFINAL.csv ├── best_gnn_model.pth │ ├── crime_eda.png ├── training_history.png ├── confusion_matrix.png ├── hotspot_map_static.png ├── patrol_route.png ├── resource_allocation.png ├── crime_hotspot_map.html │ ├── README.md ``` --- ## Workflow 1. Data Loadin …

Visit

github.com