I love D3 and needed a real answer to this problem, so I dove in further.
In researching the problem, I found that Observable notebooks are not bad, per se, but they obfuscate things like imports and data formatting, and mess with the order of the code blocks. That said, many of Mike Bostock's Observables examples are clean JavaScript for which you just need a framework where you can paste the example code.
I found that you can copy/paste the Observables notebook code into a javascript module with pretty good success, and minimal tweaking. You need to import d3, and feed the example code its required data and options.
It was too hard to just "take notes" on what to do to get everything in place in every example, so I wrote a skeleton. It's hosted on github and gitlab so hopefully it can remain a viable resource for this problem.