I think the examples should have a JS native version in addition to the Observable implementation.
[1] https://datacrayon.com/shop/product/visualisation-with-d3/
D3 is a JS library for data visualisations.
Both are the brainchild of Mike Bostock. That's the connection. :)
I'm super grateful that they provide such good documentation, which is second to none, in a nicely explorable environment.
d3, on the other hand, has converted most of their examples to Observable, which requires extensive research to convert back to JS (in the best case) and in the worst case requires reverse engineering the runtime.
I'm not the only one with this opinion, there are plenty of others who have struggled through similar issues and discussed it.
"The process of converting an Observable notebook to standalone html and/or js is clearly not as simple and copying and pasting. The use of Observable notebooks for all D3 examples has made the introduction to the library much more challenging for this reason." [0]
[0] https://stackoverflow.com/questions/53155957/convert-d3-obse...
[1]: https://talk.observablehq.com/t/i-want-to-learn-d3-i-don-t-w...
The claim that one has to "reverse engineer the runtime" is simply absurd.
The people that complain about D3 on observable always turn out to have taken neither the time to understand Observable nor D3 and are looking for a way to just copy paste something into their codebase, without understanding it, and without any willingness to really learn the tools they are using. Which would have never worked in the first place, because D3 is not a plotting library like vega or observables plot, it's a library library, building material from which you can build your own bespoke visualisations.
Observable is in essence reevaluating the entire code with each "requestAnimationFrame", no fancy diffing a la react or other magic, if it runs in observable, it will also run in your code as a static thing. Copy paste the cells out of observable, prepend them with a "const" and you're done, not more work than removing and rewriting the boilerplate that's in every codepen.
I find myself wanting to start with a working example I can riff off of more in d3 than with many other tools I've used, so I totally understand the appeal of interactive examples in Observable but find it super frustrating and cumbersome when it comes to actually rolling what I'm working on into an existing application.
Standard JS modules, very nice! D3 now works in all playgrounds and libraries even as dependencies without non-standard tooling!
https://jsbin.com/ducosajehi/edit?html,output
I do wish they didn't even publish UMD, that's a recipe for duplication if some libraries import the module and some import the UMD.
I am probably being unreasonable; but it's kind of nice to be able to have a single third-party dependency out of which you can pick what you need at the moment, rather than a host of small third-party dependencies. Kind of like lodash, from which you can at least import individual functions (import merge from 'lodash/merge') rather than installing all those functions as individual packages.
D3 is a low level visualisation library where you write code.
Excel/Tableau are business tools.
D3 is the best way to make visualizations online. Yes, it requires learning the library and building things from scratch, but it's light years better than the dog shit modules Tableau offers.