Export a dbVisuals spec as an htmlwidget
dbvisuals_export_htmlwidget.RdRenders a Mosaic or deck.gl specification through rMosaic or
rDeckgl and saves the resulting htmlwidget to disk. This is intended for
durable exports from dbVisuals specs; the live dbVisuals workspace continues to
use the SQLRooms React runtime.
Usage
dbvisuals_export_htmlwidget(
spec,
file,
engine = "auto",
data = NULL,
data_sql = NULL,
data_name = "agent_data",
con = NULL,
db_path = NULL,
project = NULL,
selfcontained = FALSE,
data_transport = "file",
width = NULL,
height = NULL
)
export_htmlwidget(...)Arguments
- spec
A widget specification as an R list, JSON string, JSON file path, or an existing htmlwidget. Mosaic specs are rendered with
rMosaic; deck.gl specs are rendered withrDeckgl.- file
Output HTML file path.
- engine
Export target.
"auto"infers from the spec shape;"rMosaic"and"rDeckgl"select the R package explicitly."mosaic"and"deckgl"are accepted aliases.- data
Optional named list of data.frames to register for the widget.
- data_sql
Optional SQL query to fetch from
con,db_path,project, or the active SQLRooms database and register asdata_name.- data_name
Name used when registering
data_sqlresults.- con
Optional DBI connection used for
data_sqlor direct DuckDB data nodes in an rDeckgl spec.- db_path
Optional DuckDB database path used to open a temporary read-only connection for export.
- project
Optional dbProject object or DBI connection.
- selfcontained
Passed to
htmlwidgets::saveWidget(). Defaults toFALSEso large exports can keep dependencies and Arrow payloads as files.- data_transport
Data transport passed to
rMosaic::mosaic()orrDeckgl::deckgl(). Defaults to"file"to avoid base64 Arrow payloads in JSON.- width, height
Optional widget dimensions.
- ...
Arguments passed to
dbvisuals_export_htmlwidget().