Tidy data-science: An online coding workshop for 2DII
August 26-27, 1-5pm - Berlin time
This workshop will cover the most useful bits of the tidyverse: The main features of ggplot2, tidyr, dplyr, and purrr. It will also help you practice other tools that are crucial for data science but won’t be the focus of any specific lesson: Rmarkdown, RStudio, Git, and GitHub.
- Overview the main features of ggplot2, tidyr, dplyr, and purrr.
- Solve iteration problems with purrr and dplyr instead of
for()
loops. - Practice working with Rmarkdown, RStudio, Git, and GitHub.
Please do this before the workshop to ensure we all have the same R environment; this avoids problems and saves time. You may ask for help on the #tidy-ds channel on Slack.
-
Setup usethis on rstudio.cloud following this 16’ video.
-
Fork and clone the tidy-ds repository into the home directory of the rstudio.cloud project you setup in (1):
create_from_github("2DegreesInvesting/tidy-ds", destdir = "~", fork = TRUE)
- Install the tidyverse packages and friends:
install.packages(c("tidyverse", "here", "vroom", "shiny"))
- Google doc: https://bit.ly/2020-08-26-tidy-ds
- tidy-ds repository: https://github.com/2DegreesInvesting/tidy-ds
This is an overview of all pull-request functions in the usethis package:
- Initialize a pull request with
pr_init("prefix_you")
(you = your name). - Copy (don’t rename) each lesson as
prefix_you.Rmd
(you = your name).
R
├── 01_skateboard_you.Rmd
├── 02_scooter_you.Rmd
├── 03_bicycle_you.Rmd
├── 04_motorbike_you.Rmd
└── 05_car_you.Rmd
- Submit a draft pull request with
pr_push()
. - Open
prefix_you.Rmd
and collapse all chunks with Alt+o (or Alt+Shift+o). - Attempt each challenge in a new chunk or in
chunk-1
; check withchunk-2
. - Commit your work with a meaningful message.
- Update the pull-request with
pr_sync()
. - Finish your pull request with
pr_finish()
(e.g. because it got merged). - Pause your pull request with
pr_pause()
(e.g. to initialize a new one).