Try Positron IDE
What is Positron?
- A next-generation data science IDE built by Posit PBC
- An extensible, polyglot tool for writing code and exploring data
- A familiar environment for reproducible authoring and publishing
Install and try Positron
If you don’t have Positron already, you can download the IDE here: https://positron.posit.co/download.html
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
= load_penguins()
dat = dat["species"].unique().tolist()
species
"species", "Species", species, inline=True)
ui.input_radio_buttons(
@render.plot
def plot():
= dat[dat["species"] == input.species()]
sel return (
="bill_length_mm"))
ggplot(aes(x+ 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!