Hi I am developing a website. I want to have multiple interactive plot, because there are variable which I want to modify. For example, classes of age or sex.
I am hosting the website on GitHub pages and quarto posit cloud. I am aware this means the website is static. These are the possible solutions I thought:
Shinylive. I am having problem with this, but I know I can solve it following the tutorial.
Pros: client side.
Cons: for what I am understanding, it could create a slow website.
Shiny: I could embed with iframe a single dashboard in each page.
Pros: full interactivity and customisation. Also, I love shiny.
Cons: hosting. I could use shinyapps or posit connect cloud.
I am evaluating to create a local shiny server: nice to have, but also a pain in the @*s.
Tableau Public: it works.
Pros: it work for free in the public version and will let the website go live easy. It works with iframe.
Cons: I don't want to use it, because I would like to have a fully open source project.
Depending on how "interactive" the plot(s) actually need to be, you could consider simply making a handful of HTML objects of the plots and enabling the user to select which one they view or use {plotly}. This could enable you to keep the whole website static.
This could work for me: for now the idea is to change the variable and sex plus the hovermode.
I also experimented with ojs, but the ojs_define() sometimes is not working in rendering.
I am also considering a single shiny app with the possibility to filter the set of data: the main problem with this is that I think I can't preset the iframe with a specific filter on my database. The idea is avoid to create multiple shiny app, each for each plot.
I'm not sure I've fully understand what you're trying to accomplish or the need for iframes, but two potential solutions that seem to be in the direction you're looking for:
Multi-page Shiny app with something like {brochure}.
A site that renders new UI elements based on user input using the renderUI() function. You'd probably want to break-out the logic for the different types of plots into their own functions.
I think you'd more-so be looking for the 2nd solution, or possibly a combo of the two.