Skip to content

Retail Sales Data Analyzer ๐Ÿ›๏ธ๐Ÿ“ˆ A Python-based tool to process, analyze, and visualize retail sales data using OOP, NumPy, Pandas, Matplotlib & Seaborn. Explore trends, generate insights, and visualize metrics with clean charts โ€” ideal for beginner data analysts & Python learners.

Notifications You must be signed in to change notification settings

ParthShah7099/Practical_Test_Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿช Retail Sales Data Analyzer

๐Ÿš€ Created by Parth Shah โ€” Visionary Developer | Data Enthusiast | Problem Solver
โ€œWhere Python meets retail intelligence.โ€


๐ŸŒŸ A Message from the Creator

Welcome to a data-driven revolution in retail analysis!
This isnโ€™t just a Python project โ€” itโ€™s a full-fledged data intelligence suite that brings clarity, precision, and power to raw sales data. I envisioned this project as a benchmark of clarity in code, elegance in design, and depth in functionality โ€” to show the world what a student can build when passion meets purpose.

Letโ€™s dive into the future of data analytics โ€” built with ๐Ÿง  logic, ๐Ÿ“Š insight, and ๐Ÿ’ป discipline.


๐Ÿ“š Table of Contents


๐ŸŽฏ Project Overview

๐Ÿ“ Objective

Develop a powerful Python-based Retail Sales Data Analyzer to:

  • Clean & validate input data ๐Ÿงผ
  • Analyze key metrics like Total Sales, Avg Sales, Top Product ๐Ÿ“Š
  • Filter, sort, and aggregate sales by custom logic ๐Ÿ”
  • Generate stunning visualizations using Matplotlib & Seaborn ๐Ÿ“ˆ

๐Ÿ” Problem Statement

Sales data is messy. Insights are buried.
Your job? Create a sleek command-line application that acts as a complete retail dashboard โ€” capable of processing, analyzing, and visualizing any .csv retail dataset.


๐Ÿงช Tech Stack

๐Ÿ›  Technology ๐Ÿ’ฌ Description
Python Core logic and scripting
NumPy Growth rates, numerical computation
Pandas Data loading, cleaning, analysis
Matplotlib Line & bar charts
Seaborn Aesthetic statistical plots

โš™๏ธ Features & Functionalities

๐Ÿ› ๏ธ Core Functionalities

  • โœ… Load & Validate CSV Retail Data
  • ๐Ÿงผ Check & Clean Missing Values
  • ๐Ÿ“Š Calculate Key Metrics:
    • Total Sales
    • Average Sales
    • Most Popular Product
  • ๐Ÿงฎ Generate Computed Columns:
    • Sales Percentage
    • Cumulative Sales
    • High Sales Flag
  • ๐Ÿ“‚ Filter Records:
    • By Category
    • By Date Range
  • ๐Ÿ“‰ NumPy-Based Growth Metrics:
    • Growth Rate Calculation
    • Sales Percentages
  • ๐Ÿ”ข Aggregate Sales:
    • By Product
    • By Category
    • By Date
  • ๐Ÿ“ˆ Visualizations:
    • Bar Chart (Sales by Category)
    • Line Plot (Sales Over Time)
    • Heatmap (Correlation of Price & Quantity)
  • ๐Ÿ’พ Save Any Chart to PNG File

โœ… Data Input & Validation โ€” Upload CSV, verify format, detect missing values
โœ… Object-Oriented Architecture โ€” Encapsulated methods for data loading, filtering, metrics
โœ… Data Manipulation โ€” Clean, compute new columns, aggregate by logic
โœ… NumPy Metrics โ€” Sales %, growth rate
โœ… Visualization Suite โ€” Bar chart, line chart, heatmap
โœ… User Interaction โ€” Console-driven menus for ease of use


๐Ÿง  Behind the Code

Every function was crafted to demonstrate Python best practices:

  • ๐Ÿงผ Control structure for validation and cleaning
  • ๐Ÿ’ก OOP structure with a RetailAnalyzer class
  • ๐Ÿ”ฌ Use of NumPy for array-based metric analysis
  • ๐Ÿงน Pandas for smart data wrangling
  • ๐Ÿ“ˆ Beautiful plots with Matplotlib and Seaborn

๐Ÿ“Š Demo & Screenshots

๐Ÿงญ Main Menu

Main Menu

๐Ÿ“Š Total Sales by Category

Bar Chart

๐Ÿ“ˆ Sales Over Time

Line Chart

๐Ÿ”ฅ Price vs Quantity Correlation

Heat Map


๐Ÿš€ How to Use

  1. Clone this repository:
    git clone https://github.com/yourusername/retail-sales-analyzer.git
    cd retail-sales-analyzer
  2. Install dependencies:
    pip install -r requirements.txt
  3. Run the program:
    python Visualizer.py
  4. Upload the Superstore.csv file and interact via the terminal-based menu.

๐Ÿ’ฌ FAQs

๐Ÿ“ What should my CSV file look like? Columns: Date, Product, Category, Price, Quantity Sold, Total Sales
โš ๏ธ Getting error loading file? Ensure it's a `.csv` with proper column names and structure.
๐Ÿ“ˆ How do I save charts? You'll be prompted after viewing the chart.

๐Ÿ“ Project Structure

Retail-Sales-Data-Analyzer/
โ”œโ”€โ”€ retail_analyzer.py
โ”œโ”€โ”€ retail_sales.csv
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ requirements.txt
โ””โ”€โ”€ images/
    โ”œโ”€โ”€ Demo_1.png
    โ”œโ”€โ”€ BarChart.png
    โ”œโ”€โ”€ LineChart.png
    โ””โ”€โ”€ HeatMap.png

โš™๏ธ Installation & Setup

pip install -r requirements.txt
python retail_analyzer.py

๐Ÿ–ผ Image Upload Guide (For Mac + VS Code)

  1. Create a folder called images
  2. Place all screenshots inside it
  3. Use Markdown like:
![Alt Text](./images/filename.png)

โœ… Use clean names like chart1.png, demo_main.png, etc.


โœจ Highlights

  • ๐Ÿง  Pure Python logic โ€” ideal for educational & real-world datasets.
  • ๐Ÿ“‹ Modular, reusable, and scalable code design.
  • ๐Ÿ–ฅ๏ธ Clean and interactive terminal interface.
  • ๐Ÿ“‰ Professional-quality charts using Seaborn and Matplotlib.
  • ๐Ÿ“ Built for beginners, coded like a pro.

๐ŸŒŸ Final Thoughts + Letโ€™s Connect

Made with ๐Ÿง , ๐Ÿ”ฅ, and ๐Ÿ’™ by The Parth Shah.

If this helped you or inspired you in any way:

  • โญ Star this repo
  • ๐Ÿ’ฌ Share your feedback
  • ๐Ÿค Letโ€™s connect on LinkedIn

โ€œI donโ€™t just code. I craft data-driven experiences.โ€ โ€” THE PARTH SHAH


About

Retail Sales Data Analyzer ๐Ÿ›๏ธ๐Ÿ“ˆ A Python-based tool to process, analyze, and visualize retail sales data using OOP, NumPy, Pandas, Matplotlib & Seaborn. Explore trends, generate insights, and visualize metrics with clean charts โ€” ideal for beginner data analysts & Python learners.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages