Pat uses a case_when logic statement to construct the title of a visual he's made in R to change with the date. Because the visual gets recreated every day, it is important for the format of the date in the title to change with the day. The overall goal of this project is to highlight reproducible research practices using a number of tools. The specific output from this project will be a map-based visual that shows the level of drought across the globe. The website we generate in this episode can be found at https://www.riffomonas.org/drought_index.
You can find my blog post for this episode at https://www.riffomonas.org/code_club/2022-11-07-case_when.
#case_when #R #github-actions #snakemake #Rstats #github
Support Riffomonas by becoming a Patreon member!
https://www.patreon.com/riffomonas
Want more practice on the concepts covered in Code Club? You can sign up for my weekly newsletter at https://shop.riffomonas.org/youtube to get practice problems, tips, and insights.
If you're interested in taking an upcoming 3 day R workshop be sure to check out our schedule at https://riffomonas.org/workshops/
You can also find complete tutorials for learning R with the tidyverse using...
Microbial ecology data: https://www.riffomonas.org/minimalR/
General data: https://www.riffomonas.org/generalR/
0:00 Introduction
2:53 Adjusting the start and end of the 30 day window
6:15 Writing R code for different date configurations
9:58 Consolodating code into case_when statements
18:20 Adjusting appearance of titles
20:13 Cleaning up repository and rendering