Market Maven is a professional AI-powered sales forecasting and analytics platform built with Streamlit. It provides businesses with automated data processing, machine learning-based forecasting, and interactive visualizations to analyze product performance and generate actionable business insights.
- Dark/Light Theme Toggle: Seamless switching between themes with full component theming
- Responsive Design: Optimized for desktop, tablet, and mobile devices
- Premium Animations: Smooth hover effects, transitions, and interactive elements
- Card-Based Layout: Clean, organized interface with gradient headers
- Multiple Algorithms: Moving average, exponential smoothing, linear trend, and ML models
- Machine Learning: Random Forest and Linear Regression implementations
- Automated Column Detection: Intelligent identification of date, sales, and product columns
- Model Persistence: Save and load trained models for consistent predictions
- Interactive Charts: Plotly-powered visualizations with theme-aware styling
- Performance Metrics: MAE, MSE, RMSE, and RΒ² score evaluations
- Product Analysis: Top performers, sales distribution, and trend analysis
- Time Series Visualization: Daily, monthly, and seasonal pattern recognition
- Comprehensive Insights: 7+ types of business recommendations
- Priority Levels: Critical, High, Medium, Low risk assessments
- Action Items: Specific, actionable recommendations for each insight
- Category Classification: Growth, Risk Management, Product Strategy insights
- Touch-Friendly Interface: Larger buttons and improved navigation
- Responsive Charts: Optimized chart sizing and spacing for mobile
- Sidebar Navigation: Clear mobile navigation with helpful hints
- Optimized Performance: Fast loading and smooth interactions
- Python 3.11 or higher
- pip package manager
- Clone the repository
git clone https://github.com/yourusername/market-maven.git
cd market-maven
- Install dependencies
pip install -r requirements-local.txt
- Run the application
streamlit run app.py --server.port 5000
- Access the application
Open your browser and navigate to
http://localhost:5000
streamlit>=1.27.0
- Web application frameworkpandas>=2.0.3
- Data manipulation and analysisnumpy>=1.24.3
- Numerical computationsscikit-learn
- Machine learning algorithmsplotly
- Interactive data visualizationopenpyxl>=3.1.2
- Excel file support
- Python: 3.11+
- Memory: 2GB RAM minimum
- Storage: 100MB free space
- Browser: Modern web browser (Chrome, Firefox, Safari, Edge)
- Navigate to the "π Upload Data" section
- Upload CSV or Excel files containing sales data
- System automatically detects date, sales, and product columns
- Preview and validate your data before processing
- Go to "π Forecast" section
- Select forecasting method (Moving Average, Exponential, Linear Trend, ML Models)
- Choose forecast period (days/weeks/months)
- Generate predictions with confidence intervals
- Download forecast results as CSV
- Visit "π‘ Insights" section after generating forecasts
- Review AI-generated business recommendations
- Analyze priority levels and action items
- Implement suggested strategies for growth
- Access "π Analytics" for comprehensive analysis
- View performance metrics and KPIs
- Analyze product performance and sales trends
- Export charts and reports
- Framework: Streamlit with custom CSS styling
- Theme System: Dynamic light/dark mode with full component theming
- Responsive Design: Mobile-first approach with breakpoints
- Animations: CSS transitions and hover effects
- Data Processing: Pandas and NumPy for data manipulation
- Machine Learning: Scikit-learn for predictive modeling
- Visualization: Plotly for interactive charts
- File Handling: Support for CSV and Excel formats
- File Upload β Column Detection β Data Validation
- Preprocessing β Feature Engineering β Model Training
- Forecasting β Visualization β Insights Generation
- Export β Reporting β Business Recommendations
The app uses the following configuration in .streamlit/config.toml
:
[server]
headless = true
address = "0.0.0.0"
port = 5000
[theme]
primaryColor = "#667eea"
backgroundColor = "#ffffff"
secondaryBackgroundColor = "#f0f2f6"
textColor = "#262730"
No environment variables are required for basic functionality. The app runs with default settings.
- Modify CSS variables in
app.py
for custom colors - Update gradient definitions for different brand colors
- Customize animation timings and effects
- Create new method in
model.py
- Add UI controls in forecast page
- Update method selection logic
- Test with sample data
- Extend
generate_business_insights()
function - Add new insight categories and priorities
- Update display logic for new insight types
Check it out on Website
streamlit run app.py --server.port 8501
- Replit: Deploy directly on Replit platform
- Heroku: Use provided
requirements.txt
andruntime.txt
- Docker: Create container with Python 3.11 base image
- Cloud Platforms: Deploy on AWS, GCP, or Azure
Your data should include the following columns:
- Date Column: Date/timestamp for time series analysis
- Sales Column: Numerical sales values
- Product Column: Product categories or names (optional)
- Additional Columns: Any relevant business metrics
Example CSV format:
Date,Product,Sales,Quantity,Total
2024-01-01,Electronics,150.50,5,752.50
2024-01-02,Clothing,89.99,3,269.97
2024-01-03,Electronics,200.00,2,400.00
1. Data Upload Problems
- Ensure file format is CSV or Excel
- Check for proper column headers
- Verify date formats are recognized
2. Forecasting Errors
- Confirm sufficient historical data (minimum 10 records)
- Check for missing values in key columns
- Ensure numerical data types for sales columns
3. Chart Display Issues
- Refresh the page if charts don't load
- Check browser console for JavaScript errors
- Ensure stable internet connection for Plotly
4. Mobile Navigation
- Use sidebar dropdown for page navigation
- Ensure JavaScript is enabled
- Try refreshing if sidebar doesn't appear
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Follow PEP 8 style guide
- Add docstrings to all functions
- Include unit tests for new features
- Update documentation for changes
This project is licensed under the MIT License - see the LICENSE file for details.
- Streamlit Team for the amazing framework
- Plotly for interactive visualizations
- Scikit-learn for machine learning capabilities
- Community Contributors for feedback and suggestions