This repository contains the complete Superstore final project.
The main goal of this project was to transform the original Superstore dataset into a complete data analytics solution, starting from raw data preparation and data warehouse design, continuing with statistical analysis and machine learning models, and finishing with an interactive Power BI dashboard.
The project follows a complete data workflow:
- Data extraction and preparation
- Data warehouse construction
- Statistical investigation
- Machine learning modeling
- Business intelligence dashboard development
Each phase is organized separately with its own documentation, notebooks, and outputs.
- MySQL Server
- DataGrip
- Power BI Desktop
- Power Query
- DAX
- Python
- Pandas
- Scikit-learn
- Jupyter Notebook
- Microsoft Excel
- GitHub
Superstore Project
│
├── Phase 1 - Data preparation & warehouse
│ ├── Power BI data model
│ ├── MySQL data warehouse
│ ├── CSV dimension and fact tables
│ └── Data preparation scripts
│
├── Phase 2 - Statistical analysis
│ ├── Statistical tests
│ ├── Exploratory analysis
│ └── Research notebook
│
├── Phase 3 - Machine learning
│ ├── Part-1: Profit prediction model
│ └── Part-2: Ship mode classification model
│
└── Phase 4 - Power BI dashboard
└── Final interactive dashboard
The first phase focused on cleaning the original Superstore dataset and creating a structured analytical database.
The raw data was imported into MySQL, processed through Power Query, validated, and transformed into a star schema suitable for analytics and machine learning.
- Imported the original Superstore SQL database into MySQL.
- Connected Power BI to the database.
- Cleaned and validated source tables.
- Checked missing values, duplicate keys, and relationships.
- Created staging and final transformation layers.
- Built a star schema data model.
- Created fact and dimension tables.
- Added calendar information.
- Created QA validation measures.
- Exported final analytical tables.
The warehouse follows a star schema design.
FactSales
DimProductDimCustomerDimGeographyDimShipModeDimOrderPriorityDimDate
The final fact table contains:
- 49,670 sales rows
- 25,033 unique orders
The second phase investigates business assumptions using statistical methods.
The main research question was:
Does applying discounts lead to a statistically significant increase in quantity sold?
The analysis was performed using the Superstore dataset prepared in Phase 1.
The workflow included:
- Data cleaning and validation
- Exploratory data analysis
- Distribution analysis
- Normality testing
- Variance testing
- Hypothesis testing
- Effect size analysis
Statistical methods included:
- Mann–Whitney U Test
- Welch's t-test
- Effect size calculations
The goal was not only to determine statistical significance but also to evaluate whether observed differences were practically meaningful.
The third phase applies machine learning techniques to predict business outcomes using historical sales information.
The prepared warehouse tables from Phase 1 were combined and transformed into machine learning datasets.
The objective was to predict product profit based on sales, customer, geographic, product, shipping, and order information.
The workflow included:
- Joining fact and dimension tables.
- Selecting useful features.
- Encoding categorical variables.
- Scaling numerical features.
- Splitting training and testing datasets.
- Training multiple regression models.
- Comparing model performance.
Models evaluated:
- Ridge Regression
- Random Forest Regression
- Gradient Boosting Regression
The final model comparison was based on:
- R² Score
- Training performance
- Testing performance
- Generalization ability
The objective was to predict the shipping mode of an order using historical order information.
A key focus of this project was preventing data leakage.
The dataset was aggregated to order level before splitting into training and validation sets, ensuring that items from the same order could not appear in both datasets.
The workflow included:
- Joining warehouse tables.
- Aggregating sales lines into orders.
- Creating order-level features.
- Engineering business-related variables.
- Training classification models.
- Evaluating performance.
Feature engineering included:
- Sales-related features
- Shipping cost features
- Profit margin features
- Discount features
- Time-based features
The final phase presents the results through an interactive Power BI dashboard.
The dashboard combines the prepared warehouse model and analytical results into business-focused visualizations.
The dashboard provides insights into:
- Sales performance
- Profit analysis
- Product performance
- Customer behavior
- Geographic trends
- Shipping analysis
- Business KPIs
The dashboard uses the data model created in Phase 1 and provides an interactive layer for decision-making.
Navigate to:
Phase 1 - Data preparation & warehouse
Run the generated SQL file:
sql/Superstore_DataWarehouse.sql
This creates the complete analytical database.
Navigate to:
Phase 2 - Statistical analysis
Open the notebook:
Discount.ipynb
Run the notebook using Jupyter Notebook or Jupyter Lab.
Navigate to:
Phase 3 - Machine learning
Install required Python packages:
pip install pandas numpy matplotlib seaborn scikit-learn scipyRun the notebooks:
Part-1/profit_prediction_model.ipynb
Part-2/Final_OrderLevel.ipynb
Open:
Phase 4 - Power BI dashboard
and run:
Superstore_Phase4_Final_Report.pbix
using Power BI Desktop.
The project was validated through multiple stages:
| Area | Validation |
|---|---|
| Data Preparation | Row counts, keys, relationships |
| Data Warehouse | Fact and dimension consistency |
| Statistical Analysis | Assumption checks and hypothesis tests |
| Machine Learning | Train/Test evaluation |
| Dashboard | Business KPI verification |
The complete Superstore analytics pipeline is currently finished.
Completed:
✅ Data warehouse creation ✅ Statistical analysis ✅ Machine learning models ✅ Power BI dashboard
The repository is ready for future improvements, additional analysis, and further business intelligence features.