Visualization & Reports Tutorials¶
Learning Path
Prerequisites: At least one model family completed Time: 2--5 hours Level: Beginner -- Intermediate
Overview¶
PanelBox includes a comprehensive visualization system with 28+ chart types and an automated HTML report generator. These tutorials show you how to create publication-quality diagnostic plots, compare models visually, customize themes, and generate self-contained HTML reports that combine all your analysis in one interactive document.
The visualization system supports both Plotly (interactive) and Matplotlib (static) backends, with three built-in themes (professional, academic, presentation) and the ability to create custom themes. The report system generates standalone HTML files that can be shared with collaborators -- no Python installation needed to view them.
The existing HTML Reports Tutorial provides additional depth on the report system, including master reports and JSON export.
Visualization Notebooks¶
| # | Tutorial | Level | Time | Colab |
|---|---|---|---|---|
| 1 | Visualization Introduction | Beginner | 30 min | |
| 2 | Visual Diagnostics | Beginner | 45 min | |
| 3 | Advanced Visualizations | Intermediate | 45 min | |
| 4 | Automated Reports | Intermediate | 45 min |
Production Notebooks¶
For workflows that take models from development to deployment:
| # | Tutorial | Level | Time | Colab |
|---|---|---|---|---|
| 1 | Predict Fundamentals | Intermediate | 45 min | |
| 2 | Save & Load Models | Intermediate | 45 min | |
| 3 | Production Pipeline | Advanced | 60 min | |
| 4 | Model Validation | Advanced | 45 min | |
| 5 | Model Versioning | Advanced | 45 min | |
| 6 | Bank LGD Case Study | Advanced | 60 min |
Learning Paths¶
Charts (2 hours)¶
Essential visualization skills:
Notebooks: Visualization 1, 2
Covers chart creation, residual diagnostics, and theme selection.
Reports (3 hours)¶
Add automated reporting:
Notebooks: Visualization 1, 2, 4 + Production 1
Includes automated HTML report generation and prediction fundamentals.
Complete (5 hours)¶
Full visualization and production workflow:
Notebooks: Visualization 1--4 + Production 1--2
Adds advanced visualizations, custom themes, and model persistence.
Key Concepts Covered¶
- Chart Factory: Create charts by name using
ChartFactory.create() - Residual diagnostics: QQ plot, residual vs fitted, scale-location, leverage
- Model comparison: Coefficient plots, forest plots, IC comparison
- Panel charts: Entity effects, time effects, between-within decomposition
- Themes: Professional, academic, presentation, custom themes
- Export: PNG, SVG, PDF, HTML formats
- HTML reports: Self-contained interactive reports
- Master reports: Combined validation + comparison + residual reports
- PanelExperiment: Automated multi-model analysis workflow
- Model persistence: Save and load fitted models
Quick Example¶
from panelbox.visualization import create_residual_diagnostics, create_comparison_charts
from panelbox import PanelExperiment
# Residual diagnostic charts
charts = create_residual_diagnostics(results, theme='professional')
charts['qq_plot'].to_html()
# Model comparison
exp = PanelExperiment(data, formula="y ~ x1 + x2", entity_col="id", time_col="year")
exp.fit_all_models(["pooled_ols", "fixed_effects", "random_effects"])
# Master report
exp.save_master_report("master_report.html", theme='professional')
Solutions¶
Visualization Solutions¶
| Tutorial | Solution |
|---|---|
| 01. Introduction | Solution |
| 02. Visual Diagnostics | Solution |
| 03. Advanced Visualizations | Solution |
| 04. Automated Reports | Solution |
Production Solutions¶
| Tutorial | Solution |
|---|---|
| 01. Predict Fundamentals | Solution |
| 02. Save & Load | Solution |
Related Documentation¶
- HTML Reports Tutorial -- Detailed HTML report walkthrough
- Visualization -- Chart gallery and API reference
- User Guide -- Experiment and report API