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
- Use usethis with
library(usethis)ordevtools::use_devtools(). - Use
pr_init()to initialize work on a new pull-request branch. - Use
pr_pause()to pause work on a pull-request branch (to start a new one). - Use RStudio's branch menu (Git pane) to switch between pull-request branches.
- Use
pr_sync()to update a pull-request branch againstupstream.
- Initialize a pull request with
pr_init("prefix_you")(you is your name). - Copy (don't rename)
prefix_you.Rmd(a new file with your name). - Submit a draft pull request with
pr_push(). - Open
prefix_you.Rmdand 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().