Good to see this project on the front page! We are using Vega (specifically Vega-Lite [1] as an engine and templates spec for data-science plots / visualizations in DVC (e.g. how it looks like in VSCode extension [2]).
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.
We use Vega lite for our web base graphs at work. We love the “export as svg” feature. It’s by the same people but with fewer options but easier to set up.
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.
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).
Altair is superb. Have used it a lot and it has become my default visualization library. Works in VSCode and Jupyter Lab. The author has a great workshop video on youtube for people interested in altair. I especially like the ability to connect plots with each other so that things such as selecting a range in one plot changes the visualization in the connected plot.
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.
Awesome to hear that you like Vega Altair. With the recent integration of VegaFusion you don’t need to embed the data in the notebook anymore and I’ve found Altair to scale quite well. Give it a shot.
the uw data lab behind vega also has a new library mosaic[1] that seems pretty exciting. My impression was it allows flexible data transformation/slicing in both the client side and server side, with the same dsl.
Oh wow, that's very cool. Being able to push down queries all the way to parquet while existing purely on the clientside via duckdb wasm is very cool. This enables purely static visualizations with full interactivity and full query optimization.
I was expecting a more language like thing on the description. Something like gnuplot. Maybe the grammar of graphics available to R. Instead, this is json schemas, if I'm understanding correctly.
What sort of maps are you wanting to build? https://c4model.com/ seems to be the more popular standard for this style at the moment. https://github.com/plantuml-stdlib/C4-PlantUML makes this somewhat easy to code out. (And I think most cloud providers have addons for it.)
Just for completeness, you might be interested in the Holoviz ecosystem (core library Holoviews + additional libraries like hvPlot), which uses either Bokeh or Matplotlib as its backend.
It feels like Vega is a viable path toward something bigger, like a global, W3C type standard for visualization, but unfortunately not as adopted as it deserves.
It was used in a mediawiki/wikipedia extension for graphs [1] but the whole exposing graphs to editors seems to have been dropped.
I've used Vega as part of a complex dashboard builder (think Looker/Tableau) and it is quite powerful and flexible, but like all of these libraries once you stray from the well worn tracks things get tricky.
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.
Are those expressions evaluated by JavaScript or is there proper isolation from the browser context? I.e. can I safely embed a user-generated Vega plot or is that XSS?
I haven't used Vega in probably close to a decade, but I remember when I was working with it, it was often extremely limited and rigid compared to D3. Only maybe 10% of the time could Vega be used for our use cases. Overall, the work to support both Vega and D3 ended up being more troublesome than just using D3 for all visualizations
Thanks Breck; I watched the video and it's appealing; I assume the downvote (now cancelled by my upvote) was the HN aversion to self-promotion, but as the OP I hereby declare this comment relevant and useful.
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.
this is one of my all time favorite projects... it blows away a lot of the other charting/ data viz libraries. shocked more people haven't picked it up
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...