Drupal/farmOS JupyterLite with Preloaded Notebook?

TLDR: 4 questions in bold below.

I now have a jupyterlite interactive notebook locally, ready for its intended audience (restaurant manager & chef) and am figuring out how to deploy it, so they can just click a link and view it. The aspects I’m working with at the moment are that it needs to:

  1. be served (as static files) from somewhere
  2. open my notebook as default
  3. run all cells on open
  4. show a loading indicator for many seconds
  5. show the slider widget & plot first, ideally without scrolling

Analysis so far:

  1. serving
  2. open my notebook
  3. run all cells
  4. progress indicator
    • even at the state of the art(?), the load takes a while; thankfully voici shows the needed spinner
      ex: if you clicked the link above, it’s probably still loading…
    • this wait time is actually a great opportunity to ‘make’ someone read something you need them to know, particularly about the data, methods, ui controls, thesis, the email prose they ignored when clicking the elink, etc.
  5. widget & plot
    • this approach, with “link to data” is great for my purposes
      ex: voici
      when it finally loads, this looks great; but will/can farmos let this run undisturbed?

Out of scope:

  • read-only is fine for this case, so saving to a server is not needed here; local download works fine, if desired
  • my plot is big and needs all the screen space it can get, so no theming/wrapping/iframing/site nav is needed
  • version control is not a requirement, even though these are files coming from the filesystem - this is technically content, kinda like a pdf would be (but you know, fancier)

Thanks!

There are some good questions here. I’ll try to make time to respond here in the next few days…

I was going to respond to a bunch of the individual points here, but maybe it makes sense to take a step back…

It seems like with JupyterLite you’re going to be going against the grain a bit since the intended audience is folks who are comfortable doing scripting. For example there is a heavy dependency on keyboard shortcuts and the error handling is accomplished by surfacing failures as stack traces.

I don’t have any experience with it, but voici looks a bit closer to the mark. It seems like the main challenge with it is going to be figuring out how to host it so it is private and has access to the data it needs to run your notebook.

Is a snapshot of the input data acceptable? Maybe it would be possible for you to put the data it needs into some sort of static file(s) (maybe JSON) so the data access problem is simplified?

Oh sure, the data is coming from a static file (xls) right now.
A simplified analogy would be that Jupyterlite is like a fancy WYSIWYG editor,
and when you click Save, the WYSIWYG is rendered to a result which is read-only in a browser. Voici is basically such a Jupyterlite notebook read-only renderer (though with a slider for example) .

I ran into issues running it, which I will troubleshoot with the voici community when I can return to it.
Then I will test putting its output in sites/default/files, and see if it runs.
I’m not sure if https://www.drupal.org/project/jupyterlite is orthogonal to this scenario, but I’ll probably just need to try it out to see.
Thanks!

Matt