Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Retail Sales Analysis using Python

Project Overview

This project analyzes a retail sales dataset to uncover actionable business insights using Python and its data analysis ecosystem. The analysis focuses on identifying sales trends, customer purchasing behavior, product performance, geographic sales distribution, and shipping preferences through exploratory data analysis (EDA).

The project demonstrates the complete data analysis workflow, including data cleaning, feature engineering, exploratory data analysis, data visualization, and business recommendations to support data-driven decision-making.

Objectives

  • Analyze overall sales performance using key performance indicators (KPIs).
  • Identify top-performing products, categories, and sub-categories.
  • Discover regional and city-wise sales trends.
  • Analyze customer segments and high-value customers.
  • Study monthly sales trends and seasonality.
  • Evaluate shipping mode performance.
  • Generate actionable business recommendations based on data-driven insights.

Dataset Information

Dataset: Superstore Sales Dataset

The dataset contains transactional retail sales data, including:

  • Order Details
  • Customer Information
  • Product Information
  • Sales
  • Geographic Information
  • Shipping Information
  • Order and Shipping Dates

This dataset was used to simulate a real-world business scenario where a retail company seeks insights to improve sales performance and customer satisfaction.

Technologies Used

Category Tools
Programming Language Python
Data Analysis Pandas, NumPy
Data Visualization Matplotlib, Seaborn
Development Environment Jupyter Notebook

Project Workflow

  1. Data Loading
  2. Data Cleaning
  3. Exploratory Data Analysis (EDA)
  4. Feature Engineering
  5. Sales & Customer Analysis
  6. Geographic Analysis
  7. Time Series Analysis
  8. Business Insights
  9. Business Recommendations

Business Questions

This project aims to answer the following business questions:

  1. What is the overall sales performance of the business?
  2. Which products generate the highest revenue?
  3. Which product category and sub-category contribute the most to total sales?
  4. Which geographic regions, states, and cities perform the best?
  5. How do monthly sales change over time?
  6. Which month generates the highest revenue?
  7. Which customer segment contributes the highest revenue?
  8. Which shipping mode generates the highest revenue?
  9. Who are the top revenue-generating customers?
  10. What business recommendations can be made based on the analysis?

Key Insights

  • The Technology category generated the highest overall revenue among all product categories.
  • Phones emerged as the highest revenue-generating sub-category.
  • The West region contributed the highest share of total sales.
  • California was the highest revenue-generating state, while New York City generated the highest city-level revenue.
  • November recorded the highest sales, indicating strong seasonal demand.
  • Sales showed an overall upward trend over the observed period.
  • The Consumer segment generated the highest revenue among all customer segments.
  • Standard Class shipping contributed the highest overall revenue.
  • A small group of customers generated significantly higher revenue than the rest, highlighting the importance of customer retention strategies.

Business Recommendations

  • Increase investment in the Technology category to maximize revenue growth.
  • Ensure sufficient inventory for high-performing products, especially within the Phones sub-category.
  • Prioritize marketing campaigns in high-performing regions such as the West region and California.
  • Prepare inventory and promotional campaigns before November to capitalize on seasonal demand.
  • Maintain efficient Standard Class shipping operations to support the largest revenue-generating shipping mode.
  • Strengthen customer retention initiatives for the Consumer segment through loyalty programs and personalized offers.
  • Develop targeted engagement strategies for high-value customers to encourage repeat purchases.
  • Continuously monitor regional and monthly sales trends to support data-driven business decisions.

Project Highlights

✔ Performed end-to-end data cleaning and preprocessing.

✔ Applied feature engineering by creating delivery time and monthly sales features.

✔ Conducted exploratory data analysis (EDA) using Pandas.

✔ Created professional visualizations using Matplotlib and Seaborn.

✔ Derived actionable business insights from sales, customer, and geographic data.

✔ Translated analytical findings into business recommendations.

Repository Structure

Retail-Sales-Analysis/
│
├── .gitignore
├── README.md
├── requirements.txt
├── Retail_Sales_Analysis.ipynb
├── train.csv
├── images/
│   ├── Customer_Segment_Analysis.png
│   ├── Monthly_Sales_Trend.png
│   ├── Revenue_by_Region.png
│   ├── Revenue_by_State.png
│   ├── Shipping_Mode_Analysis.png
│   ├── Top_10_products_by_revenue.png
│   └── Top_Customers_by_Revenue.png
└── .venv/    ← Present locally but ignored by Git

Project Screenshots

The notebook contains several visualizations that highlight key business insights, including:

  • Top Revenue-Generating Products Top Revenue-Generating Products

  • Monthly Sales Trend Monthly Sales Trend

  • Revenue by Region Revenue by Region

  • Revenue by State Revenue by State

  • Customer Segment Analysis Customer Segment Analysis

  • Shipping Mode Analysis Shipping Mode Analysis

  • Top Customers by Revenue Top Customers by Revenue

How to Run the Project

  1. Clone the repository.
git clone https://github.com/your-username/Retail-Sales-Analysis.git
  1. Navigate to the project directory.
cd Retail-Sales-Analysis
  1. Install the required libraries.
pip install pandas numpy matplotlib seaborn jupyter
  1. Launch Jupyter Notebook.
jupyter notebook
  1. Open Retail_Sales_Analysis.ipynb and run the notebook.

Future Improvements

  • Build an interactive Power BI dashboard.
  • Create a sales forecasting model using machine learning.
  • Perform customer segmentation using clustering techniques.
  • Develop an interactive dashboard using Streamlit.
  • Expand the analysis by incorporating additional business metrics such as profit and discounts.

Author

Ayush Dobhal

If you found this project helpful, consider giving it a ⭐ on GitHub.

About

End-to-end retail sales analysis using Python, Pandas, NumPy, Matplotlib, and Seaborn to uncover actionable business insights.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages