The purpose of this package is to be a faithful interface to the Python Altair API. Currently, this R package provides:

  1. Access, via reticulate, to Altair objects and methods to create and compose Vega-Lite charts.
  2. The means to display charts using the vegawiget() and friends, via htmlwidgets.

In the short term, the thought is to focus on a small number of items:

  1. Tightening up the existing capabilities.
  2. Will likely split the vegawidget() function, with its friends, into its own package. This would not introduce any API changes to this package.
  3. Some infrastructure to create and publish blocks. (#19)
  4. Consolidating datasets within a chart specification. (#26)

The longer term will require more thought and consultation. As a start, it might be interesting to construct some R functions along the lines of:

Such an this approach would support piping, but at the cost of risking namespace collisions, as detailed in this discussion on ideas for porting the g2 visualization library. Another thing to consider is how much effort it would take to provide full coverage of the Python API.

This effort is already underway with Alicia Schep’s new package autopyr.

It is worth noting what this package is not. In this package, I do not want to introduce any new ideas or opinions - rather I think this package should remain a faithful translation of the Altair API. The authors of Altair should see this package and recognize only their opinions and intentions.

That being said, I think there is an opportunity to build another package (perhaps built on this one) that introduces opinions and tries to be a bit more ggplot2-like. Perhaps this package could include a ggplot2-translator function along the lines of plotly::ggplotly().