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

Поделиться
HTML-код
  • Опубликовано: 2 авг 2024
  • 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:
    open-vsx.org/extension/posit/...
    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:
    shiny.posit.co/r/getstarted/s...
    The Shiny for Python App was built using the first example here:
    shiny.posit.co/py/docs/overvi...
    Positron can be obtained from:
    github.com/posit-dev/positron
    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
    #positron #posit #rstudio #rstats #shiny
  • НаукаНаука

Комментарии • 3

  • @jeevanbhandari8024
    @jeevanbhandari8024 Месяц назад

    Not working properly, error no xxxx file found

    • @thecoatlessprofessor7674
      @thecoatlessprofessor7674  Месяц назад

      Can you provide a bit more details on the error? Is the error associated with the Shiny for Python or Shiny for R demo?
      Did you accidentally save the `app.R`/`app.py` into the home directory, e.g. `~/`, instead of into a subfolder like `~/Documents` or `~/Desktop`?

    • @jeevanbhandari8024
      @jeevanbhandari8024 Месяц назад

      @@thecoatlessprofessor7674
      It was downloaded from positron itself, but in some other videos it explains with GitHub installation,
      It worked then.
      Thank you for your prompt reply.