4 ms·
I don't use R, but I think that the Vega declarative visualization language is also nice: https://vega.github.io https://vega.github.io Could someone familiar
by nsajko 4y ago
I don't use R, but I think that the Vega declarative visualization language is also nice: https://vega.github.io https://vega.github.io
Could someone familiar with more than one of these compare Wilkinson's work with Wickham's and with Vega/Vega Lite?
- flakiness 4y agoR is more powerful, although Vega (+vega-lite) has its own advantages, like interactivity. Vega being JSON has good and bad parts. It's good as it gives Python ecosystem something better (Altair) than matplotlib. Bad part is that its agnostic design makes it tricky to do the math in Vega since it cannot depend on the host language (Python for Altair). It has to develop its own DSL (implemented in JS) to fill this gap. Sometimes it's very cumbersome and limiting. IMO, having stat capability in the middle of the visualization pipeline is one of the breakthrough invention of Wilkinson's original work (GG). Wickham/ggplot2 took it seriously and built the DSL in R. But Vega didn't (relatively speaking). That design decision was probably inevitable, but it still makes Vega less powerful than ggplot2, in terms of the expressiveness. Besides these philosophical difference, ggplot2 is very mature and robust, while Vega/Altair still has rough edges and fails on complex charting attempts from time to time.
- nsajko 4y agoSo Vega trades off expressiveness for interactivity, interesting perspective. But, I think this only applies when manually writing the Vega (Lite) JSON: for me an important advantage of the spec being mere JSON is that it's easy to generate visualizations from another language. This approach again limits the interactivity, but only as much as you choose to - the more you generate and pre-compute, the less interactivity is possible. (Don't know why you're down-voted.)
- wodenokoto 4y agoI don’t agree with the interactively part. Plotly library for R can read a ggplot grammar and display an interactive graph.