📌 Project Description
This project is a web-based crime analysis and visualization system built using React and K-Means clustering. It analyzes historical crime data and groups regions into clusters representing Low, Medium, and High crime risk zones. The system is designed to assist law enforcement agencies and researchers in understanding crime patterns through interactive dashboards and visual analytics.
The application simulates crime data, applies the K-Means algorithm on crime rate and frequency, and visualizes the results using charts and cluster plots.
🧠 Key Features
Interactive K-Means clustering
Dynamic selection of number of clusters (K)
Crime risk classification (Low / Medium / High)
Elbow Method for optimal K selection
Silhouette Score for cluster quality
Crime type and regional analysis
Real-time data regeneration
Clean, modern UI with multiple analysis tabs
🛠️ Tech Stack
Frontend: React.js
Visualization: Recharts
Icons: Lucide-react
Styling: Tailwind CSS
Algorithm: K-Means (implemented in JavaScript)
📂 Project Structure src/ ├── CrimePredictionSystem.jsx ├── index.js ├── App.js └── styles/
⚙️ How It Works
Crime data is generated with attributes like region, crime rate, frequency, and type
Data is preprocessed and normalized
K-Means clustering groups similar crime records
Clusters are analyzed to determine risk levels
Results are visualized using charts and scatter plots
📊 Modules
Dashboard: Overall crime statistics
Clustering: Interactive K-Means visualization
Analysis: Elbow & silhouette methods
Preprocessing: Data cleaning steps
Comparison: Algorithm comparison & limitations
🚀 How to Run npm install npm start
📈 Future Enhancements
Real crime dataset integration
Backend with Python/Flask
GIS-based crime heatmaps
Predictive crime forecasting models.
Log in or sign up for Devpost to join the conversation.