Skip to content

Plotting Design proposal#2169

Draft
isofer wants to merge 3 commits intomainfrom
isofer/plotting-design
Draft

Plotting Design proposal#2169
isofer wants to merge 3 commits intomainfrom
isofer/plotting-design

Conversation

@isofer
Copy link
Contributor

@isofer isofer commented Jan 7, 2026

MMM Data & Plotting Framework Design Documents

These four research documents outline a comprehensive three-component architecture for the MMM data handling and interactive plotting framework. The design addresses the "trapped data" problem where users couldn't access summary statistics used in plots, and provides a modern, interactive visualization layer.

  • 2026-01-07_21-08-47_mmm-data-plotting-framework-architecture.md — The foundational architecture document establishing the three-component decoupled system. Evaluates requirements, identifies current pain points (data duplication, matplotlib lock-in, no time aggregation), and recommends both factory functions and class wrappers as first-class citizens.

  • 2026-01-07_22-19-51_codifying-idata-conventions-component1-wrapper.md — Component 1 (Data Wrapper) design. Defines MMMIDataWrapper that codifies InferenceData conventions, providing validated access to idata with operations for date/dimension filtering, time aggregation, and scaling transformations. Catalogs 50+ naming patterns and implicit conventions.

  • 2026-01-08_20-09-03_component2-mmm-summary-object-implementation.md — Component 2 (Summary Object) design. Specifies MMMSummaryFactory that transforms wrapped data into structured DataFrames with HDI statistics. Supports both Pandas and Polars output via output_format parameter, with Pandas as default for PyMC/ArviZ ecosystem alignment.

  • 2026-01-09_17-16-52_component3-plotting-suite-implementation.md — Component 3 (Plotting Suite) design. Details the new Plotly-based interactive plotting functions using Narwhals for DataFrame-agnostic input and Plotly Express faceting for multi-dimensional MMM models (country, brand, region). Coexists alongside the existing matplotlib-based MMMPlotSuite.

@codecov
Copy link

codecov bot commented Jan 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.55%. Comparing base (ceb76cd) to head (b3d8593).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2169   +/-   ##
=======================================
  Coverage   92.55%   92.55%           
=======================================
  Files          71       71           
  Lines       10279    10279           
=======================================
  Hits         9514     9514           
  Misses        765      765           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@isofer isofer changed the title WIP Plotting Design proposal Jan 9, 2026
@isofer
Copy link
Contributor Author

isofer commented Jan 9, 2026

@juanitorduz I've uploaded all my design documents here.
I've updated the design for component 1 based on your comments and added designs for component 2 and 3. See the description of this PR for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant