Draws snapshot history in one of two layouts. With a table_name, a
commit-log timeline: one row per snapshot (newest at top) on an ordinal
spine, with the timestamp, author, and commit message as aligned text and
long idle stretches marked inline (e.g. "103 days later") instead of
stretching an axis. Without a table_name, a lake-wide swimlane: one row
per table, one point per snapshot, evenly spaced in snapshot order, so
active and stale tables read at a glance.
Details
Requires the ggplot2 package (listed in Suggests). Snapshot data comes from
list_table_snapshots(); each snapshot is classified from its changes
column into one of: created, schema change, data change, maintenance, or
other. Authors and commit messages appear where they were recorded (see
set_snapshot_metadata() and commit_transaction()).
Both layouts position snapshots by order rather than by clock time, so a
history with months of silence between bursts of activity stays readable.
In the swimlane, snapshots that touch no table (like the initial schema
creation) appear in a (lake) lane, and the x axis labels show each
snapshot's date.
Examples
if (FALSE) { # \dontrun{
# Commit-log timeline of one table's history
plot_snapshots("my_table")
# Swimlane of every table in the lake
plot_snapshots()
# Customize the result like any ggplot
plot_snapshots("my_table") +
ggplot2::labs(title = "Audit trail")
} # }
