Hello,
Disclaimer: I am new to web design and bokeh. I’ve been trying to find a straight answer online, but cannot find anything… this is making me think I am thinking about this wrong.
What I am trying to do: I have some simulations that I would like to put on a website and have an interactivity component that modifies some parameters in the simulations. I am trying to do something similar to this: Interactive Dynamics - flux_parity
(which seems to work using bokeh, hence my investigation of the library).
My understanding: I understand that a way of getting such simulations to work could be to write up everything in JavaScript and HTML, without even using Bokeh. However, it seems like it might be easier to use Bokeh.
I’ve tried at looking at solutions that run in the backend, where a server would be running the simulations and feeding them back to the frontend. However, from what I’ve seen before, it seems like a rather slow solution (slow as in, it does not feel instantaneous). Plus, the link that I provided before seems to be running in the frontend (since I can run it without an internet connection).
What I do not understand: How do you get a Python script to work on someone’s frontend on a website using Bokeh? Are you effectively transpiling Python to JavaScript? If that is the case, how does that even work (I’m assuming not every single Python library is easily translatable to JavaScript)? All the tutorials I’ve seen on YouTube are showing how to add sliders and text inputs, but always with the goal of modifying plotting parameters. I’ve never seen someone modify parameters of a simulation, or the likes.
Like I said, perhaps I am going wrong about this, and I’m misunderstanding what Bokeh does. Please feel free to point me in the right direction. Any information about the general process of creating some interactivity on a web page is very appreciated!
Thanks!