from_spec {vegalite} | R Documentation |
Take a JSON Vega-Lite Spec and render as an htmlwidget
Description
Vega-Lite is - at the core - a JSON "Grammar of Graphics" specification for how to build a data- & stats-based visualization. While Vega & D3 are the main targets, the use of Vega-Lite does not have to be restricted to just D3. For now, this function takes in a JSON spec (full text or URL) and renders it as an htmlwidget. Data should either be embedded or use a an absolute URL reference.
Usage
from_spec(spec, width = NULL, height = NULL, renderer = c("svg",
"canvas"), export = FALSE, source = FALSE, editor = FALSE)
Arguments
spec |
URL to a Vega-Lite JSON file or the JSON text of a spec |
width , height |
widget width/height |
renderer |
the renderer to use for the view. One of |
export |
if |
source |
if |
editor |
if |
Examples
from_spec("http://rud.is/dl/embedded.json")