Try Live
Add Docs
Rankings
Pricing
Enterprise
Docs
Install
Install
Docs
Pricing
Enterprise
More...
More...
Try Live
Rankings
Add Docs
Report Creator
https://github.com/darenr/report_creator
Admin
A Python library for easily assembling professional-looking HTML reports from various components
...
Tokens:
127,280
Snippets:
1,173
Trust Score:
8.3
Update:
1 day ago
Context
Skills
Chat
Benchmark
91.4
Suggestions
Latest
Show doc for...
Code
Info
Show Results
Context Summary (auto-generated)
Raw
Copy
Link
# report_creator `report_creator` is a Python library for assembling professional, self-contained HTML reports from composable components. It is designed for data scientists and engineers who need to go from Python data (DataFrames, Plotly figures, Matplotlib figures, code snippets, Markdown text) to a polished, shareable HTML file without writing any HTML or CSS. The library's philosophy is simple: components flow either vertically (`rc.Block`) or horizontally (`rc.Group`), and every component renders itself to a self-contained HTML fragment. The final report bundles only the JavaScript dependencies it actually needs (Plotly, DataTables, Mermaid.js, Highlight.js, GLightbox) into a single portable `.html` file. The library offers a rich catalogue covering layout primitives, KPI metrics, interactive charts, code display with syntax highlighting, Mermaid diagrams, image galleries, tabbed interfaces, accordions, collapsible sections, admonition callouts, and slide decks. All components inherit from a common `Base` abstract class and implement a single `to_html()` method, making the component model extensible. The `ReportCreator` context manager handles Matplotlib color cycle injection, Plotly theme registration, and final Jinja2 template rendering—producing a UTF-8 HTML file that opens in any modern browser without a server. --- ## Installation ```bash pip install report-creator ``` --- ## ReportCreator The primary entry point and context manager that assembles all components into a final HTML file. ```python import report_creator as rc import plotly.express as px with rc.ReportCreator( title="Q3 Sales Report", description="**Revenue** and pipeline analysis for Q3 2024.", author="Data Team", accent_color="#3b82f6", footer="Generated with [report_creator](https://github.com/darenr/report_creator)", code_theme="github-dark-min", # Highlight.js theme diagram_theme="default", # Mermaid.js theme flat_look=False, # True = flat design, False = 3D look ) as report: view = rc.Block( rc.Metric(heading="Total Revenue", value=4_200_000, unit=" USD"), ) report.save(view, "q3_report.html") # report.save(view, "q3_report.html", prettify_html=True) # BeautifulSoup prettification ``` --- ## Block Stacks child components **vertically**, one beneath the other. This is the root layout container for an entire report or a sub-section. ```python import report_creator as rc view = rc.Block( rc.Heading("Section 1", level=2), rc.Text("Some introductory paragraph."), rc.Separator(), rc.Heading("Section 2", level=2), rc.Text("Another paragraph."), label="My Report Body", ) with rc.ReportCreator(title="Block Demo") as report: report.save(view, "block_demo.html") ``` --- ## Group Arranges child components **horizontally**, side-by-side. Use inside a `Block` to create multi-column rows. ```python import report_creator as rc view = rc.Block( rc.Group( rc.Metric(heading="Accuracy", value=0.97), rc.Metric(heading="Precision", value=0.95), rc.Metric(heading="Recall", value=0.93), label="Model Performance KPIs", ) ) with rc.ReportCreator(title="Group Demo") as report: report.save(view, "group_demo.html") ``` --- ## Metric Displays a single KPI value with a heading, optional unit, optional markdown description, optional colored background, and an optional embedded Gauge or Bullet chart. ```python import report_creator as rc view = rc.Block( rc.Group( rc.Metric( heading="Monthly Active Users", value=1_250_000, label="Up **12 %** month-over-month", color=True, # deterministic pastel background from heading seed ), rc.Metric( heading="Error Rate", value=0.0032, unit="%", float_precision=4, label="Target: < 0.005 %", bullet={"target": 0.005, "min_value": 0, "max_value": 0.01, "color": "red"}, ), rc.Metric( heading="CPU Utilization", value=73.5, unit="%", gauge={"min_value": 0, "max_value": 100, "color": "orange"}, ), ) ) with rc.ReportCreator(title="Metrics Demo") as report: report.save(view, "metrics_demo.html") ``` --- ## MetricGroup Creates a horizontal row of `Metric` cards directly from a DataFrame, mapping one column to headings and another to values. ```python import pandas as pd import report_creator as rc kpi_df = pd.DataFrame({ "kpi": ["Churn Rate", "NPS Score", "CSAT", "Avg Handle Time"], "value": [0.032, 72, 4.6, 183], }) view = rc.Block( rc.MetricGroup( kpi_df, heading="kpi", value="value", label="Customer Experience KPIs", ) ) with rc.ReportCreator(title="MetricGroup Demo") as report: report.save(view, "metric_group_demo.html") ``` --- ## EventMetric Tracks how often a boolean condition is true in a time-series DataFrame, showing total event count and a mini sparkline chart. ```python import pandas as pd import report_creator as rc logs = pd.read_csv("server_logs.csv") # columns: time, status, latency_ms, endpoint view = rc.Block( rc.Group( rc.EventMetric( logs, condition="status == 200", date="time", frequency="D", # aggregate daily color="green", heading="Successful Requests (200)", label="Daily count of HTTP 200 responses", ), rc.EventMetric( logs, condition="status >= 500", date="time", frequency="D", color="red", heading="Server Errors (5xx)", ), rc.EventMetric( logs, condition="latency_ms > 1000", date="time", frequency="W", # aggregate weekly color="orange", heading="Slow Requests (>1 s)", ), ) ) with rc.ReportCreator(title="Event Metrics") as report: report.save(view, "event_metrics.html") ``` --- ## Table Renders a static, styled HTML table from a DataFrame or list of dicts. ```python import pandas as pd import report_creator as rc data = [ {"Product": "Widget A", "Q1": 120, "Q2": 145, "Q3": 132}, {"Product": "Widget B", "Q1": 98, "Q2": 110, "Q3": 123}, {"Product": "Gadget X", "Q1": 210, "Q2": 198, "Q3": 225}, ] view = rc.Block( rc.Table( data, # also accepts pd.DataFrame label="Quarterly Sales", index=False, # hide DataFrame index float_precision=2, ) ) with rc.ReportCreator(title="Table Demo") as report: report.save(view, "table_demo.html") ``` --- ## DataTable Renders an **interactive** table with client-side search, sort, and pagination powered by DataTables.js. ```python import plotly.express as px import report_creator as rc gapminder = px.data.gapminder() view = rc.Block( rc.DataTable( gapminder, label="Gapminder World Dataset", index=False, wrap_text=False, # nowrap for wide tables max_rows=500, # cap for performance float_precision=2, ) ) with rc.ReportCreator(title="DataTable Demo") as report: report.save(view, "datatable_demo.html") ``` --- ## Bar Interactive bar chart via Plotly Express. Supports grouped/stacked bars via `dimension`. ```python import plotly.express as px import report_creator as rc medals = px.data.medals_long() view = rc.Block( rc.Bar( medals, x="nation", y="count", dimension="medal", # color-coded groups label="Olympic Medal Count by Nation", barmode="group", # extra kwargs passed to px.bar() ) ) with rc.ReportCreator(title="Bar Chart Demo") as report: report.save(view, "bar_demo.html") ``` --- ## Line Interactive multi-series line chart with optional splines and markers. ```python import plotly.express as px import report_creator as rc stocks = px.data.stocks() view = rc.Block( rc.Line( stocks, x="date", y=["GOOG", "AAPL", "MSFT", "NFLX"], # multiple y columns label="Tech Stock Prices 2018–2019", ) ) with rc.ReportCreator(title="Line Chart Demo") as report: report.save(view, "line_demo.html") ``` --- ## Scatter Interactive scatter plot with optional dimension coloring, symbol differentiation, and marginal distribution plots. ```python import plotly.express as px import report_creator as rc iris = px.data.iris() view = rc.Block( rc.Scatter( iris, x="sepal_width", y="sepal_length", dimension="species", # color + symbol per species marginal="histogram", # "histogram" | "box" | "violin" | "rug" label="Iris Dataset – Sepal Dimensions", ) ) with rc.ReportCreator(title="Scatter Demo") as report: report.save(view, "scatter_demo.html") ``` --- ## Pie Pie or donut chart (default is donut with `hole=0.4`). ```python import plotly.express as px import report_creator as rc europe_2002 = px.data.gapminder().query("year == 2002 and continent == 'Europe'") view = rc.Block( rc.Pie( europe_2002, values="pop", names="country", label="2002 European Population Distribution", hole=0, # 0 = pie, 0.4 = donut (default) ) ) with rc.ReportCreator(title="Pie Chart Demo") as report: report.save(view, "pie_demo.html") ``` --- ## Histogram Distribution histogram with optional color dimension. ```python import plotly.express as px import report_creator as rc tips = px.data.tips() view = rc.Block( rc.Histogram( tips, x="total_bill", dimension="sex", # color-coded by category label="Total Bill Distribution by Gender", nbins=30, # extra kwargs to px.histogram() ) ) with rc.ReportCreator(title="Histogram Demo") as report: report.save(view, "histogram_demo.html") ``` --- ## Box Box plot for distribution comparison across categories. ```python import plotly.express as px import report_creator as rc tips = px.data.tips() view = rc.Block( rc.Box( tips, y="total_bill", dimension="day", # groups on x-axis label="Total Bill by Day of Week", ) ) with rc.ReportCreator(title="Box Plot Demo") as report: report.save(view, "box_demo.html") ``` --- ## Radar Spider/radar chart where each DataFrame row is a trace and each column is an axis category. ```python import pandas as pd import report_creator as rc df = pd.DataFrame({ "GPT-4": {"Reasoning": 0.91, "Coding": 0.88, "Math": 0.84, "Language": 0.95, "Safety": 0.80}, "Claude 3": {"Reasoning": 0.93, "Coding": 0.85, "Math": 0.82, "Language": 0.97, "Safety": 0.92}, "Gemini": {"Reasoning": 0.89, "Coding": 0.83, "Math": 0.87, "Language": 0.90, "Safety": 0.85}, }).T # rows = models, columns = categories view = rc.Block( rc.Radar( df, label="LLM Benchmark Comparison", lock_minimum_to_zero=True, filled=False, ) ) with rc.ReportCreator(title="Radar Demo") as report: report.save(view, "radar_demo.html") ``` --- ## Timeline Gantt-style chart for project/task scheduling. Start and finish columns must be datetime dtype. ```python import pandas as pd import report_creator as rc project = pd.DataFrame({ "task": ["Discovery", "Design", "Engineering", "QA", "Launch"], "start": pd.to_datetime(["2024-01-08", "2024-01-22", "2024-02-05", "2024-03-18", "2024-04-01"]), "finish": pd.to_datetime(["2024-01-19", "2024-02-02", "2024-03-15", "2024-03-29", "2024-04-05"]), "team": ["Strategy", "Design", "Engineering", "QA", "All"], }) view = rc.Block( rc.Timeline( project, task="task", start="start", finish="finish", dimension="team", label="Q1 Product Roadmap", ) ) with rc.ReportCreator(title="Timeline Demo") as report: report.save(view, "timeline_demo.html") ``` --- ## Gauge Radial gauge indicator for a single value within a min/max scale. Can also be embedded inside `rc.Metric` via the `gauge=` argument. ```python import report_creator as rc view = rc.Block( rc.Group( rc.Gauge(value=73.5, min_value=0, max_value=100, title="CPU %", unit="%", color="orange"), rc.Gauge(value=4.2, min_value=0, max_value=16, title="Memory GB", unit=" GB", color="green"), rc.Gauge(value=920, min_value=0, max_value=1000, title="Requests/s", color="#3b82f6"), ) ) with rc.ReportCreator(title="Gauge Demo") as report: report.save(view, "gauge_demo.html") ``` --- ## Bullet Bullet chart comparing a current value against a target and scale range. Can also be embedded inside `rc.Metric` via the `bullet=` argument. ```python import report_creator as rc view = rc.Block( rc.Group( rc.Bullet(value=82, target=90, min_value=0, max_value=100, title="Sales Quota", unit="%", color="#3b82f6"), rc.Bullet(value=0.003, target=0.005, min_value=0, max_value=0.01, title="Error Rate", unit="%", color="red"), ) ) with rc.ReportCreator(title="Bullet Demo") as report: report.save(view, "bullet_demo.html") ``` --- ## Widget A generic wrapper that intelligently renders any Python object: Plotly `go.Figure`, Matplotlib `Figure`, Pandas DataFrame, or any object with `_repr_html_()`. ```python import matplotlib.pyplot as plt import plotly.graph_objects as go import pandas as pd import report_creator as rc # Matplotlib figure fig_mpl, ax = plt.subplots() ax.plot([1, 2, 3, 4], [10, 14, 9, 17]) ax.set_title("Sample Matplotlib Line") # Plotly figure fig_plotly = go.Figure(go.Bar(x=["A", "B", "C"], y=[3, 7, 5])) fig_plotly.update_layout(title="Plotly Bar") df = pd.DataFrame({"x": [1, 2, 3], "y": [4, 5, 6]}) view = rc.Block( rc.Widget(fig_mpl, label="Matplotlib Figure"), rc.Widget(fig_plotly, label="Plotly Figure"), rc.Widget(df, label="DataFrame"), ) with rc.ReportCreator(title="Widget Demo") as report: report.save(view, "widget_demo.html") ``` --- ## Markdown / Text Renders GitHub Flavored Markdown including emojis, LaTeX math, and RST admonitions. `rc.Text` is a direct alias. ```python import report_creator as rc content = """ # Analysis Summary The model achieved **97.3% accuracy** on the test set. Key observations: - Precision: `0.961` - Recall: `0.974` - F1-Score: `0.967` Inline math: $E = mc^2$ Block math: $$\\hat{\\beta} = (X^T X)^{-1} X^T y$$ :tada: Training complete! :chart_with_upwards_trend: """ view = rc.Block( rc.Markdown(content, label="Model Report", bordered=True) ) with rc.ReportCreator(title="Markdown Demo") as report: report.save(view, "markdown_demo.html") ``` --- ## Heading Inserts an HTML heading element (h1–h5) as a visual section title. ```python import report_creator as rc view = rc.Block( rc.Heading("Executive Summary", level=1), rc.Text("High-level overview..."), rc.Heading("Detailed Findings", level=2), rc.Text("In-depth analysis..."), rc.Heading("Appendix", level=3), ) with rc.ReportCreator(title="Heading Demo") as report: report.save(view, "heading_demo.html") ``` --- ## Separator Inserts a horizontal rule (`<hr>`) with an optional labeled anchor. ```python import report_creator as rc view = rc.Block( rc.Text("Section A content"), rc.Separator(label="End of Section A"), rc.Text("Section B content"), rc.Separator(), ) with rc.ReportCreator(title="Separator Demo") as report: report.save(view, "separator_demo.html") ``` --- ## Code / Python / Sql / Yaml / Json / Shell / Java / Prolog / Plaintext Displays code with syntax highlighting via Highlight.js. Language-specific subclasses auto-set the language. `rc.Code` accepts any supported language string explicitly. ```python import report_creator as rc view = rc.Block( rc.Python( """ def fibonacci(n: int) -> list[int]: a, b = 0, 1 seq = [] while a < n: seq.append(a) a, b = b, a + b return seq print(fibonacci(100)) """, label="fibonacci.py", scroll_long_content=False, ), rc.Sql( "select id, name, created_at from users where active = 1 order by created_at desc limit 50", prettify=True, # heuristic formatter: uppercases keywords, adds newlines label="Active users query", ), rc.Json({"model": "gpt-4o", "temperature": 0.7, "max_tokens": 2048}, label="API config"), rc.Yaml({"name": "my-app", "replicas": 3, "image": "my-app:1.2.5"}, label="k8s config"), rc.Shell("#!/bin/bash\npip install report-creator && python run_report.py", label="deploy.sh"), rc.Code("SELECT 1", language="sql", label="inline code via rc.Code"), ) with rc.ReportCreator(title="Code Demo") as report: report.save(view, "code_demo.html") ``` --- ## Diagram Renders a Mermaid.js diagram from a text definition, with optional pan & zoom interaction. ```python import report_creator as rc view = rc.Block( rc.Diagram( src=""" graph TD A[User Request] --> B{Auth?} B -- Yes --> C[Process Request] B -- No --> D[Return 401] C --> E[(Database)] E --> F[Build Response] F --> G[Return 200] """, label="Request Lifecycle", pan_and_zoom=True, ), rc.Diagram( src=""" sequenceDiagram participant C as Client participant S as Server participant DB as Database C->>S: POST /login {username, password} S->>DB: SELECT user WHERE username=? DB-->>S: user row S-->>C: 200 OK {token} """, label="Login Sequence", pan_and_zoom=False, ), ) with rc.ReportCreator(title="Diagram Demo") as report: report.save(view, "diagram_demo.html") ``` --- ## Image Embeds an image from a URL, local file path, or base64 data URI, with optional lightbox link. ```python import report_creator as rc view = rc.Block( rc.Group( rc.Image( "https://upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Bikesgray.jpg/320px-Bikesgray.jpg", label="Remote image (hotlinked)", ), rc.Image( "https://upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Bikesgray.jpg/320px-Bikesgray.jpg", label="Remote image (base64 embedded)", convert_to_base64=True, # downloads & embeds at build time link_to="https://en.wikipedia.org/wiki/Bicycle", rounded=True, ), rc.Image( "docs/source/images/chart.png", # local file → auto base64 label="Local chart image", ), ) ) with rc.ReportCreator(title="Image Demo") as report: report.save(view, "image_demo.html") ``` --- ## Gallery Displays a responsive image grid with GLightbox fullscreen on click. ```python import report_creator as rc image_urls = [ "https://placehold.co/600x400/3b82f6/fff.png", "https://placehold.co/600x400/ef4444/fff.png", "https://placehold.co/600x400/22c55e/fff.png", "https://placehold.co/600x400/f97316/fff.png", ] view = rc.Block( rc.Gallery( image_urls, labels=["Blue", "Red", "Green", "Orange"], label="Color Palette Gallery", convert_to_base64=True, # self-contained output ) ) with rc.ReportCreator(title="Gallery Demo") as report: report.save(view, "gallery_demo.html") ``` --- ## Select Creates a tabbed interface where each child component's `label` becomes a tab title. ```python import plotly.express as px import report_creator as rc view = rc.Block( rc.Select( blocks=[ rc.Bar(px.data.medals_long(), x="nation", y="count", dimension="medal", label="Medal Counts"), rc.DataTable(px.data.medals_long(), label="Raw Data"), rc.Scatter(px.data.iris(), x="sepal_width", y="sepal_length", dimension="species", label="Iris Scatter"), ], label="Olympic & Iris Explorer", ) ) with rc.ReportCreator(title="Select Demo") as report: report.save(view, "select_demo.html") ``` --- ## Accordion Stacks components as collapsible panels (`<details>/<summary>`) using each child's `label` as the panel header. ```python import report_creator as rc view = rc.Block( rc.Accordion( blocks=[ rc.Markdown("Details about **methodology** and dataset selection.", label="Methodology"), rc.Markdown("Full list of raw feature importances and SHAP values.", label="Feature Importance"), rc.Markdown("Discussion of **limitations** and future work.", label="Limitations"), ], label="Supplementary Details", open_first=True, # first panel expanded by default ) ) with rc.ReportCreator(title="Accordion Demo") as report: report.save(view, "accordion_demo.html") ``` --- ## Collapse A single collapsible `<details>/<summary>` panel. Useful for hiding verbose content (e.g., the source code that generated the report). ```python import report_creator as rc with open(__file__) as f: source_code = f.read() view = rc.Block( rc.Text("Report content above the fold."), rc.Collapse( rc.Python(source_code, label="report.py"), label="Click to view the source code that generated this report", ), ) with rc.ReportCreator(title="Collapse Demo") as report: report.save(view, "collapse_demo.html") ``` --- ## Info / Warning / Error Admonition callout blocks for highlighting notes, cautions, and critical errors. Support Markdown content. ```python import report_creator as rc view = rc.Block( rc.Info( "This analysis uses **synthetic data**. Do not use for production decisions.", label="Note", ), rc.Warning( "Model performance degrades significantly on data from before **2020-01-01**.", label="Data Drift Warning", ), rc.Error( "Pipeline run **FAILED** at step `feature_engineering`. Check logs for details.", label="Pipeline Error", ), ) with rc.ReportCreator(title="Callouts Demo") as report: report.save(view, "callouts_demo.html") ``` --- ## Html Embeds raw HTML markup with optional scoped CSS and an optional border. ```python import report_creator as rc view = rc.Block( rc.Html( "<table><tr><th>Col A</th><th>Col B</th></tr><tr><td>1</td><td>2</td></tr></table>", css="table { border-collapse: collapse; } td, th { border: 1px solid #ccc; padding: 8px; }", label="Custom HTML Table", bordered=True, ) ) with rc.ReportCreator(title="Html Demo") as report: report.save(view, "html_demo.html") ``` --- ## Unformatted Displays pre-formatted text verbatim inside `<pre><code>` tags, HTML-escaped for safety. ```python import report_creator as rc ascii_art = r""" ___________________________________ < report_creator is pretty great! > ----------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || """ view = rc.Block( rc.Unformatted(ascii_art, label="ASCII Art"), ) with rc.ReportCreator(title="Unformatted Demo") as report: report.save(view, "unformatted_demo.html") ``` --- ## Deck and Slide Assembles a navigable **slide deck** within the HTML report. Each `rc.Slide` pairs a content `Block` with a themed decorative left panel. Navigate with arrow keys or the on-screen toolbar. Supported `Slide` themes: solid color (e.g. `"#3b82f6"`, `"red"`), or a `"pattern:color"` string where pattern is one of `circles`, `blocks`, `dots`, `stripes`, `mondrian`, `retro`, `modern`. ```python import pandas as pd import plotly.express as px import report_creator as rc with rc.ReportCreator(title=None) as report: # title=None suppresses the header view = rc.Deck( rc.Slide( rc.Block( rc.Heading("Welcome", level=1), rc.Text("Use **arrow keys** or the toolbar to navigate slides."), ), theme="dots:#3b82f6", border=True, ), rc.Slide( rc.Block( rc.Heading("Data Overview", level=2), rc.Table(px.data.gapminder().head(8)), ), theme="stripes:#a855f7", ), rc.Slide( rc.Block( rc.Heading("Key Metrics", level=2), rc.Group( rc.Metric(heading="Countries", value=142), rc.Metric(heading="Years Covered", value="1952–2007"), ), ), theme="mondrian:#14b8a6", ), rc.Slide( rc.Block( rc.Heading("Thank You", level=1), rc.Text("Questions? :wave:"), ), theme="modern:#ef4444", border="#ef4444", # custom border color string ), ) report.save(view, "presentation.html") ``` --- ## report_creator_colors A curated list of hex color strings used as the default color palette across all chart components and auto-generated logos. Import and use directly for consistent branding. ```python import report_creator as rc print(rc.report_creator_colors) # ['#4e79a7', '#f28e2b', '#e15759', ...] # Use palette colors in your own Plotly figures embedded via rc.Widget import plotly.graph_objects as go fig = go.Figure() for i, color in enumerate(rc.report_creator_colors[:5]): fig.add_trace(go.Bar(name=f"Series {i+1}", x=["A", "B", "C"], y=[3+i, 5+i, 2+i], marker_color=color)) view = rc.Block(rc.Widget(fig, label="Custom palette chart")) with rc.ReportCreator(title="Palette Demo") as report: report.save(view, "palette_demo.html") ``` --- ## Summary `report_creator` is best suited for two broad integration patterns. The first is **automated reporting pipelines**: a Python script or Jupyter notebook that runs after a training job, ETL process, or analytics query pulls results into DataFrames, wraps them in `rc.Block` / `rc.Group` / chart components, and calls `report.save()` to produce a self-contained HTML artefact that can be emailed, uploaded to S3, or linked from a CI/CD summary. Because the output is a single file with no server dependency, it is trivially distributable. The second pattern is **interactive exploration dashboards**: using `rc.Select`, `rc.Accordion`, `rc.DataTable`, and `rc.Diagram` inside a `rc.Block`, a developer can assemble a feature-rich read-only dashboard that runs entirely in the browser—no Dash or Streamlit server required—covering KPI tiles, sortable/searchable data tables, Mermaid architecture diagrams, and tabbed chart comparisons all in one page. The library integrates naturally with the PyData ecosystem: DataFrames go directly into `Table` or `DataTable`, Plotly figures drop into `Widget` or the specialised chart classes, Matplotlib figures are auto-detected and base64-embedded, and any object with `_repr_html_()` (such as Pandas Styler or GeoPandas GeoDataFrame) renders correctly via `Widget`. For slide-based presentations, `rc.Deck` and `rc.Slide` turn the same component model into a keyboard-navigable deck that still lives in a single HTML file. The context manager pattern (`with rc.ReportCreator(...) as report`) ensures that Matplotlib's global color cycle is temporarily replaced with the library's palette while the report is being built and restored on exit—making it safe to use alongside existing Matplotlib code.