Yet another attempt to go from Observable to VanillaJS

Hi Shawn,

I don’t think there is an official way to do that. Have you read other posts here on the topic?

Here is another great resource if you’re looking into convert a notebook to pure javascript GitHub - severo/observable-to-standalone: Importing an Observable notebook into a standalone application

I know this doesn’t respond to your main question. However when you use observable to write code, interactive charts, dynamic data, etc you’re probably using all the cool reactivity feature its runtime provide. In that case, converting to vanilla js can get complicated. Cells that depend on values from other cells are automatic updated How Observable Runs / Observable | Observable, and all that logic might be hard to implement from scratch.

Edit: For reference here is the BubbleMap converted to vanilla. Now, the order of cells are very important, the code has to run async await, so resources are ready in order to run next steps. All the reactivity is lost. This notebook was relatively simple to convert, it doesn’t have much interactivity. I wouldn’t do the same some for a complex notebook.

4 Likes