Skip to content

redbramble/retail_sales_analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Retail Sales Analysis

This project replicates an Excel Pivot Table analysis using Python. It reads retail sales data from an Excel file and produces summary statistics and visualisations using pandas, matplotlib, and seaborn.

Files

  • script.py: Main Python script
  • retail_sales_xlsx: Excel Spreadsheet containing data to be transformed
  • requirements.txt: List of Python package dependencies
  • /visualisation/: Folder where generated charts are saved
  • README.txt: This file

Features

  • Reads sales data from an Excel file (retail_sales_data.xlsx)
  • Converts date fields to proper datetime format
  • Extracts year and month information for time-based analysis
  • Creates a pivot-like summary table (Region x Category)
  • Produces the following visualisations:
    • Total Sales by Region (bar chart)
    • Sales by Region and Category (grouped bar chart)
    • Yearly Sales by Category (bar chart)

How to Run

  1. Set up a virtual environment:
  • python -m venv venv
  • source venv/bin/activate
  1. Install dependencies:
  • pip install -r requirements.txt
  1. Run the script:
  • python script.py

This will output a pivot summary table in the terminal and save visualisations to the visualisation/ folder.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages