JavaScript for Shiny Users Workshop - rstudio::conf 2020

JavaScript for Shiny Users Workshop

9:00 AM-5:00 PM
2 Day Workshop

Garrick Aden-Buie
Moffitt Cancer Center

Shiny gives users a powerful toolkit to create interactive web applications. As a result, Shiny users are also web developers! Inevitably, an intermediate Shiny user will want to create a visualization or user interface that isn't available in the shiny package. Fortunately, we can use the building blocks of the web — JavaScript, HTML, and CSS — to extend Shiny's capabilities and create engaging Shiny apps.

This two-day, hands-on workshop will introduce Shiny users to JavaScript, the ubiquitous scripting language that powers the modern web. We will explore JavaScript's syntax and will discover its functional programming style to be refreshingly familiar to tidyverse R users. We will learn how to use JavaScript to manipulate HTML and how Shiny uses JavaScript to communicate between the browser and Shiny server. Together, we will build an htmlwidget and as we learn how to incorporate our own or packaged JavaScript code into Shiny apps and RMarkdown documents, and how to simultaneously manage JavaScript and R dependencies.

This workshop is for the Shiny user who boldly waded into the Customizing Shiny section of Shiny - Articles and quickly wished they had more experience with JavaScript. This user recognizes the benefits of learning JavaScript, but she is overwhelmed by the sheer number of packages, tutorials, and StackOverflow questions that exist in the world. The goal of this workshop is to meet the Shiny user where they are now to learn the best parts of JavaScript that will provide the most value and facilitate learning and exploration after the workshop.

Getting Ready

Please follow the setup instructions on our workshop webpage to be sure you're all set for the workshop.


Regarding setup, how essential are the version requirements for the software? If I have relatively current versions, will I likely be ok for this workshop?

My company maintains a central repo of approved software that can be installed. It's a fairly sizable list, but the software tends to be a few versions behind the most current. For example, here's the comparison between my set up and suggested:

My Version Suggested
RStudio 1.12 >= 1.2
R 3.5.0 >= 3.6.0
npm 6.7.0 6.13.4
node 11.12.0 13.6.0

I'm certainly not asking you to validate my specific set up, but are there any newer features that you know we will specifically be utilizing? For example, RStudio 1.2 added support for authoring D3 visualizations and previewing in the Viewer pane.

Thanks for asking! I'm worried about RStudio < 1.2 but I think the rest of the software versions will be okay. Can you verify that you have RStudio version 1.12? I'm looking at the RStudio versions list and I'm not finding a version that matches.

Generally speaking, though, I do worry that having RStudio < 1.2 will cause you some trouble or lead to a less smooth experience during the workshop. You may also run into some issues if your package versions are in line with the R version (but if you're using up to date packages on R 3.5.0 I think you'll be fine).

I will create an project that can be used at the workshop, so I would recommend that you setup an account there if you haven't already (it's free). That link will be shared just before or at the workshop itself. RStudio Cloud doesn't have node/npm (which are not a major part of the workshop) but it does have the latest RStudio and R versions and I'll have a fully set up a project with all the required packages.

1 Like

Hmm, I could see how working with a version of RStudio that was never released (1.12) might cause issues. What I should have typed was that I have 1.1.453 on my desktop.

I do have access to an RStudio Server Pro instance that is running 1.2 (and R 3.6.0 available), but it's lacking node/npm. I've used RStudio Cloud before and it's great for these kind of workshops/trainings. I'm happy here this will be an option to use.

Thanks for your help and I'm looking forward to this workshop!

@grrrck is it possible the slides that you showed us during the workshop will be available to download (i.e.

Hi @adan -- the slides will be up at that link for the forseable future. I will also upload a version of the slides that follows the material we covered in the workshop into the workshop repo, hopefully within the next week.


Cool @grrrck looking forward to seeing the slides posted since I couldn't figure out how to download them from the link:


I'm still working on consolidating everything into a single repo. I just uploaded the slide source code to the rstudio-conf-2020/js-for-shiny repo.

FYI, the slides are xaringan (or remarkjs) slides and are therefore web pages. I'm curious why you want to download them? My setup is definitely a bit unusual so understanding your interests more specifically could help me better organize the material.

Was hoping to be able to view them without an internet connection, if possible =)

But thanks again I learned a lot in your workshop.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.