A professional Streamlit dashboard for analyzing e-commerce performance metrics, revenue trends, and customer satisfaction data. This dashboard provides real-time insights with interactive visualizations and comprehensive filtering capabilities.
- Total Revenue with year-over-year growth trends
- Monthly Growth percentage with color-coded indicators
- Average Order Value with trend analysis
- Total Orders with growth comparison
- Revenue Trend Line Chart: Dual-line comparison between current and previous periods
- Top 10 Categories: Horizontal bar chart with blue gradient coloring
- Revenue by State: Interactive US choropleth map with state-level insights
- Satisfaction vs Delivery Time: Bar chart correlating delivery speed with customer ratings
- Average Delivery Time: Performance tracking with trend indicators
- Review Score: Star-rated customer satisfaction display
- Python 3.8 or higher
- pip package manager
-
Clone or download the project files
# Ensure you have all project files in the DATA_ANALYSIS directory # Including ecommerce_data/ folder with CSV files
-
Install required dependencies
pip install -r requirements.txt
-
Verify data structure Ensure the following CSV files are present in the
ecommerce_data/directory:customers_dataset.csvorder_items_dataset.csvorder_payments_dataset.csvorder_reviews_dataset.csvorders_dataset.csvproducts_dataset.csv
-
Navigate to the project directory
cd /path/to/DATA_ANALYSIS -
Launch the Streamlit dashboard
streamlit run streamlit_dashboard.py
-
Access the dashboard
- The dashboard will automatically open in your default web browser
- If not, navigate to
http://localhost:8501in your browser
- Analysis Year: Select the primary year for analysis (2023, 2022, 2021)
- Comparison Year: Choose the year for comparison (2022, 2021, 2020)
- Month Range: Set start and end months to focus on specific periods
- All visualizations update automatically when filters change
- KPI Cards: Display metrics with color-coded trend indicators (green=positive, red=negative)
- Charts: Hover over data points for detailed information
- US Map: Click on states or hover for revenue details
- Responsive Design: Dashboard adapts to different screen sizes
┌─────────────────────────────────────────────────────────────────┐
│ Header: Title Date Filters │
├─────────────────────────────────────────────────────────────────┤
│ KPI Row: 4 cards with metrics and trend indicators │
├─────────────────────────────────────────────────────────────────┤
│ Charts Grid (2x2): │
│ ┌─────────────────────┐ ┌─────────────────────┐ │
│ │ Revenue Trend │ │ Top 10 Categories │ │
│ └─────────────────────┘ └─────────────────────┘ │
│ ┌─────────────────────┐ ┌─────────────────────┐ │
│ │ Revenue by State │ │ Satisfaction vs │ │
│ │ (Choropleth) │ │ Delivery Time │ │
│ └─────────────────────┘ └─────────────────────┘ │
├─────────────────────────────────────────────────────────────────┤
│ Bottom Row: 2 cards (Delivery Time & Review Score) │
└─────────────────────────────────────────────────────────────────┘
- Data Processing: Modular approach with
data_loader.pyandbusiness_metrics.py - Visualization: Plotly for all charts and interactive elements
- Frontend: Streamlit framework for responsive web interface
- Styling: Custom CSS for professional appearance
- Caching: Streamlit caching for optimal performance
- Error Handling: Robust data validation and filtering
- Responsive Design: Consistent layout across devices
- Color Coding: Green for positive trends, red for negative trends
The dashboard expects the following data schema:
- Orders with timestamps and status
- Customer information with state locations
- Product categories and pricing
- Review scores and delivery metrics
- Payment information
-
ModuleNotFoundError
# Ensure all dependencies are installed pip install -r requirements.txt -
File not found errors
# Verify CSV files are in the correct location ls ecommerce_data/ -
Dashboard not loading
# Check Python version (requires 3.8+) python --version # Try clearing Streamlit cache streamlit cache clear
-
Performance issues
- Use date filters to reduce data volume
- Refresh browser if charts don't load
- Check system resources for large datasets
- Use specific date ranges for faster loading
- The dashboard automatically caches processed data
- Clear cache if you update source CSV files
streamlit>=1.28.0- Web frameworkpandas>=1.5.0- Data processingplotly>=5.0.0- Interactive visualizationsnumpy>=1.21.0- Numerical operationsmatplotlib>=3.5.0- Additional plotting supportseaborn>=0.11.0- Statistical visualizations
For issues or questions:
- Check the troubleshooting section above
- Verify all data files are in the correct format
- Ensure Python and dependency versions are compatible
- Review the console output for specific error messages
Note: This dashboard is designed for e-commerce analysis and requires properly formatted data files. All visualizations use real-time data processing and update immediately when filters are applied.