Like everything else in the Python ecosystem, it's half-baked and not composable.
People use it for two reasons:
a) because they need to get those graphs on the screen and this is the only way
b) running ML code on a remote, beefier server.
Neither of those use cases are exclusive to jupyter. You can run scripts on remote machines quite easily, and matplotlib will happily pop up a window for your charts.
The real reason is because it’s a much better workflow for data exploration and manipulation because you don’t always know exactly what code to write before you do it. So having the data in memory is really useful.
X forwarding through a terminal session to view that matplotlib plot is a bit more work than most want to deal with. Sure, you can use ranger, and set up the image viewing with uzerbeurg? or something? and set up kitty with icat, but that doesn't work with your tmux, so you have to have a separate ssh window that's not tmux'd, which is annoying and clunky, just for viewing images.
You also have to save them, and then switch to view them, which is incredibly clunky.
Or you just use jupyterlab and the problem is fixed.
You are underestimating how useful for exploratory tasks the combination of elements: markdown/code cells + runtime kernel to keep state + persistent results usable from your browser.
Jupyter notebook is neither the first nor the only implementation of such literate approach.
If some code is stable enough for reuse, you can make it composable as any other code: put it into the module/create CLI/web API/etc -- whatever is more appropriate in your case.
>People use it for two reasons: a) because they need to get those graphs on the screen and this is the only way b) running ML code on a remote, beefier server.
Do you have a source of this, or is it something you dreamed up? Weird claim as none of those are my use case.
You would have to formalize the inputs and outputs of your notebook, perhaps a preamble with imports and so on. Then other notebooks could use yours, kind of like importing (perhaps exactly by importing?)
As it is now, you typically wind up “programizing” your notebook once it does what it should so you can run in batch and so on.
People use it for two reasons: a) because they need to get those graphs on the screen and this is the only way b) running ML code on a remote, beefier server.