Software by Carson Sievert#
Posts and resources by Carson Sievert#
Positron AI Session (George Stagg, Winston Chang, Tomasz Kalinowski , Carson Sievert) | posit::conf
George Stagg, Winston Chang, and Tomasz Kalinowski introduce AI capabilities in Positron, including Positron Assistant, a tool still in preview that enhances coding and data analysis.
0:00 Introduction to Posit’s approach to AI 0:23 George Stagg: Positron Assistant 11:03 Winston Chang: Databot 21:30 Tomasz Kalinowski: ragnar 31:13 Carson Sievert: chatlas 41:42 Q&A
posit::conf(2025) Subscribe to posit::conf updates: https://posit.co/about/subscription-management/




Carson Sievert - Supercharge Your Shiny (for Python) App: Unleashing Interactive Jupyter Widgets
Most Python packages that provide interactive web-based visualizations (e.g., altair, plotly, bokeh, ipyleaflet, etc.) can render in Jupyter notebooks via the ipywidgets standard. The shinywidgets package brings that ipywidgets standard to Shiny, enabling the use of 100s of Jupyter Widgets as Shiny outputs. In this talk, you’ll not only learn how to render Jupyter Widgets in Shiny to get interactive output, but also how to leverage user interaction with widgets to create delightful and bespoke experiences.
Talk by Carson Sievert
Slides: https://talks.cpsievert.me/20240814/ GitHub Repo: https://github.com/cpsievert/talks/tree/gh-pages/20240814

Using your dataset in Shiny Templates | Carson Sievert | Posit
Watch the Shiny team’s Carson Sievert change the dataset in a Shiny Template.
Find the right template for you at https://shiny.posit.co/py/templates/
0:00 Intro with Carson Sievert
0:19 How to load the template code
1:14 Running your Shiny app in VS Code with a live reloading preview
1:29 How this template works
2:23 See the contents of your data in a data_frame
2:53 How this template imports data
3:33 A more optimized way to import a large amount of data
5:10 Changing the dataset
5:44 Troubleshooting the inevitable errors when changing the dataset


Introducing Shiny for Python Templates | Carson Sievert | Posit
Last month we introduced the Shiny for Python Components and Layouts galleries, which are a simple, visual overview of what Shiny can do, mixed with cheatsheet-like information. They are for new and seasoned users alike.
We’re excited to announce a third section which brings those two things together into opinionated boilerplate code: Shiny Templates. This is just a start… We expect this gallery to grow as time goes on.
These will allow you to hit the ground running, whether you need a quick simple app or a quick complicated one .
Get started at https://shiny.posit.co/py/templates/
0:00 Introduction to Shiny for Python Templates 0:38 How to work with a template locally in VS Code 2:24 Preview your app with the Shiny for Python VS Code Extension 2:45 A data_frame is a quick and easy way to see the contents of your data 4:39 See everything in your window with the “fillable=True” page_opts 5:16 Modifying inputs 7:40 Fix the logic in your @render.plot to show your modified inputs 9:00 Add a component to the sidebar 9:05 How to add input_dark_mode to your app 9:54 How to make your plot change to dark mode as well

Towards the Next Generation of Shiny UI
Presented by Carson Sievert
Create awesome looking and feature rich Shiny dashboards using the bslib R package.
Shiny recently celebrated its 10th birthday, and since its birth, has grown tremendously in many areas; however, a hello world Shiny app still looks roughly like it did 10 years ago. The bslib R package helps solve this problem making very easy to apply modern and customizable styling your Shiny apps, R Markdown / Quarto documents, and more. In addition, bslib also provides dashboard-focused UI components like expandable cards, value boxes, sidebar layouts, and more to help you create delightful Shiny dashboards.
Materials:
Presented at Posit Conference, between Sept 19-20 2023, Learn more at posit.co/conference.#
Talk Track: Shiny user interfaces. Session Code: TALK-1124

Shinywidgets - An Overview || Carson Sievert || RStudio
Shiny makes it easy to build interactive web applications with the power of Python’s data and scientific stack.
Shinywidgets lets you use ipywidgets in Shiny for Python applications. We called it ipyShiny during development, but we’re launching as Shinywidgets! Learn more about how to integrate them into your Shiny for Python apps. .
Learn more about Shiny for Python: https://shiny.rstudio.com/py/ Check out our interactive Shiny for Python examples: https://shinylive.io/py/examples/
Content: Carson Sievert (@cpsievert) Producer: Jesse Mostipak (@kierisi) Editing and Motion Design: Tony Pelleriti (@TonyPelleriti)

Hey Shiny Team, what are some of your biggest learnings from 2022? || Shiny Developers || RStudio
BIG THINGS happened on the Shiny team in 2022! Our team built out a new Shiny UI Editor, Shiny for Python, and Shiny for Python in the browser using WebAssembly. So we asked some of our Developers what their biggest learnings have been from building these products!
Learn more about Shiny for Python: https://shiny.rstudio.com/py/
Content: Winston Chang (@winston_chang), Carson Sievert (@cpsievert), Nick Strayer (), Michael Chow (@chowthedog) Producer: Jesse Mostipak (@kierisi) Video editing + motion design: Tony Pelleriti (@TonyPelleriti)





Hello, World! A Quick Tour of Shiny for Python || Carson Sievert || Posit
Shiny makes it easy to build interactive web applications with the power of Python’s data and scientific stack.
Learn more about Shiny for Python: https://shiny.rstudio.com/py/ Check out our interactive Shiny for Python examples: https://shinylive.io/py/examples/
Content: Carson Sievert (@cpsievert) Producer: Jesse Mostipak (@kierisi) Editing and Motion Design: Tony Pelleriti (@TonyPelleriti)

Data visualization and plotting with Shiny for Python || Carson Sievert || RStudio
Shiny makes it easy to build interactive web applications with the power of Python’s data and scientific stack.
Learn more about Shiny for Python: https://shiny.rstudio.com/py/ Check out our interactive Shiny for Python examples: https://shinylive.io/py/examples/
Content: Carson Sievert (@cpsievert) Producer: Jesse Mostipak (@kierisi) Editing and Motion Design: Tony Pelleriti (@TonyPelleriti)

Carson Sievert || Using tagQuery() from {htmltools} to modify HTML snippets in R || RStudio
00:00 Introduction 00:45 Motivating example - enabling front-facing camera as an input for fileInput() 01:55 Breaking down the return value of fileInput() 04:16 Design philosophy of fileInput() 07:27 tagAppendAttributes() overview 11:05 tagQuery() basics 12:00 Quick overview of the htmltools package 13:18 How tagQuery() is used to append attributes 20:54 How tagQuery() is used to append children 23:45 Using tagQuery() on an actionButton()
Learn more about tagQuery here: https://rstudio.github.io/htmltools/articles/tagQuery.html
Read up on tagAppendAttributes() here: https://shiny.rstudio.com/reference/shiny/latest/tagAppendAttributes.html
And learn more about the htmltools package here: https://rstudio.github.io/htmltools/index.html
Got questions? The RStudio Community site is a great place to get assistance: https://community.rstudio.com/
Content: Developer (@winston_chang) Animation, design, and editing: Jesse Mostipak (@kierisi)

Carson Sievert || Customizing Navigation Items in Shiny using {bslib} || RStudio
00:00 Introduction 00:15 Linking inside navbarPage 01:19 Replacing tabPanel with navbarPage, and navbarMenu 02:32 nav_spacer() 03:41 Adding header and//or footer content 04:07 Replacing tabsetPanel with navs_tab and navs_pill 04:32 navs_tab_card() and navs_pill_card() variants 04:40 Demo of all of the nav_*() functions
The bslib R package provides tools for customizing Bootstrap themes directly from R, making it much easier to customize the appearance of Shiny apps & R Markdown documents. bslib’s primary goals are:
- To make custom theming as easy as possible.
- Custom themes may even be created interactively in real-time.
- Also provide easy access to pre-packaged Bootswatch themes.
- Make upgrading from Bootstrap 3 to 4 (and beyond) as seamless as possible. (Shiny and R Markdown default to Bootstrap 3 and will continue to do so to avoid breaking legacy code.)
- Serve as a general foundation for Shiny and R Markdown extension packages. (Extensions such as flexdashboard, pkgdown, and bookdown already fully support bslib’s custom theming capabilities.)
You can read more about bslib here: https://rstudio.github.io/bslib/articles/bslib.html And you can learn more about Shiny here: https://shiny.rstudio.com/
Got questions? The RStudio Community site is a great place to get assistance: https://community.rstudio.com/
Content: Carson Sievert (@cpsievert) Design & editing: Jesse Mostipak (@kierisi)

Carson Sievert || Developing Shiny Custom Themes in Real Time Using {bslib}| RStudio
00:00 Introduction 00:09 The magic of bs_theme_preview() 01:43 The interactive widget provided by bs_theme_preview() 02:12 Using Bootswatch themes 02:57 Using the interactive widget to adjust your theme in real time 03:38 Integration with Google Fonts 04:22 Thematic is enabled in bs_theme_preview() 04:45 DT tables is enabled in bs_theme_preview() 05:30 Going from the interactive widget to your R code 07:03 Using interactive theming on your own Shiny app 09:01 Interactive theming with R Markdown documents
The bs_theme_preview() function launches an example shiny app via run_with_themer() and bs_theme_dependencies(). This is useful for getting a quick preview of the current theme setting as well as an interactive GUI for tweaking some of the main theme settings. Link to docs: https://rstudio.github.io/bslib/reference/bs_theme_preview.html
You can read more about the bslib package here: https://rstudio.github.io/bslib/ And you can learn more about Shiny here: https://shiny.rstudio.com/
Got questions? The RStudio Community site is a great place to get assistance: https://community.rstudio.com/
Content: Carson Sievert (@cpsievert) Design and editing: Jesse Mostipak (@kierisi)

Carson Sievert || Custom Theming with {bslib} in Shiny and R Markdown using bs_theme() || RStudio
00:00 Introduction 01:15 Jumping right in with the theme argument in Shiny 01:31 Shiny’s classic navbarPage using bs_theme() 01:46 Specifying your Bootstrap version 02:31 Using the theme argument in R Markdown 03:17 Custom theming in R Markdown using bs_theme() 04:10 bslib templates provided by RStudio 05:33 Review of common arguments for the theme parameter 08:47 Tips for working with dark themes 10:34 Introduction to the thematic package, which styles plots 12:04 How thematic handles fonts 13:09 Using fonts with bslib in R Markdown 14:36 Moving a theme from an R Markdown document into a Shiny app 16:51 Setting warnings for contrast ratios 18:42 A quick tour of Bootstrap 4 and Bootstrap 5 Sass variables 20:35 A quick overview of writing custom HTML in Shiny 22:15 How bslib automatically handles color contrast ratios
bs_theme() allows you to creates a Bootstrap theme object, where you can choose a (major) Bootstrap version, choose a Bootswatch theme (optional), customize main colors and fonts via explicitly named arguments (e.g., bg, fg, primary, etc), and customize other, lower-level, Bootstrap Sass variable defaults via ….
You can read more about the bslib package here: https://rstudio.github.io/bslib/ And you can learn more about Shiny here: https://shiny.rstudio.com/
Got questions? The RStudio Community site is a great place to get assistance: https://community.rstudio.com/
Content: Carson Sievert (@cpsievert) Design and editing: Jesse Mostipak (@kierisi)


