Start by loading packages.
Use fs to get a list of all Rmd files in the subfolders of the static/slides folder.
files <- fs::dir_info(here("static", "slides"), recursive = TRUE, glob = "*.Rmd") %>%
slice(-1) %>%
mutate(path = as.character(path)) %>%
select(path)Define two functions for extracting the title and emoji keyword from the second line of each Rmd file. This is the line that contains the title in the YAML.
extract_title <- function(x){
read_lines(as.character(x), skip = 1, n_max = 1) %>%
str_extract(" .*\\<") %>%
str_remove('\"') %>%
str_remove("\\<") %>%
str_trim()
}
extract_keyword <- function(x){
read_lines(as.character(x), skip = 1, n_max = 1) %>%
str_extract("emo::ji\\(.*\\)") %>%
str_remove("emo::ji\\('") %>%
str_remove("'\\)")
}Grab titles, keywords, and find corresponding emojis, with a little bit of help from here.
files <- files %>%
mutate(
title = map(path, extract_title) %>% unlist(),
keyword = map(path, extract_keyword) %>% unlist(),
emoji = map_chr(keyword, function(x) glue(emo::ji_name[x], collapse = ""))
)View titles, keywords, and emojis.
| title | emoji | keyword |
|---|---|---|
| Welcome to Data Science | ๐ | raised_hands |
| Meet the toolkit | โ | hammer_and_pick |
| Data and visualization | ๐ | chart_with_downwards_trend |
| Tidy data and data wrangling | ๐ง | wrench |
| Tips for effective data visualization | ๐ | nail_polish |
| Merge conflicts | โ | no_entry |
| Implementing principles for effective visualizations in R | ๐ฉโ๐จ | woman_artist |
| Coding style | ๐ | dress |
| Scientific studies, confounding, and Simpsonโs paradox | ๐ | confounded |
| Data classes and types + Recoding | ๐ฝ | minidisc |
| Review + recap | ๐งข | billed_cap |
| Web scraping | ๐ธ | spider_web |
| Functions and automation | ๐ค | robot |
| The language of models | ๐ | chart_with_upwards_trend |
| Simple linear regression | ๐ก | dango |
| Multiple linear regression | ๐คนโโ | woman_juggling |
| Model selection | ๐ | ok_hand |
| Model validation + prediction | ๐ฎ | crystal_ball |
| Estimation via bootstrapping | ๐ข | boot |
| Hypothesis testing via simulation | ๐ | ab |
| Inference for regression | ๐ | straight_ruler |
| Central limit theorem | ๐ช | dromedary_camel |
| Inference and modeling review | ๐ | eyes |