3 ms·
Genuine question: what's differentiating this from Vega/Vega-Lite? Seems like it uses very similar data format and also seems like it chews it in some of the sa
by MilStdJunkie 3y ago
Genuine question: what's differentiating this from Vega/Vega-Lite? Seems like it uses very similar data format and also seems like it chews it in some of the same ways. Reason I ask? Vega's supported in asciidoctor-diagram and Kroki, since I use Asciidoc for everything, Vega is my heavy duty graph block.
I'm not a Vega patriot or anything, just genuinely wondering what I get here.
- tophtucker 3y agoasciidoc-diagram & Kroki look cool, hadn’t seen them. I don’t think Plot’s very good at (or built for) that sort of diagramming, though you can do it if you want: https://observablehq.com/@observablehq/plot-finite-state-machine https://observablehq.com/@observablehq/plot-finite-state-mac.... What I personally like most about Plot is that it’s purely JavaScript (/ TypeScript); it doesn’t try to be serializable as JSON and portable to Python etc. So whereas Vega-Lite has to have its own expression language (https://vega.github.io/vega/docs/expressions/ https://vega.github.io/vega/docs/expressions/): "transform": { "calculate": [{"field": "b2","expr": "2*datum.b"}], "filter": "datum.b2 > 60" }, …in Plot you’d use plain JavaScript: y: d => 2 * d.b, filter: d => d.b2 > 60 …which I find easier and more powerful. (But I don’t need VL’s portability; others may.)
- MilStdJunkie 3y agoWhew, slick. Can't argue with that. Vega's thick as hell, and is my last option before I pull the trigger[1] on prerendering. If I absolutely need box plots or geographic maps. And honestly, unless the data is constantly changing prerendering is more efficient anyway. I'll see if I can get this (ObPlot? OPLot? I don't know what to call it shorthand) into an asciidoc extension. [1] I can hear you screaming WHAT ARE YOU TALKING ABOUT. I should probably enunciate this better. The docs are aerospace, so any graphics or tables or data or ANYTHING has to be source controlled, so the data goes into VCS with the docs, and it can get traced back to a commit, which is passed into a "List of Changes", a "List of Effective Data Modules", and (biggest pain in my ass) change marks in the output. "Prerendered" is a pass that turns the data into a graphic, and then the doc references the graphic. A graph block just points to the data, and the graph is automatic. If it wasn't so controlled, you could just put a passthrough in the asciidoc to the graph server and call it a day - which, honestly, is a much better option, but would require a few Amazon's worth of forms to fill out. And it would probably get rejected because OH MY GERD SERVERS.
- mbostock 3y agoThis might help: https://observablehq.com/@observablehq/plot-vega-lite https://observablehq.com/@observablehq/plot-vega-lite More generally, our motivations are here: https://observablehq.com/plot/why-plot https://observablehq.com/plot/why-plot