Quarto website with multiple dynamic/interactive plot

Hi :slight_smile: 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.

What do you suggest to do?

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.

1 Like

Thanks!

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 will try your solution for now.

So, I managed to create a nice plot with ojs.

I am thinking of a solution in shiny to have a single app, but the user can select:

  • type of graph.
  • data. This are managed in a data warehouse so are all the same in structure.
  • the app will read from the db using duckdb.
  • the app is going to be embedded in different iframe in different pages.

What I want to obtain is each page can show the plot with data you want.

Could shiny app base version manage something like this? Is it even possible to do?

Thanks :slight_smile: