Skip to content

Commit

Permalink
refactor: ♻️ convert schedule from csv into Markdown table (#36)
Browse files Browse the repository at this point in the history
## Description

Using a CSV for the schedule doesn't actually make it easier to work
with compared to a Markdown table, so I converted it over.

## Checklist

- [x] Ran spell-check
- [x] Formatted Markdown
- [ ] Rendered website locally
  • Loading branch information
lwjohnst86 authored Oct 17, 2024
1 parent 20b3bf0 commit 436009b
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 73 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
.Rhistory
.RData
.Ruserdata
public
_site
/.quarto/
_freeze
26 changes: 0 additions & 26 deletions preamble/schedule.csv

This file was deleted.

79 changes: 32 additions & 47 deletions preamble/schedule.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,58 +12,43 @@ and others may be longer. Instead, it is meant to be an approximate
guide and overview.

::: panel-tabset
```{r schedule-table}
#| eval: true
#| echo: false
#| output: asis
library(dplyr)
add_link <- function(text, icon, link) {
colour <- "#138d75"
added_link <- paste0("<i class='fa-solid fa-", icon, "' style='color:", colour, "'></i>&nbsp;&nbsp;<a href=\"", link, "\">", text, "</a>")
if (link == "") {
added_link <- paste0("<i class='fa-solid fa-", icon, "' style='color:", colour, "'></i>&nbsp;&nbsp;", text)
}
return(htmltools::HTML(added_link))
}
schedule <- here::here("preamble/schedule.csv") %>%
readr::read_csv(col_types = "ccccc") %>%
mutate(across(everything(), ~ if_else(is.na(.x), "", .x))) %>%
mutate(
`Session topic` = list(`Session topic`, icon, link) %>%
purrr::pmap(~ add_link(..1, ..2, ..3)) %>%
unlist()
) %>%
select(-icon, -link)
```

## Day 1 {.unnumbered}

```{r}
#| echo: false
schedule %>%
filter(Day == "Day 1") %>%
select(-Day) %>%
knitr::kable()
```
| Time | Session topic |
|:------------|:----------------------------------------------------------|
| 9:30 | {{< fa mug-hot >}} Arrival. Coffee and snacks |
| 10:00 | {{< fa person-chalkboard >}} [Introduction to the course](../sessions/introduction.qmd) |
| 10:30 | {{< fa laptop-code >}} [Package setup](../sessions/package-setup.qmd) |
| 12:30 | {{< fa utensils >}} Lunch |
| 13:15 | {{< fa user-group >}} [Networking and social activity](../appendix/social.qmd#social-day-one) |
| 13:35 | {{< fa laptop-code >}} [Package setup](../sessions/package-setup.qmd) |
| 14:45 | {{< fa mug-hot >}} Break with coffee and snacks |
| 15:00 | {{< fa laptop-code >}} [Function development in a package environment](../sessions/function-development.qmd) |
| 16:30 | {{< fa comment-dots >}} End-of-day short survey |

## Day 2 {.unnumbered}

```{r}
#| echo: false
schedule %>%
filter(Day == "Day 2") %>%
select(-Day) %>%
knitr::kable()
```
| Time | Session topic |
|:------------|:----------------------------------------------------------|
| 9:00 | {{< fa laptop-code >}} [Documenting functions](../sessions/documenting-functions.qmd) |
| 10:15 | {{< fa mug-hot >}} Break with coffee, tea, and snacks |
| 10:30 | {{< fa laptop-code >}} [Creating formal tests of functions](../sessions/testing.qmd) |
| 12:30 | {{< fa utensils >}} Lunch |
| 13:15 | {{< fa user-group >}} [Networking and social activity](../appendix/social.qmd#social-day-two) |
| 13:35 | {{< fa laptop-code >}} [Debugging issues in your functions](../sessions/debugging.qmd) |
| 14:45 | {{< fa mug-hot >}} Break with coffee and snacks |
| 15:00 | {{< fa laptop-code >}} [Automated and independent testing](../sessions/automated-testing.qmd) |
| 16:30 | {{< fa comment-dots >}} End-of-day short survey |

## Day 3 {.unnumbered}

```{r}
#| echo: false
schedule %>%
filter(Day == "Day 3") %>%
select(-Day) %>%
knitr::kable()
```
:::
| Time | Session topic |
|:------------|:----------------------------------------------------------|
| 9:00 | {{< fa laptop-code >}} [Writing usage and guide documents](../sessions/writing-guides.qmd) |
| 10:15 | {{< fa mug-hot >}} Break with coffee and snacks |
| 11:00 | {{< fa laptop-code >}} [Creating a package website](../sessions/creating-website.qmd) |
| 12:30 | {{< fa utensils >}} Lunch |
| 13:15 | {{< fa user-group >}} [Project work](../appendix/project.qmd) |
| 16:00 | {{< fa person-chalkboard >}} [Closing remarks](../sessions/what-next.qmd) |
| 16:30 | {{< fa comment-dots >}} End-of-course short survey and farewell |
:::

0 comments on commit 436009b

Please sign in to comment.