Shadow is a comprehensive web application that enables law enforcement agencies to gain valuable insights into crime patterns and trends within the state of Karnataka. This application leverages the power of the Mistral Large Language Model (LLM) to analyze various crime data, providing police officers with a deep understanding of the underlying factors and potential drivers of criminal activities.
- Clone the repository:
git clone https://github.com/Varun-2538/Shadow
- Install dependencies:
- Frontend:
cd heatmap-frontend && npm install --legacy-peer-deps
- Backend:
cd heatmap-backend && npm install
- Python:
cd models && pip install -r requirements.txt
- Frontend:
- Set up Environment Variables:
- Using the
.env.example
file, create a.env
file in your models folder. - You can get your
env
from huggingface.
- Using the
- Start the development server:
- Backend:
node server.js
- Python:
python app.py
/uvicorn app:app --reload
- Frontend:
npm start
- Backend:
- Open your web browser and navigate to
http://localhost:3000
to access the Predictive Crime Analysis application.
-
Spatial Analysis:
- Officers can select specific districts and police stations within the state of Karnataka.
- The application displays a heatmap visualization on a Leaflet map, highlighting the geographic hotspots of criminal activity.
-
Graphical Data Representation:
- The application presents the crime data in an easy-to-understand graphical format, including charts and graphs.
- This visual representation allows police officers, to quickly identify patterns and trends in the data.
-
Mistral LLM Analysis:
- The Mistral LLM, a state-of-the-art natural language processing model, is integrated into the application to perform advanced data analysis.
- The LLM-powered analysis compares and contrasts the various crime data fields, uncovering potential connections and providing insights into the possible reasons for the criminal activities in specific areas.
-
Temporal Analysis:
- This feature will incorporate time-series analysis to identify patterns and trends in crime data over time.
- The analysis will consider factors such as holidays, elections, and other events that may influence crime rates.
-
Beatwise Analysis:
- This feature will compare the crime data and patterns across different police stations.
- It will provide insights into the specific crime types and focus areas of each police station, enabling more efficient resource allocation and targeted interventions.
-
Crime Prediction
- This feature forecasts potential crimes based on specified month ranges or time ranges for given districts and units.
- It correlates historical data with current trends to provide precise predictions, aiding proactive crime prevention.
-
Deployment Plan:
- This feature suggests optimized deployment strategies for police officers based on crime prediction data.
- It aims to maximize resource allocation efficiency and combat anticipated criminal activities effectively.
- React.js
- Leaflet Map API
- TailwindCSS
- Chart.js
- Node.js
- Express.js
- Flask
- Hugging Face
- NumPy
- Pandas
- Mistral LLM
This project is licensed under the Apache License