Skip to content

Repository files navigation

Quantium Pink Morsel Analysis

Python Version License: MIT Code Style: Black Tests Coverage Forked from

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

🎯 Key Business Finding

βœ… Sales were 35.8% HIGHER after the price increase (+$2,367.43 per day average)

πŸ“Š Quick Results Summary

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

πŸš€ Quick Start

Installation

# 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

Launch Dashboard

# Interactive web dashboard
python run_dashboard.py
# Opens at: http://127.0.0.1:8050/

Run Analysis

# Command-line analysis
python run_analysis.py

# Or use the CLI directly
python -m pink_morsel_analysis.cli.analyzer_cli --region north --verbose

Run Tests

# 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 pipeline

πŸ—οΈ Professional Architecture

Package Structure

pink_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

Key Features

  • πŸ—οΈ 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

πŸ“ˆ Business Intelligence Features

Interactive Dashboard

  • 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

Command-Line Interface

  • Automated Reports: Generate comprehensive analysis
  • Regional Breakdown: Detailed regional performance
  • Data Validation: Built-in data quality checks
  • Export Options: Multiple output formats

Statistical Analysis

  • Trend Analysis: Before/after price increase comparison
  • Regional Performance: Market-specific insights
  • Business Metrics: Revenue, volume, pricing analysis
  • Executive Summaries: Business-ready reports

πŸ§ͺ Testing & Quality Assurance

Test Coverage

  • Core Logic: 95%+ coverage
  • Dashboard Components: 90%+ coverage
  • CLI Functionality: 90%+ coverage
  • Integration Tests: End-to-end workflows

Quality Tools

  • Black: Code formatting
  • isort: Import sorting
  • mypy: Type checking
  • pytest: Testing framework
  • pre-commit: Git hooks

CI/CD Pipeline

# Local CI testing
./run_ci_tests.sh

# Full development checks
make dev-check

# Pre-release validation
make pre-release

πŸ“š Documentation

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

πŸ› οΈ Development

Setup Development Environment

# Install development dependencies
make install-dev

# Setup pre-commit hooks
pre-commit install

# Run development checks
make dev-check

Common Commands

# 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

πŸ”§ Configuration

Environment Variables

# Optional configuration
export SOUL_FOODS_DATA_DIR="./data"
export SOUL_FOODS_DEBUG="false"
export SOUL_FOODS_PORT="8050"

Production Deployment

# Install production dependencies only
pip install -r requirements-prod.txt

# Run with production server
gunicorn pink_morsel_analysis.web.dashboard:app

πŸ“Š API Reference

Core Classes

from 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)

CLI Usage

# Basic analysis
soul-foods-analyze

# Regional analysis
soul-foods-analyze --region north --verbose

# Data summary
soul-foods-analyze --data-summary

# Help
soul-foods-analyze --help

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Quick Contribution Steps

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes and add tests
  4. Run the test suite: make test-all
  5. Submit a pull request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ†˜ Support

πŸ† Acknowledgments


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

About

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?"

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages