The goal of ggvega is to translate a ggplot2 object to a Vega-Lite specification.
library(ggvega)
#> Welcome to ggvega; this package is not yet fully functional, and is under active development.
library(ggplot2)
p <-
ggplot(iris) +
geom_point(aes(x = Petal.Width, y = Petal.Length, colour = Species))
as_vegaspec(p)
This package is in an extremely experimental state, under very active development.
At present, we can translate:
geom_point()
x
, y
, colour
We have plans to expand this capability; presently, we are working out a system to add new capabilities quickly and reliably.
You can install the development version from GitHub with: