One type of visualisation I sometimes (honestly rarely) use but is extremely useful for finding unintuitive relationships in higher dimensions of data are parallel coordinates charts (actually it's your d3 code I've been borrowing in the past - so thanks for that!) Is this something that can be achieved with Plot at this stage? I'm not sure if it would be a facet, a transform, or something else, like a cross between marks and links (if that's doable).
Anyway, definitely bookmarked - I'll be sure to spend more time using this next time I need to visualise some data, looks like it will handle a lot of the standard vis without the typical boilerplate, thanks for releasing this.
It’s not a perfect fit for Plot because Plot wants at most one instance of each scale in a plot. (I.e., Plot isn’t designed to support dual-axis charts where you have two y scales. Dual-axis charts tend not to be a good idea anyway.) So to implement parcoords we use a normalize transform to map values to [0, 1] and then render axes manually. We might revisit this topic in the future as Plot grows. I agree that parcoords are very useful for initial exploration, especially with interactive filtering.
It would also be reasonable to have a more specialized component for parcoords — not everything has to live in Plot. For example we found ourselves making a lot of dashboards of time-series data, so we built this reusable component on top of D3 instead of Plot:
The only time it seemed like Vega made sense was publication style graphics which was unfortunate.
When would I use this instead of straight D3?
I haven't dug into the whole v3/v4 modularisation, so that might answer it, but is there a way to minimise the dependencies that Plot brings? You say it needs D3, but what of it does it need specifically, the whole thing? It's just that it's 250K or so, so I was wondering what the minimal setup here is.
Cheers and congrats on the release!
Edit: deleted my question, as it is answered here https://observablehq.com/@observablehq/plot-vega-lite
Am I missing anything, and is there a chance this feature might be added in the near term?
An answer is here:
It'll be very interesting to see this develop. My initial reaction, as a vega-lite user is I'm not sure it's worth learning the new API immediately.
I think the idea of a plotting library allowing transforms is initially a little jarring - feels potentially like poor separation of concerns. But the more I think about it, the more it seems really logical: a lot of transforms (e.g binning) are done only for plotting purposes, in which case keeping them in the visualisation logic makes complete sense.
Looking further ahead (not sure this is possible in Plot yet, but giving its integration with Observable I'm sure it will be), the idea of a reactive model where charts can both react to user interactions, but also be the source of inputs (select a range, drag a bar, draw a distribution freehand) is very exciting.
We allude to this in overview, but yes it is our intention to leverage Observable’s dataflow for interactivity, both for any cell to drive what is shown in a plot, and for the plot to drive computation in downstream cells. E.g., you can brush a scatterplot and then show the selected data in a table. Observable Plot is designed to work with Observable Inputs (or anything else interactive):
Plot is designed to leverage Observable’s language-level interactivity (dataflow) rather than design a new interaction system that is limited to within the visualization.
Great that it accepts colunar data, that was a question that had immediately sprung to mind. There's something very satisfying about processing data using Arquero's grammar of data transformation and then immediately passing it over to a grammar of data visualisation (Vega Lite, or now Plot).
Thanks so much for Observable - it's is by far my favourite programming tool for working with data (my day job is Spark, Python and R, pretty strong competition!)
Vega-lite (and especially D3) make it possible to make pretty and sophisticated charts with lots of bells and whistles, but I still find vega-lite heavyweight when I want a plot right now. This would surely get easier with experience, but for a newcomer it still adds noticeable friction.
Vega Lite is very close to R's ggplot2, so we use it for our online science visualizations. The built in downloading svg/pngs built in is pretty awesome.
Vega-Lite it gets us 90% of the way there easily, the remaining 10% is always a struggle. Its well documented but sometimes lacks examples (In a side by side bar graph, how do I move the column heading to the bottom. (column->header->labelOrient: Bottom..)
We plot single cell experiment data (lots of points) and we find vegalite, very performant.
I'd be interested in hearing more about your experience here. While I love the grammar of vega-lite (largely via altair), I've definitely run into trouble with many points. Is your work in this area available somewhere? Also, is this for Vitessce?
I think a lot of the performance issues I've come across is based on from copying data between python and the browser. For example, with a million cells you've got at least 5 floats per cell + json structure shipped to the browser. Plus this data tends to stick around in the browser. I'm bullish on approaches like moving data more quickly (possibly even sharing memory, if it isn't a real browser) via Arrow and doing aggregations on the server side with tools like altair-transform. But it's still early days for these.
My favorite data exploration toolkit is Clickhouse + Tabix (it uses apache echarts).
The ideas embedded in Vega-Lite are such good ideas that having an alternative implementation of them - especially with the pedigree of D3 and Observable behind them - is a big win. I can't wait to see what happens as Vega-Lite and Observable Plot continue to be inspired by each other in the future.
Thank you to you and your team for D3 and for this library. I’m sure I’ll get lots of use (and freelance gigs) out of it.
Has been a pleasure working with your work.
Does Observable Plot resolve those issues or do we need still to be careful integrating it into a React environment?
How well does this framework do with something relatively complex like an animated choropleth? Vega-lite and D3 can do them both, but they can both get complicated pretty quickly.