Skip to main content

Exploratory data analysis and transformation toolkit for Marketing Mix Modeling (MMM)

Project description

🦉 OwlMix

OwlMix is a Python package for generating comprehensive Exploratory Data Analysis (EDA) reports tailored for Marketing Mix Modeling (MMM) workflows.

It helps data scientists and analysts quickly generate HTML and JSON reports with dataset summaries, correlations, charts, and more.


🚀 Key Features

  • Automated EDA Reports: Generate detailed HTML reports with charts and statistics
  • Correlation Analysis: Matrix and lag correlations for time series data
  • VIF Calculation: Variance Inflation Factor for multicollinearity detection
  • Time Series Comparisons: Year-over-year and other time-based comparisons
  • Visual Charts: Distribution, outliers, time series, and correlation plots
  • Flexible Configuration: Customize which analyses and charts to include
  • Export Options: Both HTML and JSON outputs

📦 Installation

pip install owlmix

⚡ Quick Start

import pandas as pd
from owlmix.report import OwlMixReport

# Load your data
df = pd.read_csv("your_data.csv")

# Create and run the report
report = OwlMixReport(
    df=df,
    target="sales",  # Your target variable
    date_column="date",  # Date column name
    template_name="custom_eda_template.html"  # Optional: use dark theme with "custom_eda_template_dark.html"
)

# Generate both JSON and HTML reports
report.run(
    json_file_name="eda_report.json",
    html_file_name="eda_report.html"
)

This will create:

  • eda_report.json: Raw data in JSON format
  • eda_report.html: Beautiful HTML report with charts
  • outputs/charts/: Generated chart images

🛠️ Customization

Configure what to include in your report:

report = OwlMixReport(df, target="sales", date_column="date")

# Customize VIF analysis
report.set_vif_config(
    features=["tv_spend", "digital_spend", "radio_spend"],
    precision=3
)

# Customize time comparisons
report.set_time_comparison_config(
    value_columns=["sales", "tv_spend"],
    comparison_type="yoy",
    precision=2
)

# Customize charts
report.set_outlier_chart_layout(
    columns=["sales", "tv_spend"],
    max_cols_per_chart=4
)

report.run()

📊 Report Sections

The generated HTML report includes:

  • Dataset Overview: Basic info, data types, missing values
  • Summary Statistics: Descriptive stats for all variables
  • Correlation Matrix: Pairwise correlations
  • VIF Analysis: Multicollinearity detection
  • Time Comparisons: Period-over-period changes
  • Visualizations: Charts for distributions, outliers, time series, etc.

📚 Documentation

Detailed documentation is available in the docs/ folder:

  • docs/eda.md → EDA module details
  • docs/transform.md → Data transformation features
  • docs/saturation.md → Saturation modeling

🧪 Examples

Ready-to-run examples in the examples/ folder:

  • eda_basic.py - Basic EDA report generation
  • eda_full_workflow.py - Complete workflow example
  • mmm_workflow_example.py - Marketing Mix Modeling example

🧠 Use Case: Marketing Mix Modeling

OwlMix is designed for MMM workflows where you need to:

  1. Explore relationships between marketing spend and sales
  2. Identify multicollinearity issues with VIF
  3. Analyze time-based patterns and correlations
  4. Generate professional reports for stakeholders

Perfect for preprocessing data before building MMM models!

Owl Mix is particularly useful for:

  • Preprocessing marketing data
  • Feature engineering for MMM
  • Understanding lagged media effects
  • Generating EDA reports before modeling

🔧 Roadmap

Planned enhancements:

  • Visualization support (plots, heatmaps)
  • HTML report generation
  • Automated MMM diagnostics
  • CLI support

🤝 Contributing

Contributions are welcome!

Feel free to:

  • Open issues
  • Suggest features
  • Submit pull requests

📄 License

This project is licensed under the MIT License.


⭐ Support

If you find this project useful, consider giving it a star ⭐ on GitHub!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

owl_mix-0.1.4.tar.gz (29.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

owl_mix-0.1.4-py3-none-any.whl (42.3 kB view details)

Uploaded Python 3

File details

Details for the file owl_mix-0.1.4.tar.gz.

File metadata

  • Download URL: owl_mix-0.1.4.tar.gz
  • Upload date:
  • Size: 29.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for owl_mix-0.1.4.tar.gz
Algorithm Hash digest
SHA256 e464cbff4fdc55a5493c387e189d1640b527690dd6a951b82e3ed8956d1a12ff
MD5 47c81dc90e53a7b6d884ebbb0663bc34
BLAKE2b-256 be1309fd0056b5cdc5bdfb8fda659631eed103417e51295d3f51bcfc93738bd8

See more details on using hashes here.

File details

Details for the file owl_mix-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: owl_mix-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 42.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for owl_mix-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8bad55b693a7f40be1ea147af4ce63df2768cc5b8fa3d129e2510dde4cd7d98a
MD5 562ef4a792df3548c33fa332f0faab63
BLAKE2b-256 52d1c915a5106bfeb6dd5b4d7a178e83bec5fe3f853c2834d0484a175721e938

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page