---
title: "Gallery"
---
Explore example visualizations organized by use case. Each example includes live interactive output and source code.
## By Category
::: {.grid}
::: {.g-col-6 .g-col-md-4}
### [Clinical Examples](clinical.qmd)
Meta-analyses, forest plots, and clinical trial visualizations.
- JAMA-style forest plots
- Subgroup analyses
- Multi-arm dose-response
:::
::: {.g-col-6 .g-col-md-4}
### [Dashboard Examples](dashboards.qmd)
Business dashboards, KPIs, and data tables.
- Product metrics
- A/B test analysis
- Executive summaries
:::
::: {.g-col-6 .g-col-md-4}
### [Feature Showcases](showcases.qmd)
Demonstrations of specific tabviz features.
- Rich column types
- Distribution plots
- Theme customization
:::
:::
---
## Project Portfolio Dashboard
A data-rich dashboard combining new column types — heatmaps, progress bars, currency, dates, badges, and sparklines — without a single forest plot:
```{r}
#| echo: true
library(tabviz)
portfolio <- data.frame(
project = c("Cloud Migration", "Mobile App v3", "Data Platform",
"Security Audit", "API Gateway", "ML Pipeline"),
status = c("On Track", "At Risk", "Completed", "On Track", "Delayed", "On Track"),
budget = c(2400000, 890000, 1250000, 340000, 720000, 1800000),
spent_pct = c(0.62, 0.88, 1.00, 0.45, 0.71, 0.33),
health = c(92, 58, 100, 85, 42, 78),
start_date = as.Date(c("2025-03-15", "2025-01-10", "2024-09-01",
"2025-06-01", "2025-02-20", "2025-07-01")),
due_date = as.Date(c("2025-12-31", "2025-09-30", "2025-06-15",
"2025-08-31", "2025-11-15", "2026-03-31")),
team_size = c(12, 8, 6, 4, 9, 7),
velocity = I(list(
c(34, 38, 42, 45, 48, 52, 55, 58, 60, 62, 65, 68),
c(28, 32, 30, 25, 22, 18, 20, 15, 12, 14, 16, 18),
c(40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95),
c(15, 18, 20, 22, 25, 28, 30, 32, 35, 38, 40, 42),
c(30, 28, 25, 22, 20, 18, 22, 24, 20, 18, 15, 12),
c(10, 15, 20, 25, 28, 32, 35, 38, 42, 45, 48, 50)
))
)
tabviz(portfolio, label = "project",
columns = list(
col_badge("status", "Status",
variants = list(
`On Track` = "success",
`At Risk` = "warning",
Completed = "info",
Delayed = "error"
)),
col_currency("budget", "Budget", decimals = 0),
col_progress("spent_pct", "Budget Used", max_value = 1),
col_heatmap("health", "Health Score",
palette = c("#fee2e2", "#dcfce7"),
min_value = 0, max_value = 100, decimals = 0),
col_date("due_date", "Due Date", format = "%b %d, %Y"),
col_n("team_size", "Team"),
col_sparkline("velocity", "Velocity (12w)")
),
theme = web_theme_modern(),
title = "Project Portfolio Dashboard"
)
```
---
## Example Sources
All examples are available as R scripts in the package:
```r
# List available examples
list.files(system.file("examples", package = "tabviz"))
# Run an example
source(system.file("examples", "jama_style.R", package = "tabviz"))
```