An executive-ready business intelligence dashboard that works with ANY dataset type - sales, sports, HR, and more!
- Choose your own color theme with color pickers
- Quick preset buttons (Purple, Blue, Green, Red)
- All charts and metrics use your custom colors
- โ Sales Data (Revenue, Customers, Transactions)
- โ Sports Data (IPL Players, Runs, Wickets, Teams)
- โ HR Data (Employees, Salary, Departments)
- โ Education Data (Students, Grades, Courses)
- โ ANY Custom Data with numeric and categorical columns
- Manual column selection for Primary Value and Category
- Auto-detection with 20+ common column patterns
- Dataset type selection (auto/sales/sports/hr/generic)
- Dynamic KPI labels based on your data
- Dark Mode - Beautiful light/dark theme toggle
- Glassmorphism Design - Frosted glass effect cards and modern styling
- Animated Gradients - Dynamic, eye-catching backgrounds
- Enhanced Metrics - Hover effects and smooth animations
- Tabbed Interface - Organized navigation across 5 sections
- ๐ค AI-Powered Data Processing: Automatic column normalization using Groq AI
- ๐ Executive Dashboard: Enhanced KPI cards with 8+ metrics
- ๐ Interactive Visualizations: 8+ chart types with drill-down capability
- ๐ Period Comparisons: Month/Quarter/Year-over-Year analysis
- ๐พ Saved Filters: Save and reuse filter combinations
- ๐จ Alert System: Automated threshold notifications
- ๐ฒ Sample Data: Instant demo with 5,000+ transactions
- ๐ RFM Analysis: Customer segmentation (Champions, Loyal, At Risk, Lost)
- ๐ฐ Customer Lifetime Value: Predictive CLV calculations
- ๐ Cohort Analysis: Retention tracking by acquisition cohort
- ๐จ Anomaly Detection: Statistical outlier identification (Z-score)
- ๐ฎ Revenue Forecasting: Prophet-based predictions (7-90 days)
- ๐ Excel Export: Multi-sheet workbooks with KPIs and statistics
- ๐ PDF Reports: Executive summary documents
- ๐ฅ CSV Download: Filtered data export
- ๐ Forecast Export: Prediction data download
- ๐ฏ Quick Questions: Pre-built analysis prompts
- ๐ก Custom Questions: Ask anything about your data
- ๐ Structured Insights: Action plans, root causes, and impact assessments
-
Clone or download this project
-
Install dependencies:
pip install -r requirements.txt
-
Configure Groq API (Optional but Recommended):
- Copy
.env.exampleto.env - Get your API key from Groq Console
- Add your key to
.env:GROQ_API_KEY=your_actual_api_key_here
- Copy
-
Run the application:
streamlit run app.py
-
Access the dashboard:
- Opens automatically in your browser
- Or navigate to: http://localhost:8501
- Launch the app
- In sidebar, select "Use Sample Data"
- Click "Load Sample Data"
- Start exploring immediately with 5,000+ sample transactions
- Click "Upload File" in sidebar
- Upload CSV or Excel file
- Data will be automatically cleaned and normalized
- Apply filters and explore
- View KPIs: Revenue, Growth, AOV, Transactions at the top
- Period Comparison: Select Month/Quarter/Year comparison
- Visualizations: 4 auto-selected charts based on your data
- Filters: Date range and category filters in sidebar
RFM Analysis:
- Segment customers by Recency, Frequency, Monetary value
- Identify Champions, Loyal Customers, At Risk, and Lost segments
- View distribution pie chart
Customer Lifetime Value:
- Calculate predicted CLV for each customer
- View top customers by lifetime value
- Analyze CLV distribution
Cohort Analysis:
- Track retention by acquisition month
- View retention heatmap
- Identify loyalty patterns
Anomaly Detection:
- Adjust sensitivity slider (1.0-3.0 sigma)
- Detect unusual revenue patterns
- Investigate spikes and drops
- Select forecast period (7-90 days)
- Click "Generate Forecast"
- View Prophet model predictions with confidence intervals
- Download forecast data as CSV
- Excel Report: Download comprehensive multi-sheet workbook
- PDF Summary: Generate executive summary document
- CSV Export: Download filtered data
- Select a quick question or enter custom question
- Click "Generate AI Insights"
- Review structured recommendations:
- Key insights
- Root causes
- Action plans
- Expected impact
- Risk considerations
- Toggle in sidebar control panel
- Smooth theme transitions
- Optimized for both light and dark viewing
- Gradient backgrounds
- Hover animations
- Delta indicators
- Icon labels
- Success: Growth exceeding 50%
- Warning: Revenue below threshold
- Error: Declining revenue >10%
- Apply desired filters
- Enter filter name
- Click "Save Current Filters"
- Load anytime from dropdown
- At least 2 columns
- Preferably includes:
- Date/timestamp column
- Amount/revenue column
- Category column (optional)
- Customer ID (optional)
For full feature functionality:
- Date Column: Transaction dates
- Revenue Column: Sales amounts
- Customer Column: Customer identifiers
- Category Column: Product/service categories
- Quantity Column: Units sold (optional)
- CSV (.csv)
- Excel (.xlsx, .xls)
When Groq API is configured:
- Automatically renames columns to business-friendly terms
- Detects column purposes from sample data
- Converts abbreviations to full terms
- Removes duplicate rows
- Handles missing values intelligently:
- Numeric: Median imputation
- Dates: Forward fill
- Categorical: Mode or 'Unknown'
- Detects and converts date formats
- Identifies numeric columns in text format
Algorithm selects best 2 charts based on:
- Available column types
- Data characteristics
- Business relevance
Priority order:
- Time series (if dates available)
- Category breakdown (if categories available)
- Distribution analysis (if numeric data)
- Top performers
- Correlations
- Recency (R): Days since last purchase (1-5, 5 = recent)
- Frequency (F): Number of purchases (1-5, 5 = frequent)
- Monetary (M): Total spend (1-5, 5 = high value)
- RFM Score: Combination like "555" = Champion
CLV = Avg Order Value ร Purchase Rate ร Customer Lifespan (months)
Uses Z-score statistical method:
Z-score = (Value - Mean) / Standard Deviation
Flags points where |Z| > threshold (default: 2.0)
Prophet Model (preferred):
- Additive/multiplicative seasonality
- Trend changepoint detection
- Holiday effects (configurable)
- Confidence intervals
Fallback: 7-day moving average projection
pip install prophetpip install reportlab- Check
.envfile exists and has validGROQ_API_KEY - Verify API key at https://console.groq.com
- Check internet connection
- Apply date/category filters to reduce data size
- Use sample data for testing
- Close other browser tabs
- Increase Streamlit server resources
- Verify data has required columns
- Check for all-null columns
- Try sample data to verify installation
- Full Features Guide: See
FEATURES_GUIDE.md - Groq API Docs: https://console.groq.com/docs
- Streamlit Docs: https://docs.streamlit.io
- Prophet Docs: https://facebook.github.io/prophet/
- Track daily revenue trends
- Identify top products
- Segment customers by value
- Forecast holiday sales
- Monitor MRR/ARR
- Calculate customer LTV
- Track cohort retention
- Predict churn
- Analyze store performance
- Identify seasonal patterns
- Optimize inventory with forecasts
- Target high-value customers
- Measure campaign ROI
- Segment audience by engagement
- Predict future conversions
- Allocate budget to best channels
- All data processing happens locally
- No data stored on external servers
- API calls use encrypted HTTPS
- Optional API usage (works offline without AI features)
- Frontend: Streamlit
- Visualizations: Plotly
- Data Processing: Pandas, NumPy
- Analytics: Scikit-learn, SciPy
- Forecasting: Prophet
- AI: Groq LLM (llama-3.3-70b)
- Export: ReportLab (PDF), XlsxWriter (Excel)
- โจ Complete UI overhaul with modern design
- ๐จ Dark mode support
- ๐ Advanced analytics suite (RFM, CLV, Cohort)
- ๐ฎ Revenue forecasting with Prophet
- ๐จ Anomaly detection
- ๐ค Export to Excel/PDF
- ๐พ Saved filters
- ๐จ Alert system
- ๐ฒ Sample data generator
- ๐๏ธ Tabbed interface
- Basic KPI dashboard
- AI column normalization
- Simple visualizations
- AI insights
Suggestions and improvements welcome!
MIT License - Free to use and modify
Management Analytics Team
pip install -r requirements.txt
streamlit run app.pyExplore the future of business intelligence! ๐
- Avg Order Value: Average transaction size
- Distribution Chart: Histogram showing value distribution
- Categorical Chart: Bar chart comparing categories
- Scroll to "Autonomous Root Cause Analysis"
- Enter a question (e.g., "Why is revenue declining?")
- Click "Generate Insights"
- Review bulleted insights and prescriptive action plan
- Detects file type (CSV/Excel)
- Removes duplicates automatically
- Normalizes column names using Grok AI
- Auto-detects date columns
- Handles missing values intelligently
- Uses
st.session_stateto persist processed data - Dashboard only re-renders when filters change
- Efficient data handling for large datasets
- Column Normalization: Converts technical names to business terms
- Prescriptive Insights: Generates actionable recommendations
- Root Cause Analysis: Analyzes patterns and provides specific action plans
- "What factors are driving high-value transactions?"
- "Why is revenue declining in recent periods?"
- "Which categories show the strongest growth?"
- "What actions should we take to improve performance?"
- Python 3.8+
- Streamlit 1.31+
- Grok API key (from xAI)
- The dashboard is designed for management-level presentations
- All insights are prescriptive (actionable) rather than just descriptive
- Modular code structure for easy customization
- Automatic data type detection and handling