A Python automation tool that processes raw sales datasets, cleans the data, generates summary reports, and creates visual business reports automatically.
The project demonstrates how Python can automate a typical business reporting workflow by converting raw transaction data into structured insights and visual reports.
The dataset used in this repository is a publicly available developer demo dataset.
- Supports multiple input formats
- CSV\
- TSV\
- TXT\
- JSON\
- XLSX (optional with
openpyxl)\
- Automatic column name detection\
- Cleans and standardizes sales-style datasets\
- Removes invalid or duplicate records\
- Generates cleaned CSV output\
- Generates text summary report\
- Generates Markdown summary report\
- Generates SVG charts\
- Generates HTML visual report\
- Optional PDF export support
Raw Data (input/)
│
▼
automation.py
Data Cleaning + Summary Generation
│
▼
Cleaned Data + Reports (output/)
│
▼
report_visualizer.py
Charts + Visual Report
python-report-automation/
│
├── input/
│ └── retail_sales_data - Sheet1.csv
│
├── output/
│ ├── cleaned_sales_data.csv
│ ├── sales_summary_report.txt
│ ├── sales_summary_report.md
│ ├── top_products_chart.svg
│ ├── category_sales_chart.svg
│ ├── city_sales_chart.svg
│ ├── monthly_sales_chart.svg
│ └── sales_visual_report.html
│
├── automation.py
├── report_visualizer.py
├── requirements.txt
├── README.md
└── .gitignore
This script:
- scans the
input/folder - detects supported input files
- maps flexible column names automatically
- cleans and standardizes the dataset
- removes invalid or duplicate rows
Outputs generated:
cleaned_sales_data.csvsales_summary_report.txtsales_summary_report.md
This script reads the cleaned dataset and generates visual outputs.
It:
- calculates summary metrics
- generates business charts
- produces visual reports
Outputs generated:
- SVG charts
- HTML visual report
- optional PDF report
Base version supports:
.csv.tsv.txt.json
Optional support:
.xlsxwithopenpyxl
Invalid or unsupported files return clear error messages instead of crashing.
python automation.pyThis generates:
- cleaned dataset
- text summary report
- markdown summary report
python report_visualizer.pyThis generates:
- charts
- HTML visual report
- optional PDF report
After running both scripts, the output/ folder will contain:
cleaned_sales_data.csvsales_summary_report.txtsales_summary_report.mdtop_products_chart.svgcategory_sales_chart.svgcity_sales_chart.svgmonthly_sales_chart.svgsales_visual_report.html
Businesses often export raw sales data from internal systems.
This project demonstrates how Python automation can transform those raw
files into:
- cleaned datasets
- summary reports
- visual dashboards
automatically.
- Python scripting
- data cleaning automation
- flexible file parsing
- business reporting automation
- automated visualization
- error-safe workflow design
If you want to build your own AI assistant that can help with tasks like:
- cleaning messy datasets
- generating business reports
- building automation scripts
you can explore my companion project:
.pyLee — Python Automation Engineer Assistant
This project demonstrates how an AI agent can assist in generating practical Python automation tools for real-world workflows.
🔗 Explore the project here:
https://github.com/sayeduzzaman-bracu/pyLee-python-automation-assistant
Sayed Uz Zaman
Python Automation & AI Agent Developer