MIT License

项目介绍

AmirhosseinHonardoust/Sales-Data-Analysis 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,采用 MIT License 许可证,目前获得 29 个 Star、0 次 Fork。

仓库全名
AmirhosseinHonardoust/Sales-Data-Analysis
开源许可证
MIT License
Star 数
29

README 摘要

Sales Data Analysis Synthetic sales data analysis with Python. Generate realistic sales transactions, clean and validate data, compute KPIs, and visualize revenue trends by day, month, and category. Includes reproducible scripts and charts for portfolio demonstration. Simple end-to-end sales analytics: synthetic data generation, cleaning, KPIs, and charts. Features Generate synthetic daily orders Clean and validate…

完整内容见 GitHub 原始 README 或本页 。

常见问题

Sales-Data-Analysis 用什么语言开发?

主要使用 Python 编写,采用 MIT License 许可证,目前有 29 个 Star。

Sales-Data-Analysis 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 Sales-Data-Analysis 的源码?

可以直接克隆仓库:git clone https://github.com/AmirhosseinHonardoust/Sales-Data-Analysis.git,默认分支为 main;安装与运行步骤见仓库 README。

Sales-Data-Analysis 最近还在维护吗?

仓库最近一次更新为 2025年10月31日,当前没有未关闭的 Issue;Star 数为 29,可作为社区活跃度的参考。

关于

Synthetic sales data analysis with Python. Generate realistic sales transactions, clean and validate data, compute KPIs, and visualize revenue trends by day, month, and category. Includes reproducible scripts and charts for portfolio demonstration.

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

语言占比

Python

README

Sales Data Analysis

Synthetic sales data analysis with Python. Generate realistic sales transactions, clean and validate data, compute KPIs, and visualize revenue trends by day, month, and category. Includes reproducible scripts and charts for portfolio demonstration. Simple end-to-end sales analytics: synthetic data generation, cleaning, KPIs, and charts.


Features

  • Generate synthetic daily orders
  • Clean and validate data (deduplicate, impute, recompute revenue)
  • Compute KPIs: daily/monthly revenue, average basket, growth rate
  • Visualize revenue trends with Matplotlib
  • Save outputs to the outputs/ directory

Project Structure

sales-data-analysis/
├─ README.md
├─ requirements.txt
├─ data/
│  └─ generate_sales.py
├─ src/
│  ├─ analyze_sales.py
│  └─ utils.py
└─ outputs/
   └─ figures & reports

Setup

python -m venv .venv
# Windows:
.venv\Scripts\activate
# macOS/Linux:
source .venv/bin/activate
pip install -r requirements.txt

Generate Synthetic Data

python data/generate_sales.py --start 2023-01-01 --end 2024-12-31 --seed 42 --out data/sales.csv

Run Analysis

python src/analyze_sales.py --input data/sales.csv --outdir outputs

The script produces KPIs and charts automatically.

Outputs

  • outputs/kpis.txt – main KPIs
  • outputs/fig_daily_revenue.png
  • outputs/fig_monthly_revenue.png
  • outputs/fig_category_revenue.png

Sample Results

Daily Revenue

fig_daily_revenue

Monthly Revenue

fig_monthly_revenue

Revenue by Category

fig_category_revenue

Data Schema

column description
date order date
order_id unique order identifier
customer_id customer identifier
category product category
price unit price (after discount)
quantity order quantity
revenue price * quantity

评论

暂无评论