-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschedule.qmd
113 lines (100 loc) · 2.88 KB
/
schedule.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
---
title: "Schedule"
execute:
freeze: false
output: true
code-tools: false
code-link: false
---
::: {.callout-important}
## Important dates (more info during the class)
- Monday the 5^th^ of May: **[Written exam (in-class)]{.underline}**
- Wednesday the 21^th^ of May: **[Project report deadline]{.underline}**
- Sunday the 25^th^ of May: **[Slides submission deadline]{.underline}**
- Monday the 26^th^ of May: **[Presentations of the projects]{.underline}**
:::
```{r}
#| echo: false
#| message: false
#| warning: false
library(googlesheets4)
library(gt)
library(tidyverse)
# Try to read the sheet without authentication first
gs4_deauth()
tryCatch({
d <- read_sheet("https://docs.google.com/spreadsheets/d/18oYnuxY3hVve3s8g9tG16L7JlTtzfXzJmWMAk__1xK8/edit?usp=sharing")
}, error = function(e) {
# If there's an error, provide a meaningful message
stop("Unable to access the Google Sheet. Please check the URL and sharing permissions.")
})
```
```{r}
#| echo: false
#| echo: false
d |>
select(-dow) |>
mutate(
date = as.Date(date),
topic = gsub("\\+", "+<br>", topic), # Insert HTML line break after +
topic = gsub("\\s*\\(", "<br>(", topic) # Insert HTML line break before opening parenthesis
) |>
gt() |>
fmt_date(date, date_style = 31) |>
sub_missing(columns = c(week, topic, lecture_slide, lecture_note, lab), missing_text = "") |>
cols_align(
align = "center",
columns = c(week)
) |>
cols_align(
align = "right",
columns = c(date)
) |>
cols_align(
align = "left",
columns = c(topic, lecture_slide, lecture_note, lab)
) |>
tab_style(
style = cell_borders(
sides = "right",
color = "#D3D3D3",
style = "solid"
),
locations = cells_body(
columns = c(date, topic, lecture_slide, lecture_note, lab)
)
) |>
fmt_markdown(
columns = c(topic, lecture_slide, lecture_note, lab)
) |>
cols_width(
week ~ px(10),
date ~ px(120),
topic ~ px(10),
lecture_slide ~ px(90),
lecture_note ~ px(90),
lab ~ px(140),
) |>
cols_label_with(fn = function(x) {
janitor::make_clean_names(x, case = "title") |>
str_to_title() |>
stringr::str_replace_all("^|$", "**") |>
md()
}) |>
tab_options(table.font.size = 12) |>
opt_row_striping() |>
tab_footnote(
footnote = "📩 Report & Slides submission at 23:59",
locations = cells_body(
columns = 2,
rows = date %in% as.Date(c("2025-05-21", "2025-05-25"))
)
)
```
::: callout-caution
## Lecture Slides vs Lecture Notes
The most up to the date content of the course are found in the lecture slides. The lecture notes are only there to assist you, and may contain outdated (but still correct) information. Therefore, **always** refer to the lecture slides for the most accurate and up to date content.
:::
::: callout-note
The content of the schedule may be adapted (faster or slower).
:::