Positron IDE Creating Two Single File Shiny Apps in R and Python (Public Beta)

Published: 28 June 2024
on channel: TheCoatlessProfessor
2k
31

Timeline:

00:00 Intro
00:16 Install Shiny extension from OpenVSX
00:52 Create R Script for Shiny App
01:42 Saving the App in a non-home directory (e.g. ~/Desktop or ~/Documents) using Cmd + S / Cntrl + S
02:02 Discussing the play button change when the script file is named app.R
02:16 Running the R Shiny App by pressing play and viewing it in the "Viewer" panel
03:20 Creating a Python script for the Python Shiny app
03:29 Saving the Python script as an app.py file on our desktop
03:53 Discussing the Shiny for Python run button and hidden options under the carret
04:21 Seeing the Shiny for Python app running inside of the viewer
04:44 Discussing the Python packages like shiny that are being used from my conda environment


Summary:

In this video, we use the Positron IDE (Public Beta) to create and render Shiny applications in both R and Python.

In short, you need to install the Shiny VS extension by going to the extensions tab, searching for `shiny` (the non-deprecated one), and then pressing install on the Shiny extension. Alternatively, you can directly go to the extension page on OpenVSX and install it there:



Once the extension is installed, the R and Python document file types will gain a new option to "Run Shiny App" under the play button. Please make sure to name your Shiny app files appropriate, e.g. app.R and app.py. Avoid placing the shiny application in your home directory, e.g. ~/, on macOS to avoid a permissions issue.

The Shiny for R app was built using the different UI/Server components here:


The Shiny for Python App was built using the first example here:



Positron can be obtained from:



This was demonstrated on:

Positron Version: 2024.06.1 (Universal) build 27
Code - OSS Version: 1.90.0
Commit: a893e5b282612ccb2200102957ac38d3c14e5196
Date: 2024-06-26T02:08:06.673Z
Electron: 29.4.0
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Darwin arm64 23.5.0


Watch video Positron IDE Creating Two Single File Shiny Apps in R and Python (Public Beta) online without registration, duration 05 minute 26 second in high hd quality. This video was added by user TheCoatlessProfessor 28 June 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2 thousand once and liked it 3 people.