Professional data analysis and visualization package for Quantium Pink Morsel sales analysis
A comprehensive, production-ready solution built with professional Python package standards to analyze Pink Morsel sales data and answer the critical business question: "Were sales higher before or after the Pink Morsel price increase on January 15th, 2021?"
π This repository is a fork of vagabond-systems/quantium-starter-repo
β Sales were 35.8% HIGHER after the price increase (+$2,367.43 per day average)
| Metric | Before | After | Change |
|---|---|---|---|
| Daily Revenue | $6,604 | $8,972 | +35.8% |
| Price per Unit | $3.00 | $5.00 | +66.7% |
| Daily Volume | 2,201 units | 1,794 units | -18.5% |
| Regional Impact | All regions positive | 35.3% - 36.4% | Consistent |
# Clone the repository
git clone https://github.com/nehalmr/quantium-pink-morsel-analysis.git
cd quantium-pink-morsel-analysis
# Setup environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt# Interactive web dashboard
python run_dashboard.py
# Opens at: http://127.0.0.1:8050/# Command-line analysis
python run_analysis.py
# Or use the CLI directly
python -m pink_morsel_analysis.cli.analyzer_cli --region north --verbose# Complete test suite
python run_tests.py
# Or use make commands
make test # Core tests
make test-dash # Dash component tests
make ci # Full CI pipelinepink_morsel_analysis/
βββ core/ # Business logic
β βββ data_processor.py # Data loading & processing
β βββ analyzer.py # Statistical analysis
βββ web/ # Web interface
β βββ dashboard.py # Interactive dashboard
βββ cli/ # Command-line interface
βββ analyzer_cli.py # CLI tool
- ποΈ Professional Package: Modern Python package with pyproject.toml
- π Regional Analysis: Interactive filtering by region
- π± Responsive Design: Works on desktop, tablet, mobile
- β‘ Real-time Updates: Dynamic chart updates
- π§ͺ 95%+ Test Coverage: Comprehensive test suite
- π CI/CD Ready: GitHub Actions integration
- π Business Intelligence: Automated insights
- π― Production Ready: Professional deployment structure
- Regional Filtering: North, East, South, West, All regions
- Dynamic Charts: Real-time Plotly visualizations
- Executive Summary: Automated business insights
- Key Metrics: Before/after comparison with percentages
- Automated Reports: Generate comprehensive analysis
- Regional Breakdown: Detailed regional performance
- Data Validation: Built-in data quality checks
- Export Options: Multiple output formats
- Trend Analysis: Before/after price increase comparison
- Regional Performance: Market-specific insights
- Business Metrics: Revenue, volume, pricing analysis
- Executive Summaries: Business-ready reports
- Core Logic: 95%+ coverage
- Dashboard Components: 90%+ coverage
- CLI Functionality: 90%+ coverage
- Integration Tests: End-to-end workflows
- Black: Code formatting
- isort: Import sorting
- mypy: Type checking
- pytest: Testing framework
- pre-commit: Git hooks
# Local CI testing
./run_ci_tests.sh
# Full development checks
make dev-check
# Pre-release validation
make pre-release| Document | Description |
|---|---|
| CHANGELOG.md | Version history and changes |
| CONTRIBUTING.md | Development guidelines |
| SECURITY.md | Security policy and reporting |
| PROJECT_STRUCTURE.md | Architecture details |
| CI_DOCUMENTATION.md | CI/CD setup guide |
# Install development dependencies
make install-dev
# Setup pre-commit hooks
pre-commit install
# Run development checks
make dev-check# Development
make dashboard # Launch dashboard
make analysis # Run analysis
make format # Format code
make lint # Run linting
make type-check # Type checking
# Testing
make test # Core tests
make test-all # All tests
make test-cov # With coverage
make ci # CI pipeline
# Build
make build # Build package
make clean # Clean artifacts# Optional configuration
export SOUL_FOODS_DATA_DIR="./data"
export SOUL_FOODS_DEBUG="false"
export SOUL_FOODS_PORT="8050"# Install production dependencies only
pip install -r requirements-prod.txt
# Run with production server
gunicorn pink_morsel_analysis.web.dashboard:appfrom pink_morsel_analysis import DataProcessor, SalesAnalyzer, Dashboard
# Data processing
processor = DataProcessor(data_directory='data')
data = processor.load_and_process_data()
# Statistical analysis
analyzer = SalesAnalyzer(processor)
stats = analyzer.analyze_all_regions()
# Web dashboard
dashboard = Dashboard(processor, analyzer)
dashboard.run_server(port=8050)# Basic analysis
soul-foods-analyze
# Regional analysis
soul-foods-analyze --region north --verbose
# Data summary
soul-foods-analyze --data-summary
# Help
soul-foods-analyze --helpWe welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and add tests
- Run the test suite:
make test-all - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Documentation: Check the
docs/directory - Issues: GitHub Issues
- Discussions: GitHub Discussions
- Quantium Analytics Program: For the project framework
- Original Repository: vagabond-systems/quantium-starter-repo
- Contributors: See CHANGELOG.md for contributor recognition
- Open Source Community: For the excellent tools and libraries used
Repository: https://github.com/nehalmr/quantium-pink-morsel-analysis
Original: https://github.com/vagabond-systems/quantium-starter-repo
Built with β€οΈ using professional Python development practices