Skip to content

Commit

Permalink
Merge pull request #24 from ryanlovett/apps
Browse files Browse the repository at this point in the history
Update workflows and tech docs.
  • Loading branch information
ryanlovett authored Oct 21, 2024
2 parents c10371c + 22fc789 commit 9380820
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 17 deletions.
16 changes: 8 additions & 8 deletions _toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,17 @@ format: jb-book
root: intro
title: Home
parts:
- caption: Getting started with DataHub tools
- caption: Getting Started with DataHub
chapters:
- file: technology/pedagogy-and-technology/introduction-to-jupyter
title: Jupyter Notebooks and JupyterHub
- file: technology/r-datahub
title: R Hub
- file: technology/rstudio
- file: technology/shiny
title: Shiny
- file: technology/quarto
title: Quarto
- file: workflow/vscode.md
- file: workflow/real-time-collaboration
- file: workflow/syncthing
- file: technology/remote-desktop
- file: technology/vscode.md
- file: technology/real-time-collaboration
- file: technology/syncthing
- file: technology/pedagogy-and-technology/external
- caption: Workflow Basics
chapters:
Expand Down Expand Up @@ -63,6 +61,8 @@ parts:
title: Work with Large Datasets
- file: workflow/bestpractices
title: Instructional Design Best Practices for Creating Jupyter Notebooks
# FIXME: r-datahub has very little to do with using R on DataHub
- file: workflow/r-datahub
- file: faq/share
title: Sharing information about the Hub
- caption: DataHub Frequently Asked Questions (FAQ)
Expand Down
File renamed without changes.
19 changes: 19 additions & 0 deletions technology/remote-desktop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: Remote Desktop
---

Some GUI applications require a full desktop environment to run. Instead of
trying to get students to install software locally, we offer a full fledged
Linux desktop environment they can access from inside their browser. This is
just a different user interface with the same infrastructure. Users are
operating in their DataHub home directories.

Try remote desktop on [EECS DataHub](https://eecs.datahub.berkeley.edu/hub/user-redirect/desktop) with a berkeley.edu account, or [on Binder](https://mybinder.org/v2/gh/yuvipanda/jupyter-desktop-server/master?urlpath=desktop) without a berkeley.edu account.

```{figure} ../images/desktop.png
:width: 500px
:align: center
:name: Shiny Demo
Example of image processing with Qt in remote desktop
```
24 changes: 24 additions & 0 deletions technology/rstudio.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: RStudio
---

[RStudio](https://posit.co/products/open-source/rstudio) is an integrated development environment that is popular among R users.

```{figure} ../images/rstudio.png
:width: 500px
:align: center
:name: RStudio
Example of running RStudio on DataHub
```

RStudio is available on many of our R-based hubs, and is the default application on [R hub](https://r.datahub.berkeley.edu).


## RStudio Applications

RStudio has integration with applications such as [Quarto](quarto) and [Shiny](shiny). These applications should work as they do on desktop machines. Windows and tabs will be launched as expected.

## Using nbgitpuller

As one might do with Jupyter notebooks, one can use nbgitpuller to pull in code and data into hub environments with RStudio. However unlike JupyterLab, the web-based version of RStudio cannot be configured to open a specific document at server launch. After launching the server, one must manually navigate to the pulled file.
26 changes: 17 additions & 9 deletions technology/shiny.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
# Shiny
---
title: Shiny
---

[Shiny](https://shiny.rstudio.com/) is a R package which makes it easy to build interactive web apps. R shiny server in DataHub is used to build interactive dashboards. Here is a short demo of a shiny application below,
[Shiny](https://shiny.posit.co) is a platform that makes it easy to build
interactive web apps. R shiny server in DataHub is used to build interactive
dashboards.

```{figure} ../images/shiny_combined.gif
:width: 500px
:align: center
:name: Shiny Demo
Short Demo to launch Shiny application in DataHub
Short demo of Shiny application on DataHub
```

If you are interested to explore Shiny application further then you can play with examples from this [Github repository](https://github.com/rstudio/shiny-examples) and [few other examples](https://github.com/gastonstat/shiny-introstats/) created by a stats faculty. Here are couple of approaches you can take to launch a shiny application,
If you are interested to explore Shiny application further then you can play
with [examples from Posit](https://github.com/rstudio/shiny-examples) and some
[from a Stat instructor](https://github.com/gastonstat/shiny-introstats/).

**Approach I:**
- Install the nbgitpuller plugin in [Google Chrome](https://chrome.google.com/webstore/detail/nbgitpuller-link-generato/hpdbdpklpmppnoibabdkkhnfhkkehgnc)/[Mozilla Firefox](https://addons.mozilla.org/en-US/firefox/addon/nbgitpuller-link-generator/) browser.
- Upload the chosen Shiny application to Github
## Using nbgitpuller

- Install the nbgitpuller plugin for [Google Chrome](https://chrome.google.com/webstore/detail/nbgitpuller-link-generato/hpdbdpklpmppnoibabdkkhnfhkkehgnc) or [Mozilla Firefox](https://addons.mozilla.org/en-US/firefox/addon/nbgitpuller-link-generator/).
- Upload the chosen Shiny application to a GitHub repository.
- Paste the URL for the datahub you are using (If you are using Shiny hub then paste https://shiny.datahub.berkeley.edu/) and open it using "Shiny" option in the nbgitpuller plugin.

```{figure} ../images/launchshinyapp.PNG
:width: 500px
:align: center
Expand All @@ -25,7 +33,7 @@ Launch Shiny application via nbgitpuller plugin
```
- Paste the link in a browser to access the shiny application. Here is an example [link](https://datahub.berkeley.edu/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2Frstudio%2Fshiny-examples&branch=main&urlpath=shiny%2Fshiny-examples%2F003-reactivity%2F).

**Approach II:**
## Manual Application Installation

- Clone the required [GitHub repository](https://github.com/rstudio/shiny-examples) having Shiny examples to your instance of Jupyterhub.
- Launch the Shiny server.
Expand Down Expand Up @@ -57,4 +65,4 @@ You can also view the code that generated the dashboard in the rendered output.
:name: Code for Shiny
Code that generates Shiny dashboard
```
```
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 9380820

Please sign in to comment.