CodeAlpha Data Analytics Internship - Task 3
Author: Data Analytics Intern
Language: Python 3
Libraries Used: Pandas, Matplotlib, Seaborn
This project analyzes the retail sales performance of a Superstore across multiple product categories, geographic regions, customer segments, and time periods. The objective is to convert raw sales transaction data into clear, actionable business insights using data visualization techniques in Python.
- Data Preprocessing & Cleaning: Load, inspect, and clean the Superstore sales dataset (
train.csv), converting date fields and handling missing values. - Exploratory Data Analysis (EDA): Compute core business metrics including Total Revenue, Average Order Value, and Segmented Sales.
- Data Visualization: Design 4 publication-quality visualizations (saved at 300 DPI) to highlight regional, product, customer, and time-series patterns.
- Business Insight Identification: Extract strategic recommendations for inventory management, regional marketing, and customer targeting.
- Dataset Name: Superstore Sales Dataset (
train.csv) - File Location:
data/train.csv - Total Transactions: 9,800 records
- Total Variables: 18 attributes
- Date Range: 03 January 2015 – 30 December 2018
- Key Columns:
Order ID,Order Date,Ship Date,Ship ModeCustomer ID,Customer Name,Segment(Consumer,Corporate,Home Office)Country,City,State,Postal Code,Region(West,East,Central,South)Product ID,Category,Sub-Category,Product Name,Sales
| Visualization File | Chart Type | Key Business Insights |
|---|---|---|
📊 sales_by_category_region.png |
Grouped Bar Chart | West & East Regional Dominance: The West ($710.2k) and East ($669.5k) regions generate the highest sales across Technology, Furniture, and Office Supplies. The South ($389.2k) has the lowest sales across all categories, indicating growth opportunity. |
📊 sales_by_subcategory.png |
Horizontal Bar Chart | Product Leaders vs. Laggards: Phones ($328k) and Chairs ($323k) are the top 2 sub-categories generating maximum revenue. Fasteners, Labels, and Envelopes generate under $20k each. |
📊 monthly_sales_trend.png |
Time-Series Line Plot | Q4 Seasonal Peak: Sales display strong end-of-year seasonality, consistently spiking in November and December due to holiday shopping cycles. |
📊 sales_by_segment.png |
Segment Distribution Bar Chart | Consumer Segment Market Share: Individual Consumers account for 50.8% ($1.15M) of total sales, followed by Corporate clients (30.8%, $696.7k) and Home Office (18.4%, $415.7k). |
Task 3 Data Visualization/
├── data/
│ └── train.csv # Superstore sales raw dataset
├── monthly_sales_trend.png # Chart 3: Monthly Sales Trend (300 DPI)
├── requirements.txt # Project dependencies list
├── sales_analysis.py # Main Python data analysis & chart script
├── sales_by_category_region.png # Chart 1: Sales by Category & Region (300 DPI)
├── sales_by_segment.png # Chart 4: Sales by Customer Segment (300 DPI)
├── sales_by_subcategory.png # Chart 2: Sales by Sub-Category (300 DPI)
└── README.md # Documentation & Project Report
Make sure Python 3.8+ is installed on your system.
Navigate to the project root directory in your terminal:
cd "d:\Task 3 Data Visualization"Install Pandas, Matplotlib, and Seaborn using requirements.txt:
pip install -r requirements.txtExecute the main script to process data, display terminal statistics, and auto-generate all 4 charts:
python sales_analysis.py- Capitalize on Q4 Seasonality: Increase inventory stock and promotional campaigns starting in October to prepare for the November–December sales peak.
- Expand Southern Region Operations: Implement targeted marketing campaigns in Southern states to address the current revenue gap compared to Western and Eastern regions.
- Focus Marketing on High-Margin Sub-Categories: Prioritize ad spend on Phones, Chairs, and Storage while cross-selling low-margin items like Fasteners and Envelopes in bulk bundles.