06/17/2021

Introduction

Using JupyterLab on JupyterHub is one excellent web-based solution for the computational needs of a data science course, but it requires substantial efforts on the part of the people maintaining the software and the server, if not a hosted solution.

Another cloud-based solution is using the RStudio Cloud, which eliminates the need for software installation, setup and maintenance. Having students use RStudio in the cloud can minimize setup frustration for both teachers and students.

In this presentation, we demonstrate some key features of the RStudio Cloud for teachers and students who can use both R and Python in the same R Markdown notebook, similar to JupyterLab. For Python one needs the Reticulate R package, which is the R interface to Python.

What is RStudio Cloud?

RStudio Cloud is a hosted solution that provides users with access to the familiar RStudio IDE plus capabilities that make teaching easier. An example would be the ability to set up a Workspace for each course, something like a virtual classroom.

RStudio Cloud makes it easy to:

  • Implement quickly exploratory data analysis and visualizations in the browser.
  • Share projects with your class or research team.
  • Teach data science with R and Python.
  • Learn data science with interactive tutorials.
  • Create virtual classrooms in RStudio Cloud without any IT support.

RStudio Cloud Plans

With RStudio Cloud, there is nothing to set up by Instructors or IT, and no dedicated hardware or software installation is required. Instructors and students only need a browser and Internet access. RStudio Cloud offers:

  • Cloud-Free Plan for casual use, with 15 project hours per month, one shared space with 15 projects.

  • Cloud-Plus Plan for $5 a month, which includes 50 project hours per month, one shared space with 15 projects.

  • Cloud Instructor Plan for $15 a month, which includes 160 project hours per month and unlimited shared spaces and projects.

RStudio Cloud Workspaces and Projects

  • Workspace: Every RStudio Cloud user gets a personal workspace in which to create projects. You can also create private, shared spaces that function as virtual classrooms for courses and workshops.

  • Members: These are the users added by the instructor and they can access a given workspace. Members can be assigned different roles: instructor, student, TA and auditor.

  • Projects: One can create RStudio projects within a workspace that can consist of one or more R Markdown or other files like R and Python scripts. When teaching a class, projects can be used to create assignments, which are shared automatically in the student’s workspace. Instructors can peek into student projects and check on a student’s progress. A base project template can ensure the same packages and data in each new project created in the workspace, propagating forward a consistent environment. Thus, the students do not have to worry about installing any packages and data.

Adding Students to the Class Workspace

It is best to share the class link with your students and set the permission to contributors so that they can join your workspace and create a free RStudio Cloud account to access the virtual classroom. One can also add students manually by inviting the students to join the workspace by email.

The official role names in RStudio Cloud are the following:

  • admin: manage users, view, edit and manage all projects - the instructor role.
  • moderator: view, edit and manage all projects - the TA role.
  • contributor: create, edit and manage their own projects - the student role.
  • viewer: view projects shared with everyone - the auditor role.

The Base Project

Having a base project eliminates the need for students to install any packages!

Everything that you install and add to your base project propagates to all future student assignments.

  • R packages you want installed on all future student projects.
  • text or R markdown documents you want to appear in all student projects (e.g. code of conduct, turn-in instructions, etc.).
  • the base project applies to all projects created after the base project has been created, but it doesn’t apply retroactively.
  • the base project can be updated as many times as you like throughout the course, but the changes propagate only forward.

RStudio Cloud Test Class

Collaboration in the RStduio Cloud

The instructor can peek into a student’s project and can edit, write comments and run the student’s code.

Keep in mind though that two people cannot be in the same project (possibly workspace) at the same time. The good news is that this very useful collaboration feature will be rolled out around the end of the year.

Upcoming RStudio Cloud Features:

  • Python integration with Jupyter Notebooks. Expected Fall 2021.

  • Collaborative (simultaneous) editing. Expected end of 2021 or early 2022.

Conclusions

My experience with the RStudio Cloud has been very positive and I find it to be an excellent computational platform for teaching any course that uses R and Python, without the need to maintain a server and software that could be a huge burden on faculty if they don’t get any IT support, which is often the case, especially at smaller Colleges.

Over the last academic year, I used with great success the RStudio Cloud at both the lower and the upper-levels. RStudio (on the cloud and locally) has been a one-stop solution for all my computing and publication needs, both educational and research.

We also have a server and we do want to experiment by installing JupyterHub, RStudio Server Pro and RStudio Connect, but finding the time to do this enormous amount of work, without any IT support, well beyond our teaching, research and service duties is a big challenge.