Upgrade to Pro — share decks privately, control downloads, hide ads and more …

R and GitHub sitting in a tree...

R and GitHub sitting in a tree...

ITiCSE 2019 GitHub Education talk. Aberdeen, Scotland.

Mine Cetinkaya-Rundel

July 15, 2019
Tweet

More Decks by Mine Cetinkaya-Rundel

Other Decks in Education

Transcript

  1. R & GitHub sitting in a tree… mine-cetinkaya-rundel [email protected] @minebocek

    mine çetinkaya-rundel university of edinburgh & rstudio bit.ly/r-git-tree
  2. bit.ly/r-git-tree students with little
 to no background
 in computing, data


    science, or statistics (but with enthusiasm to learn!) Intro to Data Science students ready to tackle real life data science problems using modern computational tools
  3. bit.ly/r-git-tree fundamentals of data & data viz, confounding variables, Simpson’s

    paradox tidy data, data frames vs. summary tables, recoding & transforming, web scraping & iteration building & selecting models, visualizing interactions, prediction & validation, inference via simulation data science ethics, interactive viz & reporting, text analysis, Bayesian inference modern computing reproducibility collaboration communication
  4. bit.ly/r-git-tree Intro to Data Science Duke Duke UoE yr 1

    18 open to all target: yrs 1&2 100 yr 1 plan: open to all 100, plan: >>100
  5. bit.ly/r-git-tree one organization per class one repo per assignment per

    student / team weekly labs [team] bi-weekly homework assignments [individual] two take-home exams [individual] two-phase project [team]
  6. bit.ly/r-git-tree " instructor + ghclass R package of tools for

    managing GitHub class organization accounts
  7. bit.ly/r-git-tree ghclass > Functions are prefixed with either org, repo,

    team, github, or local_repo to indicate what they operate on. > Functions are vectorized over their parameters, to allow related operations to be grouped. > Functions the unix design philosophy when possible, work towards simple & composable functions. > Functions are verbose to communicate what’s happening, but they can be quieted down. > Actions are non-destructive and/or backed by Git, the handful of dangerous operations throw warnings.
  8. bit.ly/r-git-tree 00. create course roster " instructor #> # A

    tibble: 6 x 4 #> uid email ghname team #> <chr> <chr> <chr> <chr> #> 1 za17 [email protected] ghclass-anya team-01 #> 2 kb34 [email protected] ghclass-bruno team-01 #> 3 ac13 [email protected] ghclass-celine team-01 #> 4 bd88 [email protected] ghclass-diego team-02 #> 5 se01 [email protected] ghclass-elijah team-02 #> 6 df00 [email protected] ghclass-francis team-02
  9. bit.ly/r-git-tree 03. create student repos org_create_assignment(org = "ghclass-demo", repo =

    paste0("hw-03-ncbikecrash-", roster$ghname), user = roster$ghname, source_repo = “ghclass-demo/hw-03-ncbikecrash") #> ✔ Created repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-anya'. #> ✔ Created repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-bruno'. #> ✔ Created repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-celine'. #> ✔ Created repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-diego'. #> ✔ Created repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-elijah'. #> ✔ Created repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-francis'. #> ✔ Added user 'ghclass-anya' to repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-anya'. #> ✔ Added user 'ghclass-bruno' to repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-bruno'. #> ✔ Added user 'ghclass-celine' to repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-celine'. #> ✔ Added user 'ghclass-diego' to repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-diego'. #> ✔ Added user 'ghclass-elijah' to repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-elijah'. #> ✔ Added user 'ghclass-francis' to repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-francis'. #> ✔ Cloned 'ghclass-demo/hw-03-ncbikecrash'. #> ✔ Pushed (mirror) 'hw-03-ncbikecrash' to repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-anya'. #> ✔ Pushed (mirror) 'hw-03-ncbikecrash' to repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-bruno'. #> ✔ Pushed (mirror) 'hw-03-ncbikecrash' to repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-celine'. #> ✔ Pushed (mirror) 'hw-03-ncbikecrash' to repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-diego'. #> ✔ Pushed (mirror) 'hw-03-ncbikecrash' to repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-elijah'. #> ✔ Pushed (mirror) 'hw-03-ncbikecrash' to repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-francis'. #> ✔ Removed local copy of 'ghclass-demo/hw-03-ncbikecrash' " instructor
  10. bit.ly/r-git-tree 04. modify student repos repo_add_file(repo = org_repos("ghclass-demo", "hw-03-"), file

    = "files/nc-county-map.png") #> ✔ Added file 'nc-county-map.png' to repo 'ghclass-demo/hw-03-ncbikecrash'. #> ✔ Added file 'nc-county-map.png' to repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-anya'. #> ✔ Added file 'nc-county-map.png' to repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-bruno'. #> ✔ Added file 'nc-county-map.png' to repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-celine'. #> ✔ Added file 'nc-county-map.png' to repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-diego'. #> ✔ Added file 'nc-county-map.png' to repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-elijah'. #> ✔ Added file 'nc-county-map.png' to repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-francis'. " instructor
  11. bit.ly/r-git-tree 04. modify student repos repo_add_file(repo = org_repos("ghclass-demo", "hw-03-"), file

    = "files/hw-03-ncbikecrash.Rmd", message = "Fix date", overwrite = TRUE) #> ✔ Added file 'hw-03-ncbikecrash.Rmd' to repo 'ghclass-demo/hw-03-ncbikecrash'. #> ✔ Added file 'hw-03-ncbikecrash.Rmd' to repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-anya'. #> ✔ Added file 'hw-03-ncbikecrash.Rmd' to repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-bruno'. #> ✔ Added file 'hw-03-ncbikecrash.Rmd' to repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-celine'. #> ✔ Added file 'hw-03-ncbikecrash.Rmd' to repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-diego'. #> ✔ Added file 'hw-03-ncbikecrash.Rmd' to repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-elijah'. #> ✔ Added file 'hw-03-ncbikecrash.Rmd' to repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-francis'. " instructor
  12. bit.ly/r-git-tree github_test_token() #> ✔ Your GitHub token is functioning correctly.

    sitrep github_test_token("bad token") #> ✖ Your GitHub token failed to authenticate. #> [Error: GitHub API error (401): 401 Unauthorized]
  13. bit.ly/r-git-tree #> ✔ Created repo 'ghclass-demo/hw-05-collegemajor-team-01'. #> ✔ Created repo

    'ghclass-demo/hw-05-collegemajor-team-02'. #> ✔ Added 'ghclass-anya' to team 'team-01'. #> ✔ Added 'ghclass-bruno' to team 'team-01'. #> ✔ Added 'ghclass-celine' to team 'team-01'. #> ✔ Added 'ghclass-diego' to team 'team-02'. #> ✔ Added 'ghclass-elijah' to team 'team-02'. #> ✔ Added 'ghclass-francis' to team 'team-02'. #> ✔ Added team 'team-01' to repo 'ghclass-demo/hw-05-collegemajor-team-01'. #> ✔ Added team 'team-02' to repo 'ghclass-demo/hw-05-collegemajor-team-02'. #> ✔ Cloned 'ghclass-demo/hw-05-collegemajor'. #> ✔ Pushed (mirror) 'hw-05-collegemajor' to repo 'ghclass-demo/hw-05-collegemajor-team-01'. #> ✔ Pushed (mirror) 'hw-05-collegemajor' to repo 'ghclass-demo/hw-05-collegemajor-team-01'. #> ✔ Pushed (mirror) 'hw-05-collegemajor' to repo 'ghclass-demo/hw-05-collegemajor-team-01'. #> ✔ Pushed (mirror) 'hw-05-collegemajor' to repo 'ghclass-demo/hw-05-collegemajor-team-02'. #> ✔ Pushed (mirror) 'hw-05-collegemajor' to repo 'ghclass-demo/hw-05-collegemajor-team-02'. #> ✔ Pushed (mirror) 'hw-05-collegemajor' to repo 'ghclass-demo/hw-05-collegemajor-team-02'. #> ✔ Removed local copy of 'ghclass-demo/hw-05-collegemajor' org_create_assignment(org = "ghclass-demo", repo = paste0("hw-05-collegemajor-", roster$team), user = roster$ghname, team = roster$team, source_repo = "ghclass-demo/hw-05-collegemajor") teams
  14. bit.ly/r-git-tree repo_style(repo = "ghclass-demo/hw-03-ncbikecrash-ghclass-anya", files = "*.Rmd", draft = TRUE)

    #> ✔ Created branch 'styler' from 'ghclass-demo/hw-03-ncbikecrash-ghclass-anya'. #> ✔ Cloned 'ghclass-demo/hw-03-ncbikecrash-ghclass-anya@styler'. #> ✔ Created pull request for 'ghclass-demo/hw-03-ncbikecrash-ghclass-anya (master #<= styler)'. styler
  15. bit.ly/r-git-tree repo_delete(repo = org_repos(org = "ghclass-demo", filter = "hw-03-ncbikecrash-")) #>

    This command will delete the following repositories permanently: 'ghclass-demo/ hw-03-ncbikecrash-ghclass-anya', 'ghclass-demo/hw-03-ncbikecrash-ghclass-bruno', 'ghclass-demo/hw-03-ncbikecrash-ghclass-celine', 'ghclass-demo/hw-03-ncbikecrash- ghclass-diego', 'ghclass-demo/hw-03-ncbikecrash-ghclass-elijah', 'ghclass-demo/hw-03- ncbikecrash-ghclass-francis'. 1: Not now 2: Absolutely 3: No Selection: clean up #> ✔ Deleted repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-anya'. #> ✔ Deleted repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-bruno'. #> ✔ Deleted repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-celine'. #> ✔ Deleted repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-diego'. #> ✔ Deleted repo 'ghclass-demo/hw-03-ncbikecrash-ghclass-elijah'. #> ✔ Deleted repo ‘ghclass-demo/hw-03-ncbikecrash-ghclass-francis'. 2
  16. R & GitHub sitting in a tree… mine-cetinkaya-rundel [email protected] @minebocek

    mine çetinkaya-rundel university of edinburgh & rstudio bit.ly/r-git-tree rundel.github.io/ghclass