Skip to content

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 ๐Ÿ“Š๐Ÿ‡ฎ๐Ÿ‡ณ

Notifications You must be signed in to change notification settings

786imran786/CrimeDashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

CrimeDashboard

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 ๐Ÿ“Š๐Ÿ‡ฎ๐Ÿ‡ณ

Crime Statistics Dashboard - India

Dashboard Screenshot

Overview

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.

Features

  • 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

Technologies Used

Backend

  • Python 3
  • Flask (Web Framework)
  • Pandas (Data Analysis)
  • Matplotlib/Seaborn (Visualization)

Frontend

  • HTML5, CSS3
  • JavaScript (Interactive elements)
  • Plotly.js (Alternative visualizations)

Data

  • National Crime Records Bureau (NCRB) dataset
  • Preprocessed CSV format

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/crime-statistics-dashboard.git
    cd crime-statistics-dashboard
  2. Create and activate a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install dependencies:

    pip install -r requirements.txt
  4. Run the application:

    python app.py
  5. Access the dashboard at:

    http://localhost:5000
    

Project Structure

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

Usage Guide

  1. Home Page: Overview of dashboard capabilities
  2. Predefined Analysis: Select from 6 specialized crime visualizations
  3. Custom Analysis: Create your own visualizations by choosing:
    • Data columns for X/Y axes
    • Plot type (bar, line, scatter, pie)
  4. About Page: Developer information and project background

Customization

To use your own dataset:

  1. Replace main.csv with your data file
  2. Update column names in app.py if different
  3. Modify visualization parameters as needed

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/your-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin feature/your-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

Mohd Imran Siddiqui


This project was developed as part of academic studies at Lovely Professional University, specializing in Data Science.

About

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 ๐Ÿ“Š๐Ÿ‡ฎ๐Ÿ‡ณ

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published