Useful if you are creating a vegaspec manually.
character, either "vega" or "vega_lite"
character, version of library, e.g. "5.2.0";
if version is provided, major defaults to FALSE.
logical return major version-tags rather than the
tags for the specific versions supported by this package
character URL for schema
vega_schema()
#> [1] "https://vega.github.io/schema/vega-lite/v5.json"
vega_schema("vega", major = FALSE)
#> [1] "https://vega.github.io/schema/vega/v5.24.0.json"
vega_schema("vega_lite", version = "5.2.0")
#> [1] "https://vega.github.io/schema/vega-lite/v5.2.0.json"
# creating a spec by hand
spec <-
list(
`$schema` = vega_schema(),
width = 300,
height = 300
# and so on
) %>%
as_vegaspec()