vegawidget / ggvega

Translator from 'ggplot2' to 'Vega-Lite'
https://vegawidget.github.io/ggvega/
Other
46 stars 3 forks source link

ggvega

CRAN
status Lifecycle:
experimental Travis build
status

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)

Important Note

This package is in an extremely experimental state, under very active development.

At present, we can translate:

We have plans to expand this capability; presently, we are working out a system to add new capabilities quickly and reliably.

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("vegawidget/ggvega")