If you like the idea of using D3 for data visualization but you want something a bit higher level, check out Observable Plot[1], a library by the D3 team that adds a lot of conventions and conveniences on top of D3, specifically for building plots, charts and graphs.
And even beyond that, there's Observable Framework[2], a static site generator for building visualization dashboards (that supports Plot, D3 and lots of other libraries).
Plot and Framework are locked into the Observable ecosystem, which has its own learning curve. Learning D3 offers the best flexibility and control.
This is like saying that a computer without an operating system offers the best flexibility, or that a pile of sand is more flexible than an assembled computer.
D3 is not an empty computer. It's a high level library built in a high level language that runs in a browser. You are very very very far away from "metal". Being able to do something in a few clicks or little typing is nice until you need to do something more complicated. Sometimes it's worth actually learning how something basically works. Sometimes it isn't, it's everybody's choice.
So D3 is not what I’d consider a high-level library. The point of it is to be able to do all kinds of stuff not supported by your average charting solution’s out of the box histograms and whatnot. It’s a great way to make more bespoke visualizations.
Of course sometimes you just want to make a damn histogram without reinventing the wheel which is where some of the niceties discussed above come in.
D3 runs in the browser and it manipulates DOM nodes, a very high level abstraction. You can accomplish something with it using SVG, which is again a high level abstraction. You can give it data and it will spit out numbers that you can use to draw something on the screen. You can bind that data to elements and it will keep track of what's entering and what's exiting. You can apply fancy transitions with a line of code! You can make it change an appearance of e.g. a graph by changing the interpolation method. And so on.
Sure you have to write code, but it does a lot of things in the background that would take you s lot longer to do yourself. High level is not just "here's a library on top of D3 that you just give data to and you're done, but then you have to cry for days because you need to do something it didn't think of - 80% of use cases". When I used it I didn't get it, but then I took some time, a couple days, to actually understand it and I got a lot more productive. It's a great feeling when instead of thinking in workarounds for a missing configuration option you can think in solutions for the actual task. A lot quicker and more rewarding.
I didn't do much computer graphics in my life, some mandatory university classes, but I'd say doing it on the simplest beginner level it was a much different experience.
Fair enough. I meant specifically in the context of data visualization libraries, having done a fair bit of that sort of work in my own career. It’s harder to make a basic chart in d3, compared to many out of the box solutions, but it’s possible to do pretty much whatever you want, thanks to (what I consider) the low-ish level of abstraction it provides. I.e. DOM manipulation vs direct specification of standard chart attributes.
I've used D3 in nodejs to generate a png. Is it really that different than using something like Python or Java to do the same?
I might have confused your point, but if your goal is to build charts for data analysis, or exploratory data analysis, then D3 is considered low-level for the purpose of getting to the analysis fast.
D3 is low level for doing what it does. Visualizing data.
It’s hard to think of a lower level abstraction for that purpose.
In what way are these free open-source tools “locked-in” to Observable? Observable Plot is a vanilla JavaScript library that is released under the ISC license and can be used with any style of web development (e.g., React, Svelte, whatever). And likewise Observable Framework is released under the ISC license and you’re able to self-host projects anywhere and develop locally?
Can you add the library as a html link.
Anything else would be unwise to invest time in learning.
Yes? Examples here: https://observablehq.com/plot/getting-started
Mike, thank you for D3. It’s had a huge impact on me personally.
D3 for me is feature complete. Has been that way for me for years (maybe since v3).
Never had a problem, never felt the need to upgrade. Still have a bunch of stuff that just works.
Thank you for your effort.
Plot isn't locked into the Observable ecosystem at all - it's a JavaScript library that you can use independently of everything else there.
I'll ignore the part where you're wrong about the lock-in, but to the rest of what you said...
Yes? I guess I didn't think it needed to be said so explicitly, but if you are opting into Plot and Framework, you are accepting convention over configuration as they say.
And for some situations, that is what you want.
If you value flexibility and control above all else, then I agree they may not be for you.
But if you value other things, like speed of iteration, or just getting some good data visualizations built without a deep investment in learning underlying concepts, then Plot and/or Framework have definite advantages over doing it all with D3.
Yeah, I can say from experience of D3 at least, it's very far from locked in. In fact I would ask what library you're thinking of could be less.
The community also has helped with some bizarre integrations I was trying to do, into libraries like highcharts for strange reasons etc.
These days I kinda want the opposite. Most of the time I know exactly what I want my output to look like. But frameworks inherently provide a large bag of presets and if you want something slightly different from the preset it's a pain in the ass.
For many types of plots I find it's actually kinda easier to just manipulate SVG data directly. It's not that hard!
I'd like to see a library/framework that focuses on making it easier to manipulate SVG or canvas output. It should be trivial to make tweaks. But the higher level a framework goes the harder it is to step off the golden path.
Why does d3 not work for you if you just want to manipulate the svg directly? You can use it to generate or update arbitrary xml as far as I know.
The higher level in this case is observable plot, not d3.
Yeah I hear you, if you know exactly what you want, Plot is probably not for you..
But I've found lots of value in using Plot to explore data, and quickly throw something together and look at it, and decide if it's a good way to present the data or not.
Although I will say that you can "drop down" to the SVG pretty easily with Plot. Lots of examples even on their site where they start with Plot marks and then heavily customize the SVG directly.
Have you tried p5js?
As much as I hate to even ask for but is there a Matlab like drag and drop interface for web visualization.
I try to avoid graphs with html5 canvas like the plague maybe a new way to design them would be nice.
Sounds like you want Tableau. It even comes with the same price tag as Matlab!
Does the website feel janky to anyone else ? I have routinely found content-rich webpages to be janky.
edit: nvm, turned on hardware acceleration. Smoother, but still jankier than I'd like on a Ryzen 9.
Observable Plot is amazing. It is very flexible and intuitive to use. I now prefer it over Plotly.js which I used to use before.
The docs are pretty OK, the only thing missing is a usable API reference section, so discoverability is not great.