How to make a gallery of apps.

I have made a bunch of shiny apps. I am running them locally by running the R script for an app.

I want to make a master shiny webpage where I list all the apps that I have and by clicking the icon or the name of the app, the following app will run in a new window.

I have tried a couple of different ways but it has not worked. Any help in this regards is appreciated.

1 Like

There are a variety of options that come to mind. Below are a couple ideas:

  • blogdown: You can use the blogdown package to build a website. A hugo theme like this one might work well. I'm thinking screenshots of Shiny apps for each of the "cards" shown on the webpage. This seems similar to http://www.showmeshiny.com/. You can manually take screenshots of your apps, or use the webshot package.
  • ghpages: If you don't want to use blogdown, you could make a GitHub repo and use the README of the repo to list your apps, either just their names or also thumbnails of screenshots. Then just enable ghpages on the master branch. See https://pages.github.com/ for more on ghpages.
4 Likes

You could get inspiration in the community.
Here is a showcase page build with Blogdown (source on github):
https://emitanaka.github.io/showcase/

2 Likes

cderv,

None of the shiny apps seems to be working on the website.

mine,

Wondering if I can make this on the local machine or do I need to shinyapps? The reason I ask this is because the data I am using is firewall protected.

@bobm I'm not sure if I understood your question well, but it sounds like you're asking about whether/where to deploy the apps, as opposed to where to host the site, is that right? If so, you do need the app to be deployed somewhere (either shinyapps.io or an on prem Shiny server) in order to be able to link to live apps. If your data is protected, I imagine deploying on shinyapps.io may not work for you, and you might need Shiny Server (open source) or RStudio Connect (pro). See http://shiny.rstudio.com/deploy/ for info on app deployment options.

@mine Say I have 5 different R scripts (5 different .R files) that I use to do my analysis. Each file does something different on a different database. Also, note that each file is using a shinyApp and produces the output charts in a web browser. Currently, as I am the only user of these script files, I give my inputs into the .R files and run them to generate the charts.

I want to change this in the coming future as I will be having different users (who don't have any R coding experience) and would like to work directly from a webpage. They can chose the app they need (from the 5 apps that I have developed) and then basically, give the inputs (such as the database, tables etc) and click the submit button to see all the charts. I am currently entering all the input details manually inside my R script.

So basically, I am envisioning the setup to be like two sided. First one would be like a gallery of all the apps that I have (currently 5 apps, which will increase in future) and then once the app is selected, then a new window will open where the there will be a UI for user to select the inputs and once the user selects the inputs and clicks the submit button, the third window should open where there will be different plots based on the inputs given by the user.

I am wondering if RStudio / Shiny can do this?

I think you need to set your own shiny-server (either pro or open source) within your local network then shiny-server could easily serve both the index html page and the shiny apps. (the sample apps that come with shiny-server have a very similar setup).

@andresrcs what you are telling me is that I cannot check it on my local machine even before I go to the server?

I'm not sure if I understand your question but, you can develop and test your apps in your local machine and then copy/paste the app to the /srv/shiny-server folder in the server machine, and if you want to test the index html page you can also do it locally but having access to the linked apps on the server (i.e. http://your.server.ip/3838/your_app)

EDIT: If what you want is to make links in your web page that point to an app running in rstudio desktop, I think you can only do this with one app at a time running in this port http://localhost:3799/

I am working on setting up the shiny server (free version). However, I am trying to have a webpage with a list of all the apps, and when I click the name of a given app, that app should launch. I wonder why is it so complicated to do something like this. Currently the webpage is being developed and so when I click the link it should run the R script on my computer. However, it does not seem to be working.

Is this a limitation with Shiny or am I missing something here?

This is because the script is not your app, your script tells shiny server how to build your app.
That script gets translated into html and Javascript code before been deployed as a web app, also you need the shiny-server running for performing the server side operations.

@andresrcs Do you have a simple snapshot of the index of the html file that list your shiny apps? just to make sure that it is similar to what i am envisioning.

I don't personally use that approach but if you are setting up a shiny-server, in this folder /srv/shiny-server there is a symlink pointing to this web page index.html which I think it does exactly what you want. If you access this url http://your.server.ip/3838/you will see the content of index.html.

You can check out this repo of mine. You give it a list of github repositories, it downloads any updates and pastes them to the shiny-server directory. At the end, it renders an Rmd file that is populated by all the apps running from the shiny-server directory. Currently the output looks like this. If you want images you can add an image file with a standard name and display that next to the name in your Rmd setup.

Note that this is not the best/most secure configuration (see that chmod -R 777) but it has been working fine for me

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.