We are so used to interactive documents that it is a pity that we do not use them in our scientific and technical reports. The fact that publishing in scientific journals is a pretty static thing (PDFs, galley proofs, etc…) does not help, since all interactivity must go to the “supplementary material”.
If your interactivity requires the computation of some R/Julia/Python code, you may need to set a server (we will talk about this on another post) and some dialog between the client (usually the browser with which you are reading together with some sort of Javascript) and the server (where the R/Julia/Python code runs).
However, if your interactivity is at the end of the visualization process, you can use some interactivity that runs only on the client. With Quarto, there two three ways to achieve this, that I know of
- Use htmlwidgets which are R commands that produce an interactive JS content.
- Use an observable javascript cell, which allows to use the wonderful Observable JS library and provides some useful tools for transferring R/Python objects. Note that this is not only a plotting library but you could do the computations and data wrangling there.