A full-stack retail analytics dashboard that identifies return patterns and helps businesses reduce revenue loss through data-driven insights and interactive visualizations. The project integrates a Flask backend, React frontend, and Power BI visualizations to deliver an interactive and user-friendly analytics experience.
This project was developed as part of an On-the-Job Training (OJT) program to understand real-world data analysis, dashboard building, and full-stack integration.
- KPI Dashboard
Displays key business metrics:
Total Orders
Total Returns
Return Rate (%)
Revenue Impact
These KPIs update dynamically based on filters.
- Interactive Filters
Users can filter data based on:
Country
Year
Month
This enables focused analysis and better decision-making.
- Power BI Integration
Embedded Power BI dashboard for advanced visual insights:
Sales vs Returns Trends
Category-wise Return Analysis
Region-wise Performance
Provides rich, interactive visualizations inside the app.
- Dynamic Charts (Frontend)
Custom charts built using React:
Monthly Return Trends
Category Distribution
Return Percentage Analysis
- Flask Backend API
Handles all data processing and API endpoints:
/meta → Filter values (Country, Year, Month)
/dashboard-data → KPI + chart data
Ensures smooth communication between frontend and dataset.
- Clean UI with Loading States
Responsive design
Loading spinner for better UX
Modular components (KPI cards, charts, modal)
- Algorithm Used: Random Forest
- Objective: Predict likelihood of product return
- Features: Order value, category, country, etc.
- Accuracy: 84%
Dashboard Overview
Power BI Modal
KPI Cards
RETAIL-RETURN-BEHAVIOR-ANALYSIS/
│
├── backend/
│ ├── app.py # Flask backend
│ ├── model.pkl
| ├── requirements.txt
| ├── train_model.py
│
├── frontend/
│ ├── src/
│ │ ├── components/
│ │ │ └── KpiCards.jsx
│ │ │ └── LoadingSpinner.jsx
| | | └── PowerBIModal.css
│ │ │ └── PowerBIModal.jsx
│ │ │
│ │ ├── pages/
│ │ │ └── Dashboard.jsx
| | | └── Dashboard.css
│ │ ├── services/
│ │ │ └── api.js
│ │ ├── App.css
│ │ ├── App.jsx
│ │ ├── index.css
│ │ ├── main.jsx
│ │ ├── index.html
│ └── package.json
│
├── README.md
└── requirements.txt
Dataset → Data Processing → Model → Flask API → React Dashboard → Power BI
Python
Flask
Pandas
React.js
CSS
Power BI
- Clone the Repository
git clone https://github.com/Vaishnavi10706/Retail-Return-Behavior-Study.git
cd retail-return-behavior-analysis
- Setup Backend
cd backend
pip install -r requirements.txt
python app.py
- Setup Frontend
cd frontend
npm install
npm run dev
Step 1: Open Dashboard Run frontend and open in browser
Step 2: Apply Filters
Select:
Country
Year
Month
Step 3: Analyze KPIs
View updated:
Total Orders
Returns
Return Rate
Step 4: Explore Visuals
View charts
Open Power BI modal for deeper insights
High return rate in specific categories
Seasonal trends in returns
Country-wise return differences
Revenue loss due to returns
This project helps in understanding:
- Real-world retail analytics
- Return behavior patterns
- Full-stack dashboard development
- API integration between React & Flask
- Embedding Power BI in applications
- Data-driven decision making
- Helps reduce product return losses
- Identifies high-risk categories and regions
- Supports better inventory and logistics decisions
- Enables data-driven retail strategies
- User authentication
- Export reports (PDF/CSV)
- Advanced filters
- Real-time data updates
- Machine learning for return prediction
If you found this project useful, consider starring ⭐ the repository!
Vaishnavi
B.Tech Student – Data Analytics



