Slide 1

Slide 1 text

mine-cetinkaya-rundel [email protected] @minebocek MINE ÇETINKAYA-RUNDEL DUKE UNIVERSITY + POSIT fosstodon.org/@minecr (N EVER-EVOLVING) 🔗 bit.ly/dsbox-evolving

Slide 2

Slide 2 text

Wickham, H., Çetinkaya-Rundel, M., & Grolemund, G. (2023). R for Data Science, 2nd Edition. Program Import Tidy Transform Visualize Model Communicate Understand Wickham, H., Çetinkaya-Rundel, M., & Grolemund, G. (2023). R for Data Science, 2nd Edition. DOING DATA SCIENCE

Slide 3

Slide 3 text

Communicate TEACHING DATA SCIENCE

Slide 4

Slide 4 text

Welcome to the first day of class!

Slide 5

Slide 5 text

‣ Go to Posit Cloud ‣ Start the project titled UN Votes

Slide 6

Slide 6 text

‣ Go to Posit Cloud ‣ Start the project titled UN Votes ‣ Open the Quarto document called unvotes.qmd

Slide 7

Slide 7 text

‣ Go to Posit Cloud ‣ Start the project titled UN Votes ‣ Open the Quarto document called unvotes.qmd ‣ Render the document and review the data visualization you just produced

Slide 8

Slide 8 text

‣ Go to Posit Cloud ‣ Start the project titled UN Votes ‣ Open the Quarto document called unvotes.qmd ‣ Render the document and review the data visualization you just produced ‣ Then, look for the character string “Turkey” in the code and replace it with another country of your choice ‣ Render again, and review how the voting patterns of the country you picked compare to the United States and the United Kingdom

Slide 9

Slide 9 text

Let’s take a look at the rest of the semester!

Slide 10

Slide 10 text

Content Tooling Pedagogy

Slide 11

Slide 11 text

Content Tooling Pedagogy

Slide 12

Slide 12 text

Tooling Pedagogy Content in 3 examples

Slide 13

Slide 13 text

FISHERIES OF THE WORLD 1

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

✴ data joins fisheries |> select(country) #> # A tibble: 82 × 1 #> country #> #> 1 Angola #> 2 Argentina #> 3 Australia #> 4 Bangladesh #> 5 Brazil #> 6 Cambodia #> 7 Cameroon #> 8 Canada #> 9 Chad #> 10 Chile # ℹ 72 more rows continents #> # A tibble: 245 × 2 #> country continent #> #> 1 Afghanistan Asia #> 2 Åland Islands Europe #> 3 Albania Europe #> 4 Algeria Africa #> 5 American Samoa Oceania #> 6 Andorra Europe #> 7 Angola Africa #> 8 Anguilla Americas #> 9 Antigua & Barbuda Americas #> 10 Argentina Americas #> # ℹ 235 more rows fisheries <- left_join(fisheries, continents) Joining with `by = join_by(country)`

Slide 16

Slide 16 text

✴ data joins ✴ data science ethics fisheries |> filter(is.na(continent)) #> # A tibble: 3 × 5 #> country capture aquaculture total continent #> #> 1 Democratic Republic of the Congo 237372 3161 240533 NA #> 2 Hong Kong 142775 4258 147033 NA #> 3 Myanmar 2072390 1017644 3090034 NA fisheries <- fisheries |> mutate( continent = case_when( country == "Democratic Republic of the Congo" ~ "Africa", country == "Hong Kong" ~ "Asia", country == "Myanmar" ~ "Asia", .default = continent ) )

Slide 17

Slide 17 text

✴ data joins ✴ data science ethics ✴ critique ✴ improving data visualisations

Slide 18

Slide 18 text

✴ data joins ✴ data science ethics ✴ critique ✴ improving data visualisations ✴ mapping

Slide 19

Slide 19 text

Project: Regional differences in average GPA and SAT Question: Exploring the regional differences in average GPA and SAT score across the US and the factors that could potentially explain them. Team: Mine’s Minions

Slide 20

Slide 20 text

COVID BRIEFINGS 2

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

✴ web scraping ✴ text parsing ✴ data types ✴ regular expressions

Slide 23

Slide 23 text

✴ web scraping ✴ text parsing ✴ data types ✴ regular expressions ✴ functions ✴ iteration

Slide 24

Slide 24 text

✴ web scraping ✴ text parsing ✴ data types ✴ regular expressions ✴ functions ✴ iteration ✴ data visualisation ✴ interpretation

Slide 25

Slide 25 text

✴ web scraping ✴ text parsing ✴ data types ✴ regular expressions ✴ functions ✴ iteration ✴ data visualisation ✴ interpretation ✴ text analysis

Slide 26

Slide 26 text

✴ web scraping ✴ text parsing ✴ data types ✴ regular expressions ✴ functions ✴ iteration ✴ data visualisation ✴ interpretation ✴ text analysis ✴ data science ethics robotstxt::paths_allowed("https://www.gov.scot") #> www.gov.scot #> [1] TRUE

Slide 27

Slide 27 text

Project: Factors Most Important to University Ranking Question: Explore how various metrics (e.g., SAT/ACT scores, admission rate, region, Carnegie classification) predict rankings on the Niche College Ranking List. Team: 2cool4school

Slide 28

Slide 28 text

SPAM FILTERS 3

Slide 29

Slide 29 text

✴ logistic regression ✴ prediction

Slide 30

Slide 30 text

✴ logistic regression ✴ prediction ✴ decision errors ✴ sensitivity / specificity ✴ intuition around loss functions

Slide 31

Slide 31 text

Project: Predicting League of Legends success Question: After 10 minutes into the game, whether a gold lead or an experienced lead was a better predictor of which team wins? Team: Blue Squirrels

Slide 32

Slide 32 text

Project: A Critique of Hollywood Relationship Stereotypes Question: How has the average age difference between two actors in an on- screen relationship changed over the years? Furthermore, do on-screen same-sex relationships have a different average age gap than on-screen heterosexual relationships? Team: team300

Slide 33

Slide 33 text

Content Tooling Pedagogy

Slide 34

Slide 34 text

live coding: in every “lecture”, along with time for students to attempt exercises on their own “minute paper”: weekly online quizzes ending with a brief reflection of the week’s material creativity: assignments that make room for creativity peer feedback: at various stages of the project teams: weekly labs in teams + periodic team evaluations + term project in teams

Slide 35

Slide 35 text

Çetinkaya-Rundel, Mine, Mine Dogucu, and Wendy Rummerfield. "The 5Ws and 1H of term projects in the introductory data science classroom." Statistics Education Research Journal 21.2 (2022): 4-4.

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

Content Pedagogy Tooling

Slide 38

Slide 38 text

student-facing + 📦 ghclass + instructor-facing 📦 checklist + + 📦 learnr + 📦 gradethis 📦 learnrhash or another browser/ server-based solution …

Slide 39

Slide 39 text

course organization students members assignments repos

Slide 40

Slide 40 text

course organization teams teams projects repos

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

Beckman, M. D., Çetinkaya-Rundel, M., Horton, N. J., Rundel, C. W., Sullivan, A. J., & Tackett, M. "Implementing version control with Git and GitHub as a learning objective in statistics and data science courses." Journal of Statistics and Data Science Education 29. (2021): S132-S144.

Slide 44

Slide 44 text

Content Tooling Pedagogy

Slide 45

Slide 45 text

Openness + Scalability

Slide 46

Slide 46 text

datasciencebox.org

Slide 47

Slide 47 text

datasciencebox.org

Slide 48

Slide 48 text

github.com/tidyverse/datascience-box

Slide 49

Slide 49 text

github.com/tidyverse/dsbox

Slide 50

Slide 50 text

AUDIENCE I have been teaching with R for a while, but I want to update my teaching materials I’m new to teaching with R and need to build up my course materials This teaching slide deck I came across on Twitter is pretty cool, but I have no idea what type of course it belongs in

Slide 51

Slide 51 text

on COMMUNITY

Slide 52

Slide 52 text

sta199-f22-1.github.io EXAMPLE

Slide 53

Slide 53 text

pos.it/conf TRAINING

Slide 54

Slide 54 text

SCHOLARSHIP Çetinkaya-Rundel, Mine, and Victoria Ellison. "A fresh look at introductory data science." Journal of Statistics and Data Science Education 29.sup1 (2021): S16-S26.

Slide 55

Slide 55 text

(N EVER-EVOLVING) mine-cetinkaya-rundel [email protected] @minebocek fosstodon.org/@minecr thank you! 🔗 bit.ly/dsbox-evolving