forked from ulyngs/pagedownCV
-
Notifications
You must be signed in to change notification settings - Fork 0
/
two-column-paged-brief.Rmd
236 lines (179 loc) · 5.94 KB
/
two-column-paged-brief.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
---
title: "Ulrik Lyngs <br> Curriculum vitae"
#date: "`r Sys.Date()`"
output:
pagedown::html_paged:
# CDN:
css: [css/professional_cv.css, "https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap-grid.min.css", "https://use.fontawesome.com/releases/v5.7.2/css/all.css"]
number_sections: false
links-to-footnotes: true
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
library(tidyverse)
library(knitr)
library(here)
library(lubridate)
#### publications #####
publications <- read_csv("_content/publications.csv")
#### cv entries #####
cv_entries <- read_csv("_content/cv_entries.csv") %>%
mutate(year_begin = 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_begin == year_end),
year_begin,
str_c(year_begin, " --- ", year_end)))
# create helper function for taking one name and replacing the first name with initial and dot
replace_first_name_with_initial_and_dot <- function(author_name) {
str_replace(author_name, "(?<=\\S)\\S+", "\\.")
}
# create function for doing this for an entry 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 = ", ")
}
```
<div class="row">
```{block type="col-6 summary", echo=TRUE}
# Personal summary {.summary}
I am a computer scientist and cognitive psychologist, researching design interventions for supporting self-control over digital device use.
My research combines qualitative and quantitative methods, including surveys, interviews, behaviour logging, and web scraping.
```
```{block type='col-6', echo=TRUE}
# Contact information {.box}
<div class="info-box">
| Center | Left |
|:------:|:-----|
| <i class="fas fa-map-marker-alt"></i>|Department of Computer Science,\
University of Oxford, UK|
| <i class="fas fa-envelope"></i> | ulrik.lyngs\@cs.ox.ac.uk |
| <i class="fas fa-globe"></i> | [ulriklyngs.com](https://ulriklyngs.com) |
| <i class="fab fa-github"></i> | [ulyngs](https://github.com/ulyngs) |
</div>
```
</div>
<div class="row pageone">
<div class='col-6 left'>
# Selected publications {.publications}
<div class='publications-table'>
```{r}
# create table
publications %>%
filter(professional_2_page == 'y') %>%
arrange(desc(date), type) %>%
mutate(authors_abbrev = map_chr(authors_full, replace_first_names_in_list_with_initial_and_dot)) %>%
mutate(author_year = str_c(authors_abbrev, " (", year(date), "). ")) %>%
mutate(title = ifelse(!is.na(url), str_c("[", title, "](", url, ")"), title)) %>% #turn title into link
mutate(title = str_c("<span style='text-decoration: underline'>", title, "</span>")) %>% #underline title
mutate(prof_venue = replace_na(prof_venue, "")) %>%
mutate(citation = ifelse(!is.na(award),
str_c(author_year, title, prof_venue, "<i class='fas fa-award'></i><em>", award, "</em>", sep = " "),
str_c(author_year, title, prof_venue, sep = " "))) %>%
mutate(citation = str_replace(citation, "U\\. Lyngs", "**U\\. Lyngs**")) %>% # make my name bold
select(citation) %>%
knitr::kable()
```
</div>
</div>
<div class='col-6 right'>
# Education {.education}
```{r}
cv_entries %>%
filter(type == 'education') %>%
mutate(what = str_c(what, ", ", where)) %>%
select(year, what) %>%
kable()
```
# Technical skills {.technical}
```{r}
cv_entries %>%
filter(type == 'technical') %>%
mutate(what = str_c("- *", what, "* ", additional_info)) %>%
select(what) %>%
kable()
```
# Software {.cv-table .nohead .vertical-top}
```{r}
cv_entries %>%
filter(type == 'programming') %>%
replace_na(list(where = "", additional_info = "")) %>%
mutate(what = str_c(what, ", ", where, "<br>", additional_info)) %>%
select(year_begin, what) %>%
arrange(desc(year_begin)) %>%
kable()
```
</div>
<!-- here ends the row i.e. the first page -->
</div>
<!-- <br class="pageBreak" /> -->
<!-- here starts the second page -->
<div class="row pagetwo">
<!-- here starts the first column -->
<div class="col-6 left-pagetwo">
# Professional development {.prof-dev}
```{r}
cv_entries %>%
filter(type == 'prof-dev') %>%
mutate(what = str_c(what, ", ", where)) %>%
select(year_begin, what) %>%
kable()
```
# Selected work experience {.work}
```{r}
cv_entries %>%
filter(type == 'work' & professional_2_page == 'y') %>%
mutate(what = str_c("<span class='work-title'>", what, "</span><br class='work-break'>", where, "<br>", additional_info)) %>%
select(year, what) %>%
kable()
```
# Selected grants and awards {.grants}
```{r}
cv_entries %>%
filter(type == 'minor_grants' | type == 'major_grants') %>%
filter(short_cv == 'y') %>%
mutate(where = if_else(is.na(where), "", where)) %>%
mutate(what = str_c(what, ", ", where)) %>%
select(year_begin, what) %>%
kable()
```
</div>
<!-- here starts the right column -->
<div class="col-6 right-pagetwo">
# Media coverage {.media}
```{r}
#
cv_entries %>%
filter(type == 'media') %>%
select(year_begin, what) %>%
kable()
```
# Selected talks {.talks}
```{r}
cv_entries %>%
filter(professional_2_page == 'y') %>%
filter(type == 'talk') %>%
mutate(what = str_c("*", what, "*, ", where)) %>%
select(year_begin, what) %>%
kable()
```
# Personal skills & volunteering {.personal}
```{r}
cv_entries %>%
filter(type == 'volunteering' & professional_2_page == 'y') %>%
mutate(what = str_c("<span class='work-title'>", what, "</span><br class='work-break'>", where)) %>%
mutate(what = ifelse(!is.na(additional_info), str_c(what, "<br>", additional_info), what)) %>%
arrange(order) %>%
select(year, what) %>%
kable()
```
</div>
<!-- here ends the second page -->
</div>
<br class='pageBreak'>
### Links