Live data from Hacker News

Observable Plot

observablehq.com

51–56 of 56 posts

Re: Observable Plot

#51

Earlier quoted context omitted.

If you're familiar with Plotly Express in Python, this is like a Javascript API with similar feel. It's a lot less verbose than the equivalent raw Plotly.js code.

Got it, I had assumed there was an equivalent Plotly express API in JS as there is in Python. Thanks!

Hehe, nope! We'd discussed it a few times, but never got around to it :)

Re: Observable Plot

#52
post #3

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 situati…

That was my reaction. It seems very similar (which makes sense, they're all using grammar of graphics style). 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 sid…

> 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.

Re: Observable Plot

#53
I've been reading about D3 and am thinking about integrating it into my React project. But I've come across a number of posts that discuss how React & D3 don't play nicely together because they both manipulate the DOM. [1] is a good starting point for this deep dive.

Does Observable Plot resolve those issues or do we need still to be careful integrating it into a React environment?

[1] https://medium.com/capital-one-tech/a-comparison-of-data-vis...

Re: Observable Plot

#54

Are there Typescript definitions? Bit of a JS/TS noob, maybe it’s obvious, but I couldn’t find any.

Not currently, but we’ve talked about it. We’ve been using a lot more TS internally lately so there’s a growing case and it’s good to hear your vote.

Re: Observable Plot

#55

Awesome. Does it require access to the document/window or it can be used in React?

Ok, I see it does use document since there is d3.create() is under the hood.

Yup. There’s some discussion of this in this issue https://github.com/observablehq/plot/issues/359, which notes that the ~100 test plots in https://github.com/observablehq/plot/tree/main/test/plots are rendered by Node with JSDOM by https://github.com/observablehq/plot/blob/main/test/plot.js.

Re: Observable Plot

#56

Are there Typescript definitions? Bit of a JS/TS noob, maybe it’s obvious, but I couldn’t find any.

Not currently, but we’ve talked about it. We’ve been using a lot more TS internally lately so there’s a growing case and it’s good to hear your vote.

Id also love that
Post reply on HN