Jupyterhub r shiny support

60 views
Skip to first unread message

harshi...@gmail.com

unread,
Jan 17, 2019, 1:53:05 PM1/17/19
to Project Jupyter

Hi All,


We have a use case to be able to use r shiny within jupyter notebook (using rpy2 magic in ipython kernel notebook) hosted on JupyterHub server. Based on our quick research, we noticed shiny package needs either an R Studio server or Shiny server to run the apps (server.r and ui.r files). Is this doable using notebooks either locally or on JupyterHub server?

 

A couple of questions regarding JupyterHub (JH):

  • How do we use “Runapp()” or equivalent function to run shiny apps for multiple users on a single port in JH?
  • As we are using Amazon Linux AMI, we don’t have a default browser installed and no GUI desktop. So how can we launch shiny apps without a web browser?

Please share any docs/links that might assist us or r shiny alternatives/interactive web framework packages which could be used in JupyterHub



Thanks!
ShinyTest.ipynb

Tim Head

unread,
Jan 17, 2019, 2:13:22 PM1/17/19
to Project Jupyter
There is a thread related to your question in the JupyterHub discourse
forum: https://discourse.jupyter.org/t/lifecycle-for-servers-started-by-jupyter-server-proxy/314
maybe that already helps and/or we can merge these threads?

I think what you are looking for is
https://github.com/jupyterhub/jupyter-rsession-proxy which is a
notebook server extension that lets you run RStudio and RShiny apps. A
demo of this is
https://github.com/binder-examples/r#specifying-an-r-environment-with-a-runtimetxt-file
which shows you how to install the extension and lets you try it out
on mybinder.org

Hope this helps,
T
> --
> You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
> To post to this group, send email to jup...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/cd5daacd-f86c-4ad5-bd70-41d6b5392e7d%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

vnijs

unread,
Jan 17, 2019, 2:37:18 PM1/17/19
to Project Jupyter
@yuvipanda Made a number of changes (very) recently that you might want to try out. See (closed) issue linked below. As far as I know you can only run runApp() from Rstudio server but you can now start Rstudio directly from Jupyter by clicking on an icon.

harshi...@gmail.com

unread,
Jan 18, 2019, 9:54:19 AM1/18/19
to Project Jupyter
Thank you Tim. Will check out these links. However was curious to know if using either jupyter-rsession-proxy or jupyter-server-proxy, can we run iPython notebooks including Python code as well as R Shiny applications (RunApp with dataframe inputs)? Or is this only relevant to R specific notebooks?

Regards,
Harshith

harshi...@gmail.com

unread,
Jan 18, 2019, 9:56:11 AM1/18/19
to Project Jupyter
Thanks vnijs, will check these latest updates.

harshi...@gmail.com

unread,
Feb 6, 2019, 3:35:06 PM2/6/19
to Project Jupyter
Hi All,

Wanted to check if Jupyter-rsession-proxy or Jupyter-server-proxy enables us to run Shiny applications from IPython (.ipynb) notebooks and not just R notebooks in Amazon Linux AMI instance? We need to embed Python code and R code (using R Magic) in .ipynb notebooks.


Thanks,
Harshith

Tony Hirst

unread,
Feb 7, 2019, 4:04:12 AM2/7/19
to Project Jupyter
There's an example in the Binder example repos of launching from Binderhub into a SHiny app:



--tony
Reply all
Reply to author
Forward
0 new messages