Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

E-commerce Analytics

A Python data analysis project that generates a realistic synthetic e-commerce transaction dataset and produces revenue insights and visualizations with pandas and matplotlib.

Key Findings

Analysis of 7,843 orders from 2,000 customers between January 2024 and December 2025:

Metric Value
Total revenue $1,353,582.17
Average order value $172.58
Top category Electronics ($571,960.56 — 42% of revenue)
Top customer spend $5,782.73

Revenue by category:

Category Revenue
Electronics $571,960.56
Home & Kitchen $359,623.27
Apparel $273,902.57
Beauty $85,785.61
Books $62,310.16

Electronics and Home & Kitchen together account for roughly 69% of all revenue, while Beauty and Books drive order volume at lower price points.

Visualizations

Monthly Revenue

Monthly Revenue

Revenue by Category

Revenue by Category

Orders per Month

Orders per Month

Project Structure

ecommerce-analytics/
├── data/
│   └── transactions.csv    # generated dataset (not tracked in git)
├── output/                 # generated charts
├── src/
│   ├── generate_data.py    # synthetic dataset generator
│   └── analysis.py         # summary stats + charts
├── requirements.txt
└── README.md

How to Run

# 1. Set up environment
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

# 2. Generate the dataset
python3 src/generate_data.py

# 3. Run the analysis
python3 src/analysis.py

The analysis prints an overview to the terminal (order counts, revenue totals, category breakdown, top customers) and saves charts to output/.

Tech Stack

  • Python 3.13
  • pandas — data loading, aggregation, and time-series grouping
  • matplotlib — chart generation
  • NumPy — synthetic data generation (gamma/beta/Poisson distributions for realistic customer behavior and Q4 seasonality)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages