| As soon as I saw this, I thought: 'how is this different from vega lite'. An answer is here:
https://observablehq.com/@observablehq/plot-vega-lite 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. Having said that, I do find the idea of writing transforms in javascript compelling, and I can see there may be some situations in which this is a very elegant solution. 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. Transforms and signals are both possible in vega/vega lite, but I can definitely see the benefit of them being cleaner and being able to accept arbitrary javascript. |
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):
https://observablehq.com/@observablehq/inputs
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.