This project performs data cleaning, KPI computation, and exploratory analysis on a real-world Amazon Retail Sales dataset.
It also includes an Object-Oriented Python class (SalesAnalyzer) encapsulating all analytics logic.
๐ Live Streamlit App: https://assignmentpythonweek1.streamlit.app/
๐ Project/
โโโ Amazon Sale Report.csv
โโโ Cleaned_Amazon_Sale_Report.csv
โโโ EDA.ipynb
โโโ Kpi Analysis.ipynb
โโโ SalesAnalyzer.py
โโโ amazon.ipynb
โโโ streamlit_app.py (Streamlit Dashboard)
โโโ outlier_boxplot.png
โโโmonthly_revenue_trend.png
โโโ category_sales.png
โโโ top_states_sales.png
โโโ order_status_distribution.png
โโโ b2b_vs_b2c.png
โ
โโโ README.md
- Clean raw retail sales data (missing values, duplicates, formatting issues)
- Perform type conversion (dates, numeric fields, booleans, categories)
- Compute key business KPIs:
- Monthly Revenue
- Region-wise Sales
- Profit Margin (%)
- Average Order Value (AOV)
- Cancellation Rate
- Category-wise Sales
- B2B vs B2C Sales Split
- Visualize insights using Matplotlib and Plotly
- Implement an OOP-based SalesAnalyzer class to automate analysis
- Interactive Streamlit Dashboard for real-time exploration
Key cleaning operations performed:
- Trimmed column name spaces
- Dropped
indexandUnnamed:22
Dateโ datetimeAmount&Qtyโ numericship-postal-codeโ stringB2Bโ boolean
- Title case for cities/states
- Uppercase for sizes
- Cleaned category names
- Courier Status โ
"Pending" - Promotion IDs โ
"No Promotion" - Currency โ
"INR" - Fulfilled-by assigned using Fulfilment logic
Cancelled orders are assigned Amount = 0.
Cleaned dataset saved as: Cleaned_Amazon_Sale_Report.csv
All KPI logic is implemented in SalesAnalyzer.py using OOP.
- Profit Margin %: Assuming baseline cost = 65% of selling price
- Average Order Value (AOV):
Total Revenue / Number of Orders - Cancellation Rate: Percentage of orders marked Cancelled
- Top Performing Categories: By revenue and quantity
- Fulfilment Performance: Amazon vs Merchant comparison
The project includes a full OOP implementation in SalesAnalyzer.py
- Monthly Revenue Analysis
- Region Sales Breakdown
- Average Order Value Calculation
- Profit Margin Computation
- Cancellation Rate Analysis
- Automated Trend Charts
- Outlier Detection Visualizations
from SalesAnalyzer import SalesAnalyzer
import pandas as pd
df = pd.read_csv("Cleaned_Amazon_Sale_Report.csv")
analyzer = SalesAnalyzer(df)
# Generate comprehensive report
analyzer.generate_report()
# Plot visualizations
analyzer.plot_monthly_revenue()
analyzer.plot_region_sales()
analyzer.plot_categories()
analyzer.plot_outliers()Here is the completed section for your README, polished and ready to copyโpaste, including your Streamlit app link and full details:
This project includes a fully interactive Streamlit Dashboard where you can explore Amazon Retail Sales visually.
To run the dashboard on your machine:
streamlit run streamlit_app.pyMake sure the required packages are installed:
pip install streamlit pandas numpy matplotlib seaborn plotly pyarrowYou can view the hosted version of the dashboard here:
๐ Live Streamlit App: https://assignmentpythonweek1.streamlit.app/
This dashboard includes:
- ๐ Monthly Revenue Trends
- ๐ Category-wise Sales
- ๐บ Top States by Sales
- ๐ฅ B2B vs B2C Split
- ๐ฆ Order Status Distribution
โ ๏ธ Outlier Detection- ๐งน Clean Data Preview
- ๐ Filters for Date, Category, Fulfilment, etc.
All visualizations are interactive and allow you to explore the dataset in depth.
- Overview Tab: Key metrics and monthly trends
- Regional Analysis: State-wise performance breakdown
- Product Insights: Category and SKU analysis
- Deep Dive: Custom filters and detailed exploration
- AI Insights: Automated recommendations and anomaly detection
Data cleaning + descriptive statistics
KPI computation + visualizations
Combined workflow for cleaning + analysis
git clone https://github.com/satya-blend360/Assignment_Python_Week1.gitpip install pandas numpy matplotlib seaborn plotly streamlitjupyter notebookOpen any of the notebooks:
EDA.ipynbKpi Analysis.ipynbamazon.ipynb
python SalesAnalyzer.pystreamlit run app.py- Total Records: 128,971 orders
- Date Range: April 2022 - March 2023
- Columns: 26 features including order details, product info, shipping data, and financial metrics
- Categories: Kurta, Set, Western Dress, Top, and more
- Geographic Coverage: Multiple states across India
- Top performing state contributes 25%+ of total revenue
- B2B orders have 40% higher average order value than B2C
- Peak sales months align with festive seasons
- Cancellation rate averages around 12-15%
- Amazon fulfillment shows better delivery success rates
- Python 3.12+
- Pandas: Data manipulation and cleaning
- NumPy: Numerical computations
- Matplotlib: Static visualizations
- Seaborn: Statistical plots
- Plotly: Interactive charts
- Streamlit: Web dashboard
- Jupyter: Interactive notebooks
This project demonstrates:
โ
Complete retail data cleaning workflow
โ
KPI-driven business analytics
โ
Rich visualizations for decision-making
โ
Clean and scalable Object-Oriented Python design
โ
Interactive dashboard for real-time insights
โ
Professional documentation & reproducible results
Perfect for showcasing Data Engineering, Analytics, and Python Development skills!





