-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathlectures.Rmd
209 lines (188 loc) · 6.55 KB
/
lectures.Rmd
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
---
title: "Schedule & course materials"
output: html_document
---
<br>
#### Navigating through a slide deck
* Use the arrow keys (←/→) on your keyboard to go forward or backward
* Press the "o" key on any slide to show you an overview of the slide deck
* In overview mode, click on a slide or press "esc" to zoom in on it
* You can also print the slides to a pdf by selecting the "print" option from your browser's File menu.
```{r child = "_timeline.Rmd", include=FALSE}
```
```{r child = "_list_of_lectures.Rmd", include=FALSE}
```
```{r week_lecs, include = FALSE}
## empty list for lecs
week_lecs <- vector("list", 30)
names(week_lecs) <- paste0("L", seq(30))
## lecture topics
## week 1: Jan 6-10
week_lecs$L1 <- intro
week_lecs$L2 <- analysis_steps
week_lecs$L3 <- organization_styles
## week 2: Jan 13-17
week_lecs$L4 <- github
week_lecs$L5 <- remotes
week_lecs$L6 <- version_control
## week 3: Jan 20-24
week_lecs$L7 <- holiday_1
week_lecs$L8 <- workflows_1
week_lecs$L9 <- workflows_2
## week 4: Jan 27-31
week_lecs$L10 <- working_with_data
week_lecs$L11 <- data_ingest
week_lecs$L12 <- getting_help
## week 5: Feb 3-7
week_lecs$L13 <- metadata # databases_1
week_lecs$L14 <- analysis_visualization # databases_2
week_lecs$L15 <- markdown_1 # databases_3
## week 6: Feb 10-14
week_lecs$L16 <- markdown_2 # metadata
week_lecs$L17 <- markdown_3 # analysis_visualization
week_lecs$L18 <- markdown_4 # markdown_1
## week 7: Feb 17-21
week_lecs$L19 <- holiday_2
week_lecs$L20 <- packages_1 # markdown_2
week_lecs$L21 <- packages_2 # markdown_3
## week 8: Feb 24-28
week_lecs$L22 <- databases_1
week_lecs$L23 <- databases_2
week_lecs$L24 <- databases_3
## week 9: Mar 3-7
week_lecs$L25 <- shiny_1
week_lecs$L26 <- shiny_2
week_lecs$L27 <- guest_holmes
## week 10: Mar 10-14
week_lecs$L28 <- code_reviews
week_lecs$L29 <- ethics
week_lecs$L30 <- TBD
```
```{r topics, include = FALSE, eval = FALSE}
lec_titles <- lapply(week_lecs, function(x) { if(is.list(x)) {x$title} else {""} })
## topics formatted for html
lec_titles_html <- sapply(lapply(lec_titles, paste, "<br>", collapse = ""), c)
names(lec_titles_html) <- NULL
```
```{r lecture_topics, include = FALSE}
lec_topics <- lapply(week_lecs, function(x) { if(is.list(x)) {x$topics} else {""} })
## topics formatted for html
lec_topics_html <- sapply(lapply(lec_topics, paste, "<br>", collapse = ""), c)
names(lec_topics_html) <- NULL
```
```{r lec_links, include = FALSE}
## HTML
slide_links <- lapply(week_lecs, function(x) { if(is.list(x)) {c(x$html)} else {""} })
slide_links_html <- sapply(lapply(slide_links, function(x) {
if(length(x)>1) {
tmp1 <- paste0("[",
as.character(fontawesome::fa("file-alt", height = "2em", fill = "#3399f3")),
" (", 1:length(x), ")](")
} else {
tmp1 <- paste0("[",
as.character(fontawesome::fa("file-alt", height = "2em", fill = "#3399f3")),
"](")
}
tmp2 <- ")"
tmp <- paste0(tmp1, x, tmp2)
tmp[x==""] <- ""
tmp <- paste(tmp, collapse = "<br>")
tmp}), c)
## Rmd
source_links <- lapply(week_lecs, function(x) { if(is.list(x)) {c(x$rmd)} else {""} })
source_links_html <- sapply(lapply(source_links, function(x) {
if(length(x)>1) {
tmp1 <- paste0("[",
as.character(fontawesome::fa("file-code", height = "2em", fill = "#3399f3")),
" (", 1:length(x), ")](")
} else {
tmp1 <- paste0("[",
as.character(fontawesome::fa("file-code", height = "2em", fill = "#3399f3")),
"](")
}
tmp2 <- ")"
tmp <- paste0(tmp1,x,tmp2)
tmp[x==""] <- ""
tmp <- paste(tmp, collapse = "<br>")
tmp}), c)
## PDF
pdf_links <- lapply(week_lecs, function(x) { if(is.list(x)) {c(x$pdf)} else {""} })
pdf_links_html <- sapply(lapply(pdf_links, function(x) {
if(length(x)>1) {
tmp1 <- paste0("[",
as.character(fontawesome::fa("file-pdf", height = "2em", fill = "#3399f3")),
" (", 1:length(x), ")](")
} else {
tmp1 <- paste0("[",
as.character(fontawesome::fa("file-pdf", height = "2em", fill = "#3399f3")),
"](")
}
tmp2 <- ")"
tmp <- paste0(tmp1, x, tmp2)
tmp[x==""] <- ""
tmp <- paste(tmp, collapse = "<br>")
tmp}), c)
```
```{r zoom_links, include = FALSE}
zoom_links <- lapply(week_lecs, function(x) { if(is.list(x)) {x$zoom} else {""} })
## topics formatted for html
zoom_links_html <- sapply(lapply(zoom_links, function(x) {
if(length(x)>1) {
tmp1 <- paste0("[",
as.character(fontawesome::fa("file-video", height = "2em", fill = "#3399f3")),
" (", 1:length(x), ")](")
} else {
tmp1 <- paste0("[",
as.character(fontawesome::fa("file-video", height = "2em", fill = "#3399f3")),
"](")
}
tmp2 <- ")"
tmp <- paste0(tmp1, x, tmp2)
tmp[x==""] <- ""
tmp <- paste(tmp, collapse = "<br>")
tmp}), c)
```
```{r youtube_links, include = FALSE, eval = FALSE}
youtube_links <- lapply(week_lecs, function(x) { if(is.list(x)) {x$youtube} else {""} })
## topics formatted for html
youtube_links_html <- sapply(lapply(youtube_links, function(x) {
tmp1 <- "[YouTube]("; tmp2 <- ")"
tmp <- paste0(tmp1, x, tmp2)
tmp[x==""] <- ""
tmp <- paste(tmp, collapse = "<br>")
tmp}), c)
names(youtube_links_html) <- NULL
```
```{r background_links, include = FALSE}
background_links <- lapply(week_lecs, function(x) { if(is.list(x)) {x$background} else {""} })
## topics formatted for html
background_links_html <- sapply(lapply(background_links, paste, "<br>", collapse = ""), c)
names(background_links_html) <- NULL
```
```{r generate_table, echo=FALSE}
## data frame with dates & topics
syl_txt <- data.frame(
date = qtr,
lec_topics = lec_topics_html,
lec_links = slide_links_html,
# rmd_links = source_links_html,
# pdf_links = pdf_links_html,
# zoom_links = zoom_links_html,
# youtube_links = youtube_links_html,
background_links = background_links_html
)
colnames(syl_txt) <- c("Date", "Topics",
"Notes", # "Source (Rmd)", "Slides (pdf)",
# "Zoom recording",
"Background")
rownames(syl_txt) <- NULL
## generate table
kableExtra::kable(syl_txt, format = "html", caption = " ",
align = "clcc", escape = FALSE) %>%
kable_styling(bootstrap_options = "striped",
full_width = FALSE,
position = "left") %>%
column_spec(c(1,3), width = "6em") %>%
column_spec(4, width = "15em") %>%
scroll_box(height = "700px", extra_css = "border-style: none;")
```