Skip to content

About

Data Science Project: Analyzing Superstore sales and profitability using Python, pandas, and visualization to identify customer profitability, low-profit product categories, monthly sales trends, and global market demand patterns.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

16 Commits

Folders and files

Repository files navigation

Project: Superstore Sales and Profitability Analysis

This project analyzes the Superstore retail dataset to understand customer profitability, product sub-category performance, monthly category-level sales trends, and global market sales patterns. The Python script uses pandas for data preparation and summary analysis, and matplotlib/seaborn to generate visualizations saved to the results/ folder.

Dataset

The project expects the dataset file to be named:

superstore.csv

Place superstore.csv in the same directory where the script is run.

Original dataset reference

Tableau Software. (n.d.). Sample - Superstore [Data set]. Tableau Public Sample Data. Retrieved June 25, 2026, from https://public.tableau.com/app/learn/sample-data

Language and Tool Versions

The analysis was developed and tested using:

  • Python Version: 3.13.3
  • Platform/OS: macOS-13.7.8-x86_64-i386-64bit-Mach-O

The recommended package versions are provided in requirements.txt.

Installation

pip install -r requirements.txt

How to Run

python superstore_analysis.py

The script prints summary tables to the console and saves all generated figures to the results/ folder.

Project Files

The results/ folder is created automatically by the script.

SuperstoreAnalysis/
├── superstore_analysis.py
├── superstore.csv
├── requirements.txt
├── README.md
└── results/
    ├── analysis_1_top_10_profitable_customers.png
    ├── analysis_2_negative_profit_subcategories.png
    ├── analysis_3_category_sales_trend.png
    └── analysis_4_market_subcategory_sales_pattern.png

Key Outputs

Analysis 1: Customer Profitability and Regular Customers

This analysis calculates each customer's order frequency and total profit. Customers are classified as regular customers when their order frequency is above the median customer order frequency. The analysis also identifies the top 10 most profitable customers.

Generated outputs:

  • Printed table of average profit for regular vs. non-regular customers
  • Printed table of the top 10 most profitable customers
  • results/analysis_1_top_10_profitable_customers.png

Analysis 1

Analysis 2: Lowest Profit Product Sub-Categories

This analysis summarizes total profit by product sub-category and identifies the five sub-categories with the lowest profit. The visualization highlights which product areas are contributing the least to profitability, including any sub-categories with negative total profit.

Generated outputs:

  • Printed table of the five lowest-profit product sub-categories
  • results/analysis_2_negative_profit_subcategories.png

Analysis 2

Analysis 3: Monthly Sales Trends by Product Category

This analysis converts order dates into monthly periods and summarizes total monthly sales by product category. The line plot shows how sales changed over time across the main product categories.

Generated outputs:

  • Monthly sales trend visualization
  • results/analysis_3_category_sales_trend.png

Analysis 3

Analysis 4: Product Sub-Category Sales Patterns Across Global Markets

This analysis summarizes total sales for each product sub-category within each global market. It identifies the top-selling sub-category in each market and uses a heatmap to compare sales patterns across markets.

Generated outputs:

  • Printed table of the top-selling sub-category in each market
  • results/analysis_4_market_subcategory_sales_pattern.png

Analysis 4

Script Design

The script is organized into reusable functions so that outputs from one analysis can be used by downstream analyses if needed. Each analysis section has its own #region and #endregion block.

The main workflow is controlled by:

if __name__ == "__main__":
    main()

This allows the script to be run directly while keeping the functions reusable.

Notes

  • The script assumes that superstore.csv is located in the current working directory.
  • The results/ folder is created automatically if it does not already exist.
  • All plots are saved as .png files.
  • Summary tables are printed to the console.
  • The script ends with # [END] for clear file completion.

Contributions

Author of this project is Anjali Silva. This project welcomes issues, enhancement requests, and other contributions. To submit an issue, use the GitHub issues page: https://github.com/anjalisilva/SuperstoreAnalysis/issues

About

Data Science Project: Analyzing Superstore sales and profitability using Python, pandas, and visualization to identify customer profitability, low-profit product categories, monthly sales trends, and global market demand patterns.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages