Crime Data Analysis & Visualization in Python ๐ Just wrapped up an insightful project using Pandas, Matplotlib, and Seaborn to dig deep into crime statistics across Indian districts and states ๐๐ฎ๐ณ
This interactive dashboard visualizes crime statistics across India in 2014. Built with Python Flask and modern web technologies, it provides both predefined analyses and customizable visualizations of crime patterns.
-
Predefined Crime Analysis: 6 specialized visualizations including:
- Top crime states
- Violent crime distribution
- Women-related crimes
- Property crimes
- Crime trends over time
- Crime type correlations
-
Custom Analysis: Build your own visualizations by selecting:
- X/Y axis columns
- Plot type (bar, line, scatter, pie)
-
Dark Neon Theme: Cohesive visual design with crime-themed aesthetics
-
Responsive Design: Works on desktop and mobile devices
- Python 3
- Flask (Web Framework)
- Pandas (Data Analysis)
- Matplotlib/Seaborn (Visualization)
- HTML5, CSS3
- JavaScript (Interactive elements)
- Plotly.js (Alternative visualizations)
- National Crime Records Bureau (NCRB) dataset
- Preprocessed CSV format
-
Clone the repository:
git clone https://github.com/yourusername/crime-statistics-dashboard.git cd crime-statistics-dashboard -
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
Run the application:
python app.py
-
Access the dashboard at:
http://localhost:5000
crime-dashboard/
โโโ app.py # Main Flask application
โโโ main.csv # Crime dataset
โโโ requirements.txt # Python dependencies
โโโ static/
โ โโโ css/ # Stylesheets
โ โโโ js/ # JavaScript files
โ โโโ images/ # Static images
โโโ templates/ # HTML templates
โโโ base.html # Base template
โโโ index.html # Home page
โโโ predefined.html # Predefined analysis
โโโ custom.html # Custom analysis
โโโ about.html # About page
- Home Page: Overview of dashboard capabilities
- Predefined Analysis: Select from 6 specialized crime visualizations
- Custom Analysis: Create your own visualizations by choosing:
- Data columns for X/Y axes
- Plot type (bar, line, scatter, pie)
- About Page: Developer information and project background
To use your own dataset:
- Replace
main.csvwith your data file - Update column names in
app.pyif different - Modify visualization parameters as needed
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create your feature branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin feature/your-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Mohd Imran Siddiqui
- GitHub: @786imran786
- Email: [email protected]
- LinkedIn: yourprofile
This project was developed as part of academic studies at Lovely Professional University, specializing in Data Science.
