forked from ulyngs/pagedownCV
-
Notifications
You must be signed in to change notification settings - Fork 0
/
one-column-paged-academic.Rmd
430 lines (362 loc) · 13 KB
/
one-column-paged-academic.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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
---
output:
pagedown::html_paged:
css: ["css/one-column-paged-academic.css", "https://use.fontawesome.com/releases/v5.7.2/css/all.css"]
number_sections: false
links-to-footnotes: true
knit: pagedown::chrome_print
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, warning = FALSE, message = FALSE)
library(tidyverse)
library(knitr)
library(lubridate)
library(glue)
######## CREATE HELPER FUNCTIONS
# function which takes a name and replaces the first name with initial and dot
replace_first_name_with_initial_and_dot <- function(author_name) {
str_replace(author_name, "(?<=\\S)\\S+", "\\.")
}
# function for doing this for an entry with a number of authors
replace_first_names_in_list_with_initial_and_dot <- function(authors){
authors_split <- str_split(authors, ",") %>%
map(str_trim)
authors_split[[1]] %>% map_chr(replace_first_name_with_initial_and_dot) %>%
paste0(collapse = ", ")
}
# function for adding leading zero's when there's more than 10 entries
padding_function <- function(cv_entries_tibble, letter_to_pad){
if(nrow(cv_entries_tibble) > 9){
cv_entries_tibble %>%
arrange(date) %>%
mutate(number = str_pad(row_number(), width = 2, side = "left", pad = "0"),
number = str_c(letter_to_pad, number)) %>%
arrange(desc(date))
} else {
cv_entries_tibble %>%
arrange(date) %>%
mutate(number = str_pad(row_number(), width = 1, side = "left", pad = "0"),
number = str_c(letter_to_pad, number)) %>%
arrange(desc(date))
}
}
# function for making a year blank when it's the same as the one preceding it
blank_year_when_repeated <- function(cv_entry_tibble){
cv_entry_tibble %>%
mutate(row_number = row_number()) %>%
mutate(year = as.character(year),
year = case_when(
row_number == 1 ~ year,
year == lag(year) ~ "",
year != lag(year) ~ year
))
}
####### READ IN DATA
#### publications #####
publications <- read_csv("_content/publications.csv") %>%
mutate(authors_full = map_chr(authors_full, replace_first_names_in_list_with_initial_and_dot)) %>%
mutate(authors_full = str_replace(authors_full, "U\\. Lyngs", "*U\\. Lyngs*")) %>% # make my name italic
mutate(year = year(date))
#### cv entries #####
cv_entries <- read_csv("_content/cv_entries.csv") %>%
mutate(year = year(date)) %>%
mutate(year_end = case_when(
date_end == "present" ~ date_end,
!is.na(date_end) ~ str_sub(date_end, 1, 4),
is.na(date_end) ~ date_end
)) %>%
mutate(year = ifelse((is.na(year_end) | year == year_end),
year,
str_c(year, " --- ", year_end)))
```
:::::: {.title-and-contact}
::: {.title}
<h1 class="title">Ulrik Lyngs</h1>
:::
::: {.contact-info}
https://ulriklyngs.com
:::
::::::
## Research summary
:::::: {.research-interests}
::: {.spacer}
:::
::: {.interests}
**Aims---**to develop and evaluate design patterns that help people exercise self-control over their use of smartphones and laptops.
<br>
**Methods---**controlled studies, user surveys, interviews, co-design workshops, web scraping, behaviour logging.
**I am passionate about** open and transparent research.
Since 2018, I have shared materials, analysis scripts, and data for all my work, and written my papers as reproducible documents in [R Markdown](https://rmarkdown.rstudio.com).
:::
::::::
<div class="cv-entries">
## Research positions
```{r}
cv_entries %>%
filter(type == 'research_positions', is.na(exclude)) %>%
mutate(what = glue("<span class='cv-entry-title'>{what}</span><br>",
"{where}"
)) %>%
select(year, what) %>%
kable()
```
## Education
```{r}
cv_entries %>%
filter(type == 'education') %>%
mutate(what = glue("<span class='cv-entry-title'>{what}</span>, {where}<br>",
"{additional_info}<br>",
"<span class='thesis-title'>{additional_info2}</span>")) %>%
select(year, what) %>%
kable()
```
## Major grants and funding
```{r}
cv_entries %>%
filter(type == 'major_grants') %>%
mutate(what = if_else(is.na(additional_info),
glue("<span class='cv-entry-title'>{what}</span> ({additional_info2}), {where}"),
glue("<span class='cv-entry-title'>{what}</span> ({additional_info2}), {where}.<br>{additional_info}"))) %>%
select(year, what) %>%
kable()
```
## Awards & honours
```{r}
cv_entries %>%
filter(type == 'awards') %>%
mutate(what = glue("<span class='cv-entry-title'>{what}</span>, {where}")) %>%
blank_year_when_repeated() %>%
select(year, what) %>%
kable()
```
## Publications {.three-split}
:::::: {.grid-container-publications}
::: {.conference-publication-heading}
<h3>Conference publications <br><span class="review-note">(fully reviewed, archival)</span></h3>
:::
::: {.conference-note}
<h3>In computer science, top-tier conferences (<30% acceptance rate) are as, or more impactful than journals, see doi.org/fgjt2h</h3>
:::
::::::
```{r}
publications %>%
filter(type == "conference paper") %>%
# insert appropriate icon for paper awards (and start with a line break)
mutate(award = case_when(
!is.na(award) & str_detect(award, "honourable") ~ glue("<br><i class='fas fa-award'></i> <span class='publication-award'>{award}</span>"),
!is.na(award) ~ glue("<br><i class='fa fa-trophy'></i> <span class='publication-award'>{award}</span>"),
TRUE ~ ""
)) %>%
# create citations
mutate(citation = glue("<span class='cv-entry-title'>{title}</span><br>",
"<span class='publication-authors'>{authors_full}</span><br>",
"<span class='publication-venue'>{venue_abbrev}: {venue}</span>{award}")) %>%
# number entries with a prefix
padding_function(., "C") %>%
blank_year_when_repeated() %>%
select(year, number, citation) %>%
knitr::kable()
```
<!-- <br class="pageBreak"> -->
<h3>Journal articles <span class="review-note">(fully reviewed, archival)</span></h3>
```{r}
publications %>%
filter(type == "journal article") %>%
mutate(citation = glue("<span class='cv-entry-title'>{title}</span><br>",
"<span class='publication-authors'>{authors_full}</span><br>",
"<span class='publication-venue'>{venue_abbrev}: {venue}</span>")) %>%
padding_function(., "J") %>%
blank_year_when_repeated() %>%
select(year, number, citation) %>%
knitr::kable()
```
<h3>Extended abstracts and workshop papers <br><span class="review-note">(lightly reviewed)</span></h3>
```{r}
publications %>%
filter(type == "extended abstract" | type == "workshop paper") %>%
mutate(citation = glue("<span class='cv-entry-title'>{title}</span><br>",
"<span class='publication-authors'>{authors_full}</span><br>",
"<span class='publication-venue'>{venue_abbrev}: {venue}</span>")) %>%
padding_function(., "A") %>%
blank_year_when_repeated() %>%
select(year, number, citation) %>%
knitr::kable()
```
<br class="pageBreak">
## Research dissemination
### Press
```{r}
cv_entries %>%
filter(type == 'media') %>%
select(year, what) %>%
kable()
```
### Talks {.three-split}
::: {.conference-presentations-omitted}
All first-authored conference publications listed above were also presented as talks at their respective conferences and are not listed again in this section.
:::
```{r}
cv_entries %>%
filter(type == 'talk', is.na(exclude)) %>%
# add commas as appropriate
mutate(where = if_else(!is.na(where) & !is.na(institution), glue(", {where}"), where),
department = if_else(!is.na(department), glue(", {department}"), department),
slides = if_else(!is.na(slides), glue("<a href={slides}>Slides</a>"), ""),
video = if_else(!is.na(video), glue("<a href={video}>Video</a>"), "")) %>%
mutate(additional_info = if_else(!is.na(additional_info), glue(", {additional_info}"), "")) %>%
mutate(what = glue("<span class='cv-entry-title'>{institution}{where}</span>{department}{additional_info}<br>",
"<span style='display:inline-block;' class='talk-title'>{what}</span>",
.na = "")) %>%
padding_function(., "T") %>%
blank_year_when_repeated() %>%
select(year, number, what) %>%
knitr::kable()
```
### Discussion panels {.three-split}
```{r}
cv_entries %>%
filter(type == 'talk-panel') %>%
mutate(additional_info = if_else(is.na(additional_info), "", additional_info)) %>%
mutate(what = glue("<span class='cv-entry-title'>{where}</span>, {what}, {additional_info}")) %>%
padding_function(., "D") %>%
blank_year_when_repeated() %>%
select(year, number, what) %>%
knitr::kable()
```
<!-- <br class="pageBreak"> -->
### Poster presentations {.three-split}
```{r}
cv_entries %>%
filter(type == 'poster') %>%
mutate(what = glue("<span class='cv-entry-title'>{where}</span>, {what}")) %>%
padding_function(., "P") %>%
blank_year_when_repeated() %>%
select(year, number, what) %>%
knitr::kable()
```
### Podcasts {.three-split}
```{r}
cv_entries %>%
filter(type == 'talk-podcast') %>%
mutate(what = glue("<span class='cv-entry-title'>{where}</span>, {what}")) %>%
padding_function(., "Pod") %>%
blank_year_when_repeated() %>%
select(year, number, what) %>%
knitr::kable()
```
### Blog posts {.three-split}
```{r}
cv_entries %>%
filter(type == 'pop-writing') %>%
mutate(what = glue("<span class='cv-entry-title'>{where}</span>, {what}")) %>%
padding_function(., "B") %>%
blank_year_when_repeated() %>%
select(year, number, what) %>%
knitr::kable()
```
## R packages
```{r}
cv_entries %>%
filter(type == 'programming' & is.na(exclude)) %>%
replace_na(list(where = "", additional_info = "")) %>%
mutate(what = glue("<span class='cv-entry-title'>{what}</span>, {where}")) %>%
arrange(desc(year)) %>%
mutate(row_number = row_number()) %>%
select(year, what) %>%
kable()
```
## Publicly available research code & data
```{r}
pubs_w_number <- publications %>%
select(type, authors_full, date, title, materials) %>%
mutate(inclusive_type = if_else(type == "workshop paper" | type == "extended abstract", "abstract", type)) %>%
group_by(inclusive_type) %>%
arrange(date) %>%
mutate(number = row_number(),
number = case_when(
inclusive_type == "conference paper" ~ glue("[C{number}]"),
inclusive_type == "journal article" ~ glue("[J{number}]"),
inclusive_type == "abstract" ~ glue("[A{number}]"),
TRUE ~ ""
))
public_code <- cv_entries %>%
filter(type == 'open_research' & is.na(exclude)) %>%
select(what, additional_info) %>%
rename(title = additional_info) %>%
left_join(pubs_w_number)
public_code %>%
mutate(year = year(date)) %>%
mutate(what = glue("<span class='cv-entry-title'>{what} {number}</span><br>",
"{authors_full}<br>",
"{materials}")) %>%
arrange(desc(date)) %>%
select(year, what) %>%
kable()
```
<br class="pageBreak">
## Teaching experience
```{r}
cv_entries %>%
filter(type == 'teaching') %>%
mutate(what = glue("<span class='cv-entry-title'>{what}</span>, {where}<br>",
"{additional_info}")) %>%
select(year, what) %>%
kable()
```
<!-- <br class="pageBreak"> -->
## Service
```{r}
cv_entries %>%
filter(type == 'service') %>%
mutate(where = if_else(!is.na(url), glue("[{where}]({url})"), where)) %>%
mutate(what = glue("<span class='cv-entry-title'>{what}</span> {where}")) %>%
select(year, what) %>%
kable()
```
## Selected work experience
```{r}
cv_entries %>%
filter(type == 'work', is.na(one_column_paged)) %>%
mutate(additional_info = replace_na(additional_info, "")) %>%
mutate(what = glue("<span class='cv-entry-title'>{what}</span>, {where}<br>",
"{additional_info}")) %>%
select(year, what) %>%
kable()
```
## Professional development
```{r}
cv_entries %>%
filter(type == 'prof-dev') %>%
mutate(what = glue("<span class='cv-entry-title'>{what}</span>, {where}")) %>%
select(year, what) %>%
kable()
```
## Minor grants and funding
```{r}
cv_entries %>%
filter(type == 'minor_grants') %>%
mutate(what = if_else(!is.na(additional_info),
glue("<span class='cv-entry-title'>{what}</span> ({additional_info2}), {where}.<br> ",
"{additional_info}"),
glue("<span class='cv-entry-title'>{what}</span> ({additional_info2}), {where}"))) %>%
blank_year_when_repeated() %>%
select(year, what) %>%
kable()
```
<!-- <br class="pageBreak"> -->
<!-- <br class="pageBreak"> -->
## Personal skills & volunteering {.packages}
```{r}
cv_entries %>%
filter(type == 'volunteering') %>%
mutate(what = glue("<span class='cv-entry-title'>{what}</span>, {where}")) %>%
mutate(what = if_else(!is.na(additional_info), glue("{what}<br>{additional_info}"), what)) %>%
arrange(desc(date), desc(date_end)) %>%
select(year, what) %>%
kable()
```
<!-- <br class="pageBreak"> -->
<!-- close 'cv-entries' div -->
</div>
# Links