This project contains a fully developed predictive analytics framework that analyzes cybercrime complaint data to forecast potential cash withdrawal locations used by cybercriminals.
The project is divided into two parts:
backend/: Python Flask API server running the Machine Learning model.frontend/: React + Vite frontend application with a predictive dashboard and interactive map.
- Open a terminal and navigate to the
backendfolder:cd backend - Create and activate a virtual environment (optional but recommended):
python -m venv venv venv\Scripts\activate
- Install the Python dependencies:
pip install -r requirements.txt
- Run the Flask server:
python app.py
Note: The first time it runs,
app.pywill automatically generate 1000 mock records indata/and train a Random Forest model inmodels/rf_model.pkl. This may take a few seconds.
The backend will be accessible at http://localhost:5000.
- Open a new terminal and navigate to the
frontendfolder:cd frontend - Install the Node dependencies:
npm install
- Run the Vite development server:
npm run dev
- Open your browser and navigate to the
http://localhost:5173(or the URL provided in the terminal terminal output).
- Backend: Python, Flask, Scikit-learn, Pandas
- Frontend: React.js, Vite, React-Leaflet, Axios, Vanilla CSS Variables (Dark theme)