Creating a Serverless R Shiny App using Quarto with R Shinylive (Include method)

Published: 22 September 2023
on channel: TheCoatlessProfessor
10k
287

Video Timeline

00:00 - Video Intro
00:05 - Introduction to R Shinylive development, showcased at posit::conf(2023), enabling serverless R Shiny Apps (no Shiny Server needed!)
00:30 - Delving into the reactivity of the serverless Shiny app
01:06 - Highlighting the three available options (Convert, Fiddle, Include) from Joe's talk, with a focus on "Include"
01:30 - The "Convert" option's comprehensive documentation available on the R-shinylive GitHub repository
02:13 - Examination of the example in the repository for crafting a Shinylive application
02:50 - Transition to RStudio to install the 'pak' package manager and the development version of the `r-shinylive` package
03:49 - Creation of a new Quarto project within RStudio using the terminal command `quarto create project default`
04:25 - Opening the new RStudio project window dedicated to the Quarto project
04:41 - Discussion of the various files housed within the Quarto project
05:25 - Installation of the Shinylive Quarto extension from `quarto-ext/shinylive` via the terminal using `quarto add quarto-ext/shinylive`
06:03 - Emphasis on the project-specific installation of the Quarto extension (no global library installation)
06:46 - Immersion into the Quarto document 'R-shinylive-demo.qmd' and removal of extraneous document skeleton
06:55 - Integration of the 'shinylive' filter into the Document's YAML
07:36 - Explanation of the skeletal structure for a Shiny app, within a code cell, employing `{shinylive-r}` instead of `{r}`
08:54 - Acquisition of the code used in Joe Cheng's Shiny App demo
09:16 - Replacement of the skeletal code cell with Joe's Shiny App code
09:35 - Initiation of the document rendering process in RStudio (using keyboard shortcuts)
09:57 - Discussion regarding the disappearance of the loading symbol for the Shiny application in RStudio's Viewer Panel
10:25 - Opening the demo in a web browser via the "Show in new window" option in RStudio's Viewer Panel
10:48 - Successful loading of the Shiny app utilizing R Shinylive, ready for exploration
11:58 - Addressing partial cutoff of the Shinylive app in the default HTML document and increasing grid space via the modification of the `grid` key in the document
13:02 - Verification of the Shiny app's width in the browser window, confirming its adequacy
13:27 - Discussion of the files added to the rendered directory
13:57 - Inclusion of the `resources` key in the document's YAML to ensure retention of the `shinylive-sw.js` file when publishing the document
14:58 - Concluding remarks on the remarkable achievement
15:30 - Outro

---

Summary

During this walkthrough video, we accomplished the following:

1. Installed the "r-shinylive" package from GitHub in R Console
2. Created a Quarto project using the terminal, which opened a new RStudio project.
3. Installed the "shinylive" Quarto extension via the Terminal in the new RStudio Project.
4. Modified the Quarto document to utilize the "shinylive" filter.
5. Switched the code cell type from `{r}` to `{shinylive-r}` to execute the Shiny app.
6. Utilized Joe Cheng's example Shiny app and then rendered the document.
7. Explored the serverless Shiny app experience

Voila!

---

Links:

Repo:
Website:

Posit::conf(2023):

Joe Cheng's Talk:

The "Include" option:


Source of Joe Cheng's Shiny App:


Shinylive

- Shinylive R Package:
- Shinylive for Quarto:

---

Socials







Watch video Creating a Serverless R Shiny App using Quarto with R Shinylive (Include method) online without registration, duration 15 minute 45 second in high hd quality. This video was added by user TheCoatlessProfessor 22 September 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 10 thousand once and liked it 28 people.