Vega – A declarative language for interactive visualization designs
vega.github.io
vega.github.io
It allowed us to have:
- same engine in CLI (can generate HTML and open in browser), VSCode extensions, SaaS
- have a way to describe plot visualization / representation as a declarative spec that can be then used in all those products (plot spec). We were exploring plotly and AFAIU there was no easy way to do the same
- it's quite comprehensive and community is responsive, the project is maintained
To name a few downsides from our experience:
- DSL is quite complicated. It requires some time to master it. It hurts the adoption. In our case I don't see that many users doing custom plots / templates - majority is using pre-baked built-in stuff or use Python and export as SVG.
- In our case some features were missing (and are still missing) - exponential average - that is most commonly used to smooth ML training curves.
[1] https://vega.github.io/vega-lite/
[2] https://dvc.org/doc/user-guide/experiment-management/visuali...
Here is a brief discussion on the same https://github.com/orgs/community/discussions/16963
However, we will likely have Vega support sometime soon in Scroll. Someone just needs to volunteer and add it (or someone has to fund us to add that).
We now have basics of ObservablePlot (https://observablehq.com/plot/) support (https://scroll.pub/blog/tables.html)
What are some?
Like all graphing libraries, it’s chasing the gold standard which is R’s ggplot2. It’s as close as we’ve found in JavaScript, plus it can be interactive.
https://vega.github.io/vega-lite/
They have a python version as well.
All our projects for data analytic and visualization are based on vega/vega-lite, really impressive by vega's signals design when i learned it first time(it's like rxjs, which i also love).
Share some work based on vega/vega-lite:
- PyGWalker: turn dataframe to tableau alternative UI in jupyter: https://github.com/Kanaries/pygwalker - RATH: Automation of data exploration workflow with one click. https://github.com/Kanaries/Rath - GWalkR: drag-and-drop based visualization in RStudio, https://kanaries.net/gwalkr
One possible downside is that it embeds the entire chart data as json in the notebook itself, unless you are using server side data tooling, which is possible with additional data servers, although I have not used it, so cannot say how effective it is.
For simple plots its pretty easy to get started and you could do pretty sophisticated inter plot visualizations with it as you get better with it and understand its nuances.
It looks great! I can't believe I haven't heard of it before. Have used Plotly a lot in the past, this looks like a great alternative.
It was used in a mediawiki/wikipedia extension for graphs [1] but the whole exposing graphs to editors seems to have been dropped.
For example, it was difficult to build charts from pre-aggregated data, like a box plot given p5, p25, p50, mean, p75 p95 and a list of outliers.
edit: Found the docs: https://vega.github.io/vega/usage/interpreter/ They do have security features, and even a AST-based interpreter
I'm going to be needing a JS/TS rendering option shortly at my job, and I'm comparing tins.
As I understand it, Observable Plot also seeks to be the "higher-level abstractions on top of D3" layer.
The Vega docs address Vega vs D3 (https://vega.github.io/vega/about/vega-and-d3/), but I don't see them compare Vega vs Observable Plot, which would seem to be a more apples-to-apples comparison.
But again it's not Vega vs Plot, it's Vega Lite vs Plot.
So the layers are not even in this comparison - Vega is sort of on the same level as D3, and Vega Lite vs Observable Plot is a better comparison.
We will eventually have great support for both of those.
I don't want to programm anything without comments.
I guess you can easily convert from use yaml or json5, but all the examples are still in json.