Try Positron IDE

What is Positron?

Install and try Positron

If you don’t have Positron already, you can download the IDE here: https://positron.posit.co/download.html

Positron is still in beta testing

Positron might be a good fit for you today if… - you use VS Code for data science (Python or R) but wish it included more affordances for data-specific work like a dedicated console, variables pane, data explorer, and ways to interact with your plots. - you use Jupyterlab for data science (Python or R) and are ready for a more powerful, fully-featured IDE. - you use RStudio and want more ability to customize or extend your IDE. - you use additional languages beyond only Python or R in your day-to-day data science or package development work, like Rust, C++, JavaScript, or Lua.

Extensions

Since Positron is built on Code OSS, you can use VS Code extensions in Positron. Your extensions installed for Positron are separate from the extensions you have installed for VS Code, and they won’t interfere with each other. Positron bundles several extensions, including those for Quarto, Jupyter notebooks, and Pyright. These extensions are installed for you the first time you start Positron.

You can install the Shiny Extension from OpenVSX.

Dashboard

Here’s the Shiny Express Dashboard we’ve used in this lab

Copy the code below into a file called app.py

app.py
from palmerpenguins import load_penguins
from plotnine import aes, geom_histogram, ggplot, theme_minimal
from shiny.express import input, render, ui

dat = load_penguins()
species = dat["species"].unique().tolist()

ui.input_radio_buttons("species", "Species", species, inline=True)


@render.plot
def plot():
    sel = dat[dat["species"] == input.species()]
    return (
        ggplot(aes(x="bill_length_mm"))
        + geom_histogram(dat, fill="#C2C2C4", binwidth=1)
        + geom_histogram(sel, fill="#447099", binwidth=1)
        + theme_minimal()
    )

If you have the Shiny Extension installed, you can click the play button to run the Shiny application.

Or you can use the Positron Terminal to run your Shiny application

shiny run --reload app.py

This will start the app and open it in your default web browser.

  • The --reload flag enables automatic reloading. When you save changes to your source files, the app will automatically restart and update in the browser.
  • The --launch-browser flag opens the app in a browser as soon as it starts.

Learn more about Shiny in our Shiny Express Lab, and the Shiny Get Started page

Reproducible documents

Download one of our example Quarto document or Jupyter notebook files. and give them a try in positron!