class: center, middle, inverse, title-slide # Teaching R online with RStudio Cloud ## π
rstd.io/rscloud-webinar
###
Mine Γetinkaya-Rundel
π¦
minebocek
π©βπ»
mine-cetinkaya-rundel
βοΈ
mine@rstudio.com
###
24 March 2020 --- layout: true <div class="my-footer"> <span> <a href="https://rstd.io/rscloud-webinar" target="_blank">rstd.io/rscloud-webinar</a> </span> </div> --- class: middle .pull-left[ .huge-blue[Why] ] .pull-right[ .larger[ RStudio in the cloud? ] ] --- .pull-left[ ### lots of friction points - Install R - Install RStudio - Install the following packages: - rmarkdown - tidyverse - ... - Load these packages - Install git ] -- .pull-right[ ### much less friction - Go to rstudio.cloud - Log in ```r >hello R! ``` ] --- .pull-left[ ### you used to have this <img src="img/jonathan-borba-PZBjJ12Xv2s-unsplash.jpg" width="70%" /> ] -- .pull-right[ ### and now you have this <img src="img/sincerely-media-o5Key-1HzaY-unsplash.jpg" width="80%" /> ] .footnote[ .tiny[Photos by Jonathan Borba and Sincerely Media on Unsplash.] ] --- class: middle .pull-left[ .huge-blue[How] ] .pull-right[ .larger[ RStudio in the cloud? ] ] --- .pull-left[ **RStudio Server Pro** __*__ You have... - sysadmin experience / IT support - hardware / local VM / cloud computing credit - RStudio experience .midi[See [RStudio Academic Pricing](https://rstudio.com/pricing/academic-pricing/), freely licensed for teaching purposes.] ] .pull-right[ **RStudio Cloud** You have... - RStudio experience ] .footnote[ .small[ __*__ Γetinkaya-Rundel, Mine, and Rundel, Colin. "Infrastructure and tools for teaching computing throughout the statistical curriculum." The American Statistician (2018). Part of the Practical Data Science for Stats collection. [[Peer J]](https://peerj.com/preprints/3181/) [[TAS]](https://doi.org/10.1080/00031305.2017.1397549) ] ] --- class: middle .pull-left[ .huge-blue[Hello] ] .pull-right[ .larger[ RStudio Cloud ] ] --- ## What is RStudio Cloud? <br> .pull-left-narrow[ <img src="img/cloud.png" width="264" /> ] .pull-right-wide[ .large[We created [**RStudio Cloud**](https://rstudio.cloud/) to make it easy for professionals, hobbyists, trainers, teachers, and students to do, share, teach, and learn data science using R.] ] --- <img src="img/rstudio-ide.png" width="90%" style="display: block; margin: auto;" /> --- <img src="img/rstudio-cloud.png" width="90%" style="display: block; margin: auto;" /> --- ## Why RStudio Cloud? - Does not require IT support - Git works out of the box - Knit to PDF and Word works out of the box -- - Features designed for instructors: - Classes can be organized in workspaces - Members can be assigned different roles: instructor, TA, student - Projects can be public or private - Projects can be made into assignments - Students can make copies of projects created by instructor - Instructor can peek into student projects - A base project template can ensure same packages in each new project created in the workspace --- <img src="img/get-started.png" width="90%" style="display: block; margin: auto;" /> --- <img src="img/login.png" width="90%" style="display: block; margin: auto;" /> --- <img src="img/landing-1.png" width="90%" style="display: block; margin: auto;" /> --- <img src="img/landing-2.png" width="90%" style="display: block; margin: auto;" /> --- ## Workspaces - When you create an account on RStudio Cloud you get a workspace of your own - You can add a new workspace and control its permissions - Projects in either workspace can be public or private --- ## Projects .pull-left[ A new project in RStudio Cloud <img src="img/new-project-cloud.png" width="90%" style="display: block; margin: auto;" /> ] .pull-right[ is a new project in RStudio IDE <img src="img/new-project-local.png" width="90%" style="display: block; margin: auto;" /> ] .alert[ **PSA:** If you use RStudio, use projects! Trust me, you wonβt regret it. Find out more on [R for Data Science](https://r4ds.had.co.nz/workflow-projects.html). ] --- ## Projects from Git .pull-left[ A new project from Git Repo in RStudio Cloud <img src="img/new-project-git-cloud.png" width="90%" style="display: block; margin: auto;" /> ] .pull-right[ is the same as a new project from Git in RStudio IDE <img src="img/new-project-git-local.png" width="90%" style="display: block; margin: auto;" /> ] Both options `clone` a Git repo --- class: middle # Sharing option .pull-left[ .huge-blue[1] ] .pull-right[ .larger[ Single project ] ] --- class: middle, center <img src="img/cloud-setup-tweet.png" width="80%" style="display: block; margin: auto;" /> --- class: middle, center .larger[ π©βπ« teacher ] .larger[ π©βπ» student ] --- <iframe width="1200" height="530" src="https://www.youtube.com/embed/81MrMcKZTX8" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> .right[ .large[ π©βπ« ] ] --- <iframe width="1200" height="530" src="https://www.youtube.com/embed/_VCYdDQTFG8" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> .right[ .large[ π©βπ» ] ] --- ## Pros / cons: Sharing a single project <br> .pull-left[ ### Good! - Students land directly in a project upon login - Works well for workshops where all work will be completed in a single project - Also great for sharing code in general, e.g. collaboration, reprexes, etc. ] -- .pull-right[ ### Not so good... - Students need to remember to make a copy of the project (which means you need to remember to remind them!) - You can't keep track which students started their assignment - Students control permissions (they can share it with each other without your permission) ] --- ## Remote teaching: Sharing a single project <br> π You can't easily peek into student projects -- they would need to explicitly share the project with you - They need to set access level to --- class: middle # Sharing option .pull-left[ .huge-blue[2] ] .pull-right[ .larger[ Work- space ] ] --- <iframe width="1200" height="530" src="https://www.youtube.com/embed/tqu1m9R1HLw" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> .right[ .large[ π©βπ« ] ] --- ## Getting students into class workspace <img src="img/workspace-members.png" width="80%" style="display: block; margin: auto;" /> --- ## Getting students into class workspace #### Under the Members tab: .pull-left-narrow[ <img src="img/workspace-access.png" width="100%" /> ] .pull-right-wide[ - Make workspace shared for a short period of time, share link with students, enroll them as contributors. - After initial round of enrolment (e.g. drop/add) switch over to this access level - Use invitations for visitors added mid-semester ] .right[ .large[ π©βπ« ] ] --- ## Permission levels <br> | role | permission | course role | |-------------|--------------------------------------------------|-------------| | admin | manage users, view, edit and manage all projects | instructor | | moderator | view, edit and manage all projects | TA | | contributor | create, edit and manage their own projects | student | | viewer | view projects shared with everyone | auditor | .right[ .large[ π©βπ« ] ] --- ## Permissions #### Under the Members tab: .pull-left-narrow[ <img src="img/permissions.png" width="100%" /> ] .pull-right-wide[ - Recommend all permissions to be turned off - Think carefully before checking these boxes ] .right[ .large[ π©βπ« ] ] --- ## Capacity <img src="img/capacity.png" width="100%" /> .right[ .large[ π©βπ« ] ] --- ## Base projects One of the most attractive features of RStudio Cloud! - Packages you want *installed* on all student projects -- - Text documents you want to appear on **all** student projects (e.g. code of conduct, turn-in instructions, etc.) -- - Applies to all projects created **after** base project has been specified, doesn't apply retroactively -- - Can be updated as many times as you like throughout the course (without having to convince your IT!!!) --- <iframe width="1200" height="530" src="https://www.youtube.com/embed/Fz9UR6uxAG4" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> .right[ .large[ π©βπ« ] ] --- ## Inviting a student to a workspace <img src="img/invite-to-workspace.png" width="80%" style="display: block; margin: auto;" /> --- <iframe width="1200" height="530" src="https://www.youtube.com/embed/k_W1kS10rLw" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> .right[ .large[ π©βπ» ] ] --- ## Git integration π Only relevant if teaching with Git & GitHub! -- π Base project template can be used, so new project from Git also has the right packages installed! -- π Need to introduce yourself to Git **once for each project**. Start each assignment with one of the following: .small[ - In the *Terminal*: ``` git config user.name "Mona Lisa" git config user.email "mona.lise@example.com" ``` - In the R *Console*: ```r library(usethis) use_git_config(user.name = "Mona Lisa", user.email = "mona.lise@example.com") ``` ] --- ## Pros / cons: Sharing a workspace .pull-left[ ### Good! - Various permission levels - Base projects with desired packages installed - Assignments, which remove the need to remind students to make a copy of the project before starting work - Ability to peek into studentsβ projects ] -- .pull-right[ ### Not so good... - Students land in the workspace, may need to provide instructions for the next steps - Git config for each project can get tedious and doesn't reflect realistic practice ] --- ## Remote teaching: Sharing a workspace π You **can** easily peek into student projects <img src="img/view-derived-projects.png" width="70%" style="display: block; margin: auto;" /> --- ## Common pitfalls - Changes you make after student launches a project under either model (single project or workspace) wonβt propagate to their project -- - Packages in the base project will be **installed** in all projects in the workspace, but not **loaded** - If you need students to run code in the Console that requires a package, your instructions should remind them to load the package first - If using Rmd document, add a `load-package` chunk on top --- ## Feedback / questions / troubleshooting - Check out [status.rstudio.com](https://status.rstudio.com/) - Post on [RStudio Community](https://community.rstudio.com/c/rstudio-cloud) - Email [support@rstudio.cloud](mailto:support@rstudio.cloud) <img src="img/rstudio-cloud-sidebar.png" width="70%" style="display: block; margin: auto;" /> --- class: middle, inverse # On the horizon... --- ## Institution accounts <img src="img/institution-account.png" width="149" /> --- ## Dashboards Student usage / engagement metrics <img src="img/dashboard.png" width="992" /> --- ## π¦ rscloud - A new package for managing RStudio Cloud spaces with R: [github.com/rstudio/rscloud](https://github.com/rstudio/rscloud) - Requires an API key, which any instructor can request (via email for now, but soon in the UI as well) --- class: middle, inverse # Parting remarks --- ## Tips - Each project is allocated 1GB of RAM - Test things out before assignments involving large datasets - What your students see is not always what you see - Create a secondary account and add as a student --- ## More tips - Make brief screencasts for getting students oriented with the platform (especially if remote teaching), or use mine! .center[ [Navigating RStudio Cloud on YouTube](https://www.youtube.com/playlist?list=PLNUVZZ6hfXX05Bs80Hg5MjbOPnEFmwiOM) ] <img src="img/youtube-playlist.png" width="50%" style="display: block; margin: auto;" /> --- ## More tips - Remind students how to hide the sidebar! <img src="img/rstudio-cloud-hide-sidebar.png" width="70%" style="display: block; margin: auto;" /> --- ## More tips - Read the [RStudio Cloud guide](https://rstudio.cloud/learn/guide) <img src="img/rstudio-cloud-guide.png" width="70%" style="display: block; margin: auto;" /> --- ## Primers .pull-left[ <img src="img/primers.png" width="100%" /> ] .pull-right[ [rstudio.cloud/learn/primers](https://rstudio.cloud/learn/primers) - Free primers made with the **learnr** package - Companion to R4DS by Grolemund and Wickham ] --- class: middle <img src="img/wip-beta.png" width="100%" /> --- class: middle <img src="img/free-lunch.png" width="100%" /> --- layout: true class: center background-image: url(img/alex-machado-80sv993lUKI-unsplash.jpg) background-size: cover <br><br><br><br><br><br> # π [rstd.io/rscloud-webinar](https://rstd.io/rscloud-webinar) ---