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 formateda_report.html: Beautiful HTML report with chartsoutputs/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 detailsdocs/transform.md→ Data transformation featuresdocs/saturation.md→ Saturation modeling
🧪 Examples
Ready-to-run examples in the examples/ folder:
eda_basic.py- Basic EDA report generationeda_full_workflow.py- Complete workflow examplemmm_workflow_example.py- Marketing Mix Modeling example
🧠 Use Case: Marketing Mix Modeling
OwlMix is designed for MMM workflows where you need to:
- Explore relationships between marketing spend and sales
- Identify multicollinearity issues with VIF
- Analyze time-based patterns and correlations
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e464cbff4fdc55a5493c387e189d1640b527690dd6a951b82e3ed8956d1a12ff
|
|
| MD5 |
47c81dc90e53a7b6d884ebbb0663bc34
|
|
| BLAKE2b-256 |
be1309fd0056b5cdc5bdfb8fda659631eed103417e51295d3f51bcfc93738bd8
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8bad55b693a7f40be1ea147af4ce63df2768cc5b8fa3d129e2510dde4cd7d98a
|
|
| MD5 |
562ef4a792df3548c33fa332f0faab63
|
|
| BLAKE2b-256 |
52d1c915a5106bfeb6dd5b4d7a178e83bec5fe3f853c2834d0484a175721e938
|