├── .gitignore ├── README.md ├── handouts ├── Day-1-Synopsis.md ├── Planning.Rmd ├── Planning.pdf ├── RStudio-cloud.Rmd ├── RStudio-cloud.pdf ├── Topics.Rmd ├── Topics.pdf ├── Useful-Links.Rmd ├── Useful-Links.pdf ├── images │ ├── 1.png │ ├── 2.png │ ├── 3.png │ ├── 4.png │ ├── 5.png │ ├── cloud.png │ ├── menu.png │ └── top.png └── quiz-sheet.pages ├── pdfs ├── 00-Preclass-Loop.pdf ├── 01-Curriculum.pdf ├── 02-Explanations.pdf ├── 03-Exercises.pdf └── 04-Slides.pdf └── teach-tidy.Rproj /.gitignore: -------------------------------------------------------------------------------- 1 | # History files 2 | .Rhistory 3 | .Rapp.history 4 | # Session Data files 5 | .RData 6 | # Example code in package build process 7 | *-Ex.R 8 | # Output files from R CMD build 9 | /*.tar.gz 10 | # Output files from R CMD check 11 | /*.Rcheck/ 12 | # RStudio files 13 | .Rproj.user/ 14 | # produced vignettes 15 | vignettes/*.html 16 | vignettes/*.pdf 17 | # OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3 18 | .httr-oauth 19 | # knitr and R markdown default cache directories 20 | /*_cache/ 21 | /cache/ 22 | # Temporary files created by R markdown 23 | *.utf8.md 24 | *.knit.md 25 | # Shiny token, see https://shiny.rstudio.com/articles/shinyapps.html 26 | rsconnect/ 27 | .DS_Store 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RStudio Train-the-Trainer: Tidyverse Track 2 | 3 | This repository contains the class materials for _Teach Tidy_, the Tidyverse track of RStudio's Train-the-Trainer workshop. All of the materials are licensed [CC-BY-SA](https://creativecommons.org/licenses/by-sa/4.0/). 4 | 5 | We will visit the URL https://rstudio.cloud/project/168691 in the afternoon. 6 | 7 | Other important links include: 8 | 9 | * , which contains student materials for the _Master the Tidyverse_ workshop 10 | 11 | * , which contains instructor materials for the _Master the Tidyverse_ workshop 12 | 13 | * A demo [Master the Tidyverse RStudio Cloud space](https://rstudio.cloud/spaces/8543/join?access_code=5mwNCLtudIh9Rj8%2B0%2BPrVRK%2BbzHZGdltgXLngxHc) -------------------------------------------------------------------------------- /handouts/Day-1-Synopsis.md: -------------------------------------------------------------------------------- 1 | 1. **Two ways to teach** - We want to do better in less time and with less pain. Luckily, there is plenty of research on how to teach well. Today we will use the research to learn the craft of teaching, which is a lot like the craft of theatre: your lesson plan is your script. There are well-tested rules to help you write a good script, and there are well-tested rules to help you bring that script to life in the classroom. 2 | 3 | 2. **The Goal of Teaching** - Humans store knowledge as mental models saved in long-term memory. Adding to these models is a three step process: 4 | 1. We hold new information in our short term memory, which is very small. 5 | 2. We build relationships between the information and existing models by expending cognitive load, which is very limited. 6 | 3. We use the new model repeatedly so it does not fade away, but becomes easy to recall. 7 | The goal of teaching is to guide your students through these steps to build a useful mental model. You'll know if your performance succeeded if your students can begin doing things that require the new mental models. 8 | 9 | 3. **Teaching as Performance** - To help students do Steps 1 and 2, you must present clearly and structure your delivery into an easily digestible sequence. There are rules that can help you do this. Many of them take advantage of your students' enormous capacity to absorb visual information. But rules are not enough---to become good at teaching you must practice and seek feedback. 10 | 11 | 4. **Teaching as Audience Participation (Formative Feedback + Motivation)** - Each of the steps requires your student to do something---especially Step 3. You cannot do the work for the student, but you can motivate them to do it. You can also ensure they are doing the right thing. In fact, you must; because otherwise the student will reinforce the wrong mental models. 12 | 13 | 5. **Bring it all together into a lesson pattern** - You can use these well-tested patterns to design your own lessons. Each pattern applies what you have learned to teach in an effective way. -------------------------------------------------------------------------------- /handouts/Planning.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Workshop Planning Worksheet" 3 | date: "January 16, 2019" 4 | output: 5 | pdf_document 6 | link-citations: yes 7 | --- 8 | 9 | ```{r setup, include=FALSE} 10 | library(tufte) 11 | # invalidate cache when the tufte version changes 12 | knitr::opts_chunk$set(tidy = FALSE, cache.extra = packageVersion('tufte')) 13 | options(htmltools.dir.version = FALSE) 14 | ``` 15 | 16 | As you begin to plan your workshop, use these tools to make your job as clear as possible. 17 | 18 | 1. Learner Personas (_audience_) 19 | 2. Concept Maps (_content_) 20 | 3. Learning Objectives (_goal_) 21 | 22 | # Learning Objectives 23 | 24 | A **learning objective** is the goal of a course or section stated in a way that is: 25 | 26 | * clear (a student should be able to understand the objective) 27 | 28 | * observable (both you and the student should be able to easily check whether or not they have attained the objective) 29 | 30 | Learning objectives can help you 31 | 32 | * identify material to cut 33 | 34 | * ensure cohesion (section objectives should lead to course objective) 35 | 36 | * suggest exercises and assessments 37 | 38 | Research also shows that students learn better when they clearly understand the objectives of the lesson. 39 | 40 | When prompted, write a capstone learning objective for a one day Tidyverse course for our persona. 41 | 42 | 43 | \pagebreak 44 | 45 | # Learner Personas 46 | 47 | 48 | 49 | A learner persona is a short profile of a representative, but perhaps imaginary, student in your class, e.g.: 50 | 51 | > "Jean is a professor of Computer Science whose research area is operating systems. She has been teaching undergraduate classes for six years, and believes there has to be a better way. The only training available through her university's teaching and learning center relates to posting assignments and grades in the learning management system, so she wants to find out what else she ought to be asking for."^[Wilson, G. (2018). Teaching Tech Together. http://teachtogether.tech, 2.] 52 | 53 | A useful persona should include the student's 54 | 55 | 1. General background 56 | 1. Prior knowledge related to the subject 57 | 1. Motivation or goal(s) 58 | 1. How the course will help them 59 | 1. Special needs (if any) 60 | 61 | When prompted, write three learner personas below (beginner, expert, other), next to whichever faces you like. 62 | 63 | ```{r echo=FALSE, out.width = "10%"} 64 | knitr::include_graphics("images/1.png") 65 | ``` 66 | 67 | \vskip 0.2in 68 | 69 | ```{r echo=FALSE, out.width = "10%"} 70 | knitr::include_graphics("images/2.png") 71 | ``` 72 | 73 | \vskip 0.2in 74 | 75 | ```{r echo=FALSE, out.width = "10%"} 76 | knitr::include_graphics("images/3.png") 77 | ``` 78 | 79 | \vskip 0.2in 80 | 81 | ```{r echo=FALSE, out.width = "10%"} 82 | knitr::include_graphics("images/4.png") 83 | ``` 84 | 85 | \vskip 0.2in 86 | 87 | ```{r echo=FALSE, out.width = "10%"} 88 | knitr::include_graphics("images/5.png") 89 | ``` 90 | 91 | -------------------------------------------------------------------------------- /handouts/Planning.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio-education/teach-tidy/2c91639eb7abb38fa15d73a49640f7a45c3c8682/handouts/Planning.pdf -------------------------------------------------------------------------------- /handouts/RStudio-cloud.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "RStudio Cloud" 3 | date: "January 16, 2019" 4 | output: 5 | tufte::tufte_handout: 6 | latex_engine: xelatex 7 | link-citations: yes 8 | --- 9 | 10 | ```{r setup, include=FALSE} 11 | library(tufte) 12 | # invalidate cache when the tufte version changes 13 | knitr::opts_chunk$set(tidy = FALSE, cache.extra = packageVersion('tufte')) 14 | options(htmltools.dir.version = FALSE) 15 | ``` 16 | 17 | # Welcome to RStudio Cloud 18 | 19 | RStudio Cloud is a free cloud based version of the RStudio IDE. Your students do not need to install any software to use RStudio Cloud; it requires only an internet connection. All of their work is saved to the cloud, which means that your students can come back to their RStudio Cloud projects later, even from a different computer. 20 | 21 | ```{r echo=FALSE, out.width = "100%"} 22 | knitr::include_graphics("images/cloud.png") 23 | ``` 24 | 25 | \smallskip 26 | \smallskip 27 | \smallskip 28 | 29 | To log into RStudio Cloud, visit http://rstudio.cloud and click the log in button in the top right corner.^[If this is your first visit, click the Sign Up button.] You can login with: 30 | 31 | 1. Your google account 32 | 1. Your Github Account 33 | 1. Your shinyapps.io account 34 | 1. An RStudio Cloud account 35 | 36 | # Getting Started 37 | 38 | All of RStudio Cloud's features are documented in a user friendly guide that can be accessed by opening the sidebar of your RStudio Cloud home page, which is also known as _Your Workspace_.^[Click the `r knitr::include_graphics("images/menu.png")` icon in the top left corner to open the sidebar. Then click the link that says Guide.] 39 | 40 | \smallskip 41 | \smallskip 42 | \smallskip 43 | \smallskip 44 | \smallskip 45 | 46 | ```{r echo=FALSE, out.width = "100%"} 47 | knitr::include_graphics("images/top.png") 48 | ``` 49 | 50 | # Get to know RStudio Cloud 51 | 52 | Read the RStudio Cloud guide and use it to complete the challenges below. Use this sheet to jot down useful notes and reminders. 53 | 54 | \pagebreak 55 | 56 | A _________ is the fundamental unit of work in RStudio Cloud. Circle the items that are saved with a _________. 57 | 58 | 1. The packages that you have installed. 59 | 1. The files that you have saved. 60 | 1. The history of commands that you have run. 61 | 1. All of the above. 62 | 63 | \vskip 0.1in 64 | 65 | All of your projects are stored in an area known as _________. This is your home page in RStudio Cloud. 66 | 67 | \vskip 0.1in 68 | 69 | To create a new project, click the __________ button on this screen. 70 | 71 | \vskip 0.1in 72 | 73 | You can share a copy of a project with someone else by (_circle one_: sending them an invite / sending them the project URL). They will receive access to (_circle one_: your original project, which they can edit / a temporary copy of your project in its current state, which they can save as a permanent copy). You can share (_circle one_: any project as is / only projects that you make visible to everyone). 74 | 75 | \vskip 0.1in 76 | 77 | Do shared projects track changes made in the original project? Yes/No. 78 | 79 | \vskip 0.1in 80 | 81 | A ________ is a repository of projects that are only visible to you and the members that you invite. 82 | 83 | \vskip 0.1in 84 | 85 | Each member of a space receives a role. _______ and _______ can open any project in a private space and directly modify it. This is the only way to directly modify someone else's project in RStudio Cloud. 86 | 87 | \vskip 0.6in 88 | 89 | 1. Find the cheatsheet that corresponds to your package lesson. Open it. 90 | 91 | \vskip 0.6in 92 | 93 | 2. Find the Primer that corresponds to your package lesson. Scan its contents. 94 | 95 | \vskip 0.6in 96 | 97 | 3. Make a new project that you will use to save and share the exercises for your package lesson. -------------------------------------------------------------------------------- /handouts/RStudio-cloud.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio-education/teach-tidy/2c91639eb7abb38fa15d73a49640f7a45c3c8682/handouts/RStudio-cloud.pdf -------------------------------------------------------------------------------- /handouts/Topics.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | output: pdf_document 3 | --- 4 | 5 | # 1 6 | What is an R Package? 7 | 00-Introduction, Slides 14-19 8 | 9 | # 2 10 | What are aesthetics? 11 | How do you use them? 12 | 01-Visualize-Data, Slides 14-19 13 | 14 | # 3 15 | Introduce the babynames data 16 | 02-Transform-Data, Slides 2-6 17 | 18 | # 4 19 | Why and how to use `%>%`? 20 | 02-Transform-Data, Slides 43-50 21 | 22 | # 5 23 | What are groupwise operations? 24 | 02-Transform-Data, Slides 75-80 25 | 26 | # 6 27 | Introduce the flights data 28 | 02-Transform-Data, Slides 105-109 29 | 30 | # 7 31 | Explain mutating joins 32 | 02-Transform-Data, Slides 112-117 33 | 34 | # 8 35 | Explain filtering joins 36 | 02-Transform-Data, Slides 128-130 37 | 38 | # 9 39 | Why use tidy data? 40 | 03-Tidy Data, Slides 11-16 41 | 42 | # 10 43 | Explain gather 44 | 03-Tidy Data, Slides 22-41 45 | 46 | # 11 47 | Explain spread 48 | 03-Tidy Data, Slides 50-66 49 | 50 | # 12 51 | Introduce read_csv/csv files 52 | 04-Import-Data, Slides 7-10 53 | 54 | # 13 55 | Why use tibbles? 56 | 04-Import-Data, Slides 15-17 57 | 58 | # 14 59 | How are lists different from atomic vectors? 60 | 06-Iteration, Slides 7-17 61 | 62 | # 15 63 | How to subset lists 64 | 06-Iteration, Slides 18-23 65 | 66 | # 16 67 | Explain the map functions 68 | 06-Iteration, Slides 39-40, 67-68, 74, 76 69 | 70 | # 17 71 | A simple way to think of models (for any 72 | student who feels like an imposter) 73 | 07-Models, Slides 4-11 74 | 75 | # 18 76 | What are list-columns? And why use them? 77 | 08-List-Columns, Slides 34-37 -------------------------------------------------------------------------------- /handouts/Topics.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio-education/teach-tidy/2c91639eb7abb38fa15d73a49640f7a45c3c8682/handouts/Topics.pdf -------------------------------------------------------------------------------- /handouts/Useful-Links.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Useful Links" 3 | date: "January 16, 2019" 4 | output: 5 | tufte::tufte_handout: 6 | latex_engine: xelatex 7 | link-citations: yes 8 | --- 9 | 10 | ```{r setup, include=FALSE} 11 | library(tufte) 12 | # invalidate cache when the tufte version changes 13 | knitr::opts_chunk$set(tidy = FALSE, cache.extra = packageVersion('tufte')) 14 | options(htmltools.dir.version = FALSE) 15 | ``` 16 | 17 | # RStudio Train-the-Trainer: Tidyverse Track 18 | 19 | - **** 20 | 21 | Download today's class materials here. 22 | 23 | 24 | # Master the Tidyverse 25 | 26 | - **** 27 | 28 | A sharable RStudio Cloud project set up for Master the Tidyverse students. Contains all of the packages, slides, exercises, and solutions used in class. 29 | 30 | - **https://github.com/rstudio-education/master-the-tidyverse>** 31 | 32 | Student materials for Master the Tidyverse 33 | 34 | - **https://github.com/rstudio-education/master-the-tidyverse-instructors>** 35 | 36 | Instructor materials for Master the Tidyverse 37 | 38 | # General 39 | 40 | - **** 41 | 42 | The Log in page for RStudio Cloud 43 | 44 | - **** 45 | 46 | Online home of information related to tidyverse packages. 47 | 48 | - **** 49 | 50 | A free hosting service for shiny apps 51 | 52 | - **** 53 | 54 | Free slide editor by Google. Can read powerpoint files. 55 | 56 | - **** 57 | 58 | A cloud version of Keynote for anyone with an Apple ID 59 | 60 | # Useful Data Sets (For Exercises) 61 | 62 | ## In Tidyverse Packages 63 | 64 | - **dplyr** 65 | 66 | `band_instruments`, `band_instruments2`, `band_members`, `starwars`, `storms`, `nasa` (array) 67 | 68 | - **forcats** 69 | 70 | `gss_cat` 71 | 72 | - **ggplot2** 73 | 74 | `diamonds`, `economics`, `economics_long`, `faithfuld`, `midwest`, `mpg`, `msleep`, `presidential`, `seals`, `txhousing`, `luv_colours` 75 | 76 | - **lubridate** 77 | 78 | `lakers` 79 | 80 | - **modelr** 81 | 82 | `heights`, `sim1`, `sim2`, `sim3`, `sim4` 83 | 84 | - **stringr** 85 | 86 | `fruit` (vector), `sentences` (vector), `words` (vector) 87 | 88 | - **tidyr** 89 | 90 | `population`, `smiths`, `table1`, `table2`, `table3`, `table4a`, `table4b`, `table5`, `who` 91 | 92 | ## In Other Packages 93 | 94 | - **babynames** 95 | 96 | `applicants`, `babynames`, `births`, `lifetables` 97 | 98 | - **gapminder** 99 | 100 | `continent_colors`, `country_codes`, `country_colors`, `gapminder`, `gapminder_unfiltered` 101 | 102 | - **nasaweather** 103 | 104 | `atmos`, `borders`, `elev`, `glaciers`, `storms` 105 | 106 | - **nycflights13** 107 | 108 | `airlines`, `airports`, `flights`, `planes`, `weather` 109 | 110 | - **repurrrsive** 111 | 112 | `gap_simple`, `gap_nested`, `gap_split`, `gh_repos`, `gh_repos_json`, `gh_repos_xml`, `gh_users`, `gh_users_json`, `gh_users_xml`, `got_chars`, `got_chars_json`, `got_chars_xml`, `sw_films`, (list) `sw_people`, (list) `sw_planets`, (list) `sw_species`, (list) `sw_starships`, (list) `sw_vehicles`, (list) `wesanderson`, (list) `wesanderson_json`, `wesanderson_xml` 113 | 114 | ## Online 115 | 116 | - **https://github.com/rfordatascience/tidytuesday** 117 | 118 | Github Repository for Tidy Tuesday, a collection of data sets and exercises based on them. New data sets are added weekly. 119 | 120 | 121 | -------------------------------------------------------------------------------- /handouts/Useful-Links.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio-education/teach-tidy/2c91639eb7abb38fa15d73a49640f7a45c3c8682/handouts/Useful-Links.pdf -------------------------------------------------------------------------------- /handouts/images/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio-education/teach-tidy/2c91639eb7abb38fa15d73a49640f7a45c3c8682/handouts/images/1.png -------------------------------------------------------------------------------- /handouts/images/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio-education/teach-tidy/2c91639eb7abb38fa15d73a49640f7a45c3c8682/handouts/images/2.png -------------------------------------------------------------------------------- /handouts/images/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio-education/teach-tidy/2c91639eb7abb38fa15d73a49640f7a45c3c8682/handouts/images/3.png -------------------------------------------------------------------------------- /handouts/images/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio-education/teach-tidy/2c91639eb7abb38fa15d73a49640f7a45c3c8682/handouts/images/4.png -------------------------------------------------------------------------------- /handouts/images/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio-education/teach-tidy/2c91639eb7abb38fa15d73a49640f7a45c3c8682/handouts/images/5.png -------------------------------------------------------------------------------- /handouts/images/cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio-education/teach-tidy/2c91639eb7abb38fa15d73a49640f7a45c3c8682/handouts/images/cloud.png -------------------------------------------------------------------------------- /handouts/images/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio-education/teach-tidy/2c91639eb7abb38fa15d73a49640f7a45c3c8682/handouts/images/menu.png -------------------------------------------------------------------------------- /handouts/images/top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio-education/teach-tidy/2c91639eb7abb38fa15d73a49640f7a45c3c8682/handouts/images/top.png -------------------------------------------------------------------------------- /handouts/quiz-sheet.pages: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio-education/teach-tidy/2c91639eb7abb38fa15d73a49640f7a45c3c8682/handouts/quiz-sheet.pages -------------------------------------------------------------------------------- /pdfs/00-Preclass-Loop.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio-education/teach-tidy/2c91639eb7abb38fa15d73a49640f7a45c3c8682/pdfs/00-Preclass-Loop.pdf -------------------------------------------------------------------------------- /pdfs/01-Curriculum.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio-education/teach-tidy/2c91639eb7abb38fa15d73a49640f7a45c3c8682/pdfs/01-Curriculum.pdf -------------------------------------------------------------------------------- /pdfs/02-Explanations.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio-education/teach-tidy/2c91639eb7abb38fa15d73a49640f7a45c3c8682/pdfs/02-Explanations.pdf -------------------------------------------------------------------------------- /pdfs/03-Exercises.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio-education/teach-tidy/2c91639eb7abb38fa15d73a49640f7a45c3c8682/pdfs/03-Exercises.pdf -------------------------------------------------------------------------------- /pdfs/04-Slides.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstudio-education/teach-tidy/2c91639eb7abb38fa15d73a49640f7a45c3c8682/pdfs/04-Slides.pdf -------------------------------------------------------------------------------- /teach-tidy.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 2 10 | Encoding: UTF-8 11 | 12 | RnwWeave: Sweave 13 | LaTeX: pdfLaTeX 14 | --------------------------------------------------------------------------------