Spaces:
Runtime error
Runtime error
Claude Sonnet 4.6
Rebrand: Marketing Mix Intelligence → PRISM Marketing Intelligence; AIRA → NOVA
47b08cd Download templates/diagnostics.html from StrategyForge/PRISM-Marketing-Mix-Intelligence: direct link, hf CLI and curl.
- Browser
- Download file 13.8 kB
-
https://huggingface.co/spaces/StrategyForge/PRISM-Marketing-Mix-Intelligence/resolve/main/templates/diagnostics.html
- Command line
-
hf download hf://spaces/StrategyForge/PRISM-Marketing-Mix-Intelligence/templates/diagnostics.html
-
curl -L -o diagnostics.html https://huggingface.co/spaces/StrategyForge/PRISM-Marketing-Mix-Intelligence/resolve/main/templates/diagnostics.html
13.8 kB
| {% extends "base.html" %} | |
| {% block page_title %}Volume & Revenue Drivers{% endblock %} | |
| {% block content %} | |
| <div class="page-header"> | |
| <h2>Volume & Revenue Drivers</h2> | |
| <p>Investment performance scorecard, revenue decomposition, driver contributions, and seasonality — the full story of what fuels growth</p> | |
| </div> | |
| <!-- KPI Cards --> | |
| <div class="kpi-grid" id="diagKpiGrid"></div> | |
| <!-- NOVA Insights --> | |
| <div class="nova-insights"> | |
| <div class="nova-insight-card" onclick="sendNOVA('What are the top drivers of revenue growth in this period?')"> | |
| <div class="nova-insight-header"> | |
| <div class="nova-insight-icon insight">📊</div> | |
| <span class="nova-insight-label">NOVA Insight</span> | |
| </div> | |
| <div class="nova-insight-text"><strong>Revenue Drivers</strong> — Analyzing which media, promo, and seasonal factors contributed most to revenue this period vs the last.</div> | |
| </div> | |
| <div class="nova-insight-card" onclick="sendNOVA('How much of revenue is driven by marketing vs base demand?')"> | |
| <div class="nova-insight-header"> | |
| <div class="nova-insight-icon win">🏆</div> | |
| <span class="nova-insight-label">Base vs Incremental</span> | |
| </div> | |
| <div class="nova-insight-text"><strong>Organic vs Paid</strong> — Base demand accounts for ~40% of revenue. Marketing-driven channels collectively lift the remainder through incremental contribution.</div> | |
| </div> | |
| <div class="nova-insight-card" onclick="sendNOVA('Which marketing investment is showing the best efficiency trend?')"> | |
| <div class="nova-insight-header"> | |
| <div class="nova-insight-icon insight">⚡</div> | |
| <span class="nova-insight-label">Efficiency Trend</span> | |
| </div> | |
| <div class="nova-insight-text"><strong>ROI Trajectory</strong> — Track whether each marketing bucket (Media, Consumer Promo, Trade Promo) is becoming more or less efficient over time.</div> | |
| </div> | |
| </div> | |
| <!-- =============================================================== --> | |
| <!-- SECTION 0: Marketing Investment & Performance Scorecard --> | |
| <!-- =============================================================== --> | |
| <div class="section-header"> | |
| <h3>🎯 Marketing Investment & Performance Scorecard</h3> | |
| <span class="section-subtitle">Side-by-side comparison of Media, Consumer Promo, and Trade Promo — investment, volume uplift, efficiency, and ROI vs prior period</span> | |
| </div> | |
| <div class="table-container"> | |
| <div class="table-wrapper"> | |
| <table class="data-table" id="roiScorecardTable"> | |
| <thead> | |
| <tr> | |
| <th>Channel / Bucket</th> | |
| <th class="num">Investment (Current)</th> | |
| <th class="num">Investment (Prior)</th> | |
| <th class="num">Inv. Change %</th> | |
| <th class="num">Volume Uplift %</th> | |
| <th class="num">Efficiency Cur (Rev/$)</th> | |
| <th class="num">Efficiency Prior</th> | |
| <th class="num">ROI (Current)</th> | |
| <th class="num">ROI (Prior)</th> | |
| <th class="num">ROI Change %</th> | |
| </tr> | |
| </thead> | |
| <tbody id="roiScorecardBody"></tbody> | |
| </table> | |
| </div> | |
| </div> | |
| <!-- =============================================================== --> | |
| <!-- SECTION 1: Revenue Decomposition (full-width) --> | |
| <!-- =============================================================== --> | |
| <div class="section-header"> | |
| <h3>📈 Revenue Decomposition by Driver</h3> | |
| <span class="section-subtitle">How much revenue comes from Base Sales, each Media Channel, Promos, and Seasonality over time</span> | |
| </div> | |
| <div class="charts-grid"> | |
| <div class="chart-container full-width"> | |
| <div class="chart-header"> | |
| <span class="chart-title">Revenue Decomposition Over Time</span> | |
| <div class="chart-actions"> | |
| <button class="chart-action-btn" onclick="expandChart('chart_decomposition')" title="Fullscreen"> | |
| <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" y1="3" x2="14" y2="10"/><line x1="3" y1="21" x2="10" y2="14"/></svg> | |
| </button> | |
| </div> | |
| </div> | |
| <div class="chart-area" id="chart_decomposition"><div class="loading-overlay"><div class="spinner"></div></div></div> | |
| </div> | |
| </div> | |
| <!-- =============================================================== --> | |
| <!-- SECTION 2: Volume Contribution by Period + Donut --> | |
| <!-- Two-column: stacked bar (periods) LEFT | Base vs Incremental RIGHT + support table below --> | |
| <!-- =============================================================== --> | |
| <div class="section-header"> | |
| <h3>📦 Volume Contribution by Period & Driver Mix</h3> | |
| <span class="section-subtitle">How each driver's revenue contribution has shifted across years/quarters, and the overall base vs incremental split</span> | |
| </div> | |
| <div class="charts-grid"> | |
| <div class="chart-container"> | |
| <div class="chart-header"> | |
| <span class="chart-title">Revenue Contribution by Driver — Period Comparison</span> | |
| <div class="chart-actions"> | |
| <button class="chart-action-btn" onclick="expandChart('chart_vol_contribution')" title="Fullscreen"> | |
| <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" y1="3" x2="14" y2="10"/><line x1="3" y1="21" x2="10" y2="14"/></svg> | |
| </button> | |
| </div> | |
| </div> | |
| <div class="chart-area" id="chart_vol_contribution"><div class="loading-overlay"><div class="spinner"></div></div></div> | |
| </div> | |
| <div class="chart-container"> | |
| <div class="chart-header"> | |
| <span class="chart-title">Base (Organic) vs Marketing-Driven Split</span> | |
| <div class="chart-actions"> | |
| <button class="chart-action-btn" onclick="expandChart('chart_base_incremental')" title="Fullscreen"> | |
| <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" y1="3" x2="14" y2="10"/><line x1="3" y1="21" x2="10" y2="14"/></svg> | |
| </button> | |
| </div> | |
| </div> | |
| <div class="chart-area" id="chart_base_incremental"><div class="loading-overlay"><div class="spinner"></div></div></div> | |
| </div> | |
| </div> | |
| <!-- Support vs Contribution Table (justifies the charts above) --> | |
| <div class="table-container"> | |
| <div class="table-header"> | |
| <h3>Driver Support & Contribution Detail</h3> | |
| <span style="font-size:12px;color:#6b7280;">Investment (support) per driver, attributed revenue, volume contribution, efficiency, and share of total revenue</span> | |
| </div> | |
| <div class="table-wrapper"> | |
| <table class="data-table" id="supportContribTable"> | |
| <thead> | |
| <tr> | |
| <th>Driver</th> | |
| <th>Category</th> | |
| <th class="num">Support / Investment</th> | |
| <th class="num">Revenue Contribution</th> | |
| <th class="num">Volume Contribution</th> | |
| <th class="num">Efficiency (Rev / $)</th> | |
| <th class="num">% of Total Revenue</th> | |
| </tr> | |
| </thead> | |
| <tbody id="supportContribBody"></tbody> | |
| </table> | |
| </div> | |
| </div> | |
| <!-- =============================================================== --> | |
| <!-- SECTION 3: Investment Mix + Efficiency Trend --> | |
| <!-- =============================================================== --> | |
| <div class="section-header"> | |
| <h3>💰 Investment Mix & Marketing Efficiency</h3> | |
| <span class="section-subtitle">How the investment mix (Media vs Promo vs Trade) has evolved, and whether returns per dollar are improving</span> | |
| </div> | |
| <div class="charts-grid"> | |
| <div class="chart-container"> | |
| <div class="chart-header"> | |
| <span class="chart-title">Investment Mix Over Time</span> | |
| <div class="chart-actions"> | |
| <button class="chart-action-btn" onclick="expandChart('chart_inv_mix')" title="Fullscreen"> | |
| <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" y1="3" x2="14" y2="10"/><line x1="3" y1="21" x2="10" y2="14"/></svg> | |
| </button> | |
| </div> | |
| </div> | |
| <div class="chart-area" id="chart_inv_mix"><div class="loading-overlay"><div class="spinner"></div></div></div> | |
| </div> | |
| <div class="chart-container"> | |
| <div class="chart-header"> | |
| <span class="chart-title">Marketing Efficiency Trend (Revenue per $ Invested)</span> | |
| <div class="chart-actions"> | |
| <button class="chart-action-btn" onclick="expandChart('chart_efficiency_trend')" title="Fullscreen"> | |
| <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" y1="3" x2="14" y2="10"/><line x1="3" y1="21" x2="10" y2="14"/></svg> | |
| </button> | |
| </div> | |
| </div> | |
| <div class="chart-area" id="chart_efficiency_trend"><div class="loading-overlay"><div class="spinner"></div></div></div> | |
| </div> | |
| </div> | |
| <!-- =============================================================== --> | |
| <!-- SECTION 4: Contribution Share + Period Waterfall --> | |
| <!-- =============================================================== --> | |
| <div class="section-header"> | |
| <h3>💵 Contribution Share & Period Comparison</h3> | |
| <span class="section-subtitle">Which driver contributes the most, and how did performance change period-over-period</span> | |
| </div> | |
| <div class="charts-grid"> | |
| <div class="chart-container"> | |
| <div class="chart-header"> | |
| <span class="chart-title">Contribution Share by Driver (Waterfall)</span> | |
| <div class="chart-actions"> | |
| <button class="chart-action-btn" onclick="expandChart('chart_contribution')" title="Fullscreen"> | |
| <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" y1="3" x2="14" y2="10"/><line x1="3" y1="21" x2="10" y2="14"/></svg> | |
| </button> | |
| </div> | |
| </div> | |
| <div class="chart-area" id="chart_contribution"><div class="loading-overlay"><div class="spinner"></div></div></div> | |
| </div> | |
| <div class="chart-container"> | |
| <div class="chart-header"> | |
| <span class="chart-title">Revenue Change Breakdown (Period vs Period)</span> | |
| <div class="chart-actions"> | |
| <button class="chart-action-btn" onclick="expandChart('chart_waterfall')" title="Fullscreen"> | |
| <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" y1="3" x2="14" y2="10"/><line x1="3" y1="21" x2="10" y2="14"/></svg> | |
| </button> | |
| </div> | |
| </div> | |
| <div class="chart-area" id="chart_waterfall"><div class="loading-overlay"><div class="spinner"></div></div></div> | |
| </div> | |
| </div> | |
| <!-- =============================================================== --> | |
| <!-- SECTION 5: Seasonality + Overall Summary Table --> | |
| <!-- =============================================================== --> | |
| <div class="section-header"> | |
| <h3>🔄 Seasonality & Period Performance Summary</h3> | |
| <span class="section-subtitle">Recurring seasonal patterns and full period-over-period KPI comparison</span> | |
| </div> | |
| <div class="charts-grid"> | |
| <div class="chart-container full-width"> | |
| <div class="chart-header"> | |
| <span class="chart-title">Revenue Seasonality Index</span> | |
| <div class="chart-actions"> | |
| <button class="chart-action-btn" onclick="expandChart('chart_seasonality')" title="Fullscreen"> | |
| <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" y1="3" x2="14" y2="10"/><line x1="3" y1="21" x2="10" y2="14"/></svg> | |
| </button> | |
| </div> | |
| </div> | |
| <div class="chart-area" id="chart_seasonality"><div class="loading-overlay"><div class="spinner"></div></div></div> | |
| </div> | |
| </div> | |
| <!-- Overall KPI Summary Table --> | |
| <div class="table-container"> | |
| <div class="table-header"> | |
| <h3>Period-over-Period KPI Summary</h3> | |
| </div> | |
| <div class="table-wrapper"> | |
| <table class="data-table summary-table" id="overallSummaryTable"> | |
| <thead> | |
| <tr> | |
| <th>Metric</th> | |
| <th class="num">Current Period</th> | |
| <th class="num">Previous Period</th> | |
| <th class="num">Change</th> | |
| <th class="num">% Change</th> | |
| </tr> | |
| </thead> | |
| <tbody id="overallSummaryBody"></tbody> | |
| </table> | |
| </div> | |
| </div> | |
| {% endblock %} | |
| {% block scripts %} | |
| <script src="{{ url_for('static', filename='js/diagnostics.js') }}"></script> | |
| {% endblock %} | |