forked from cjvanlissa/resume
-
Notifications
You must be signed in to change notification settings - Fork 0
/
resume.Rmd
544 lines (479 loc) · 20 KB
/
resume.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
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
---
title: "Caspar J. van Lissa, PhD"
subtitle: |
| Associate professor of social data science (with *ius promovendi*), Tilburg Young Academy board member, Open Science Community Tilburg chair, associate editor of Research Synthesis Methods.
| `r if(knitr::is_latex_output()){'This is an automatic summary of my interactive online resume at https://cjvanlissa.github.io/resume'}`
date: "Last updated: `r Sys.Date()`"
output:
html_document:
theme: cosmo
toc: true
toc_float: true
toc_depth: 2
includes:
in_header: header.html
pdf_document:
toc: true
toc_depth: 2
always_allow_html: yes
urlcolor: blue
classoption: oneside
header-includes:
- \usepackage{booktabs}
- \usepackage{longtable}
- \usepackage{array}
- \usepackage{multirow}
- \usepackage{wrapfig}
- \usepackage{float}
- \usepackage{colortbl}
- \usepackage{pdflscape}
- \usepackage{tabu}
- \usepackage{threeparttable}
- \usepackage{threeparttablex}
- \usepackage[normalem]{ulem}
- \usepackage{makecell}
- \usepackage{xcolor}
knit: |
(function(input, ...) {
rmarkdown::render(input,
output_format = "pdf_document",
output_options = list(toc = "true", toc_depth = 2))
rmarkdown::render(input, output_dir = "docs", output_file = "index.html")
})
---
<script>
$(document).ready(function() {
$('#TOC').parent().prepend('<div id=\"nav_logo\"><center><img src=\"/resume/assets/face.png\" class=\"center\"></center></div><div id=\"contactinfo\"><b>Caspar Van Lissa, PhD</b></div>');
});
</script>
<style>
#TOC {
margin-top: 270px;
}
#nav_logo {
position: fixed;
width: 230px;
margin-top: 20px;
justify-content: center;
}
#contactinfo {
position: fixed;
width: 230px;
margin-top: 250px;
justify-content: center;
}
</style>
<!-- <style> -->
<!-- #header { -->
<!-- position: fixed; -->
<!-- background: #ffffff; -->
<!-- color: white; -->
<!-- padding-bottom: 20px; -->
<!-- } -->
<!-- </style> -->
<!-- <div id="spacerrr"> -->
<!-- </div> -->
<!-- <style> -->
<!-- #spacerrr { -->
<!-- margin-top: 250px; -->
<!-- } -->
<!-- </style> -->
```{r setup, include=FALSE}
run_everything <- TRUE
knitr::opts_chunk$set(echo = FALSE, results = "asis", eval = TRUE, warning = FALSE)
library(knitr)
library(kableExtra)
options(kableExtra.latex.load_packages = FALSE)
library(dplyr)
library(DT)
library(dlstats)
library(renv)
print_cv <- function(table, ...){
Args <- as.list(match.call()[-c(1, 2)])
cat(apply(table, 1, function(x){
do.call(paste0, Args)
}), sep = " \n")
}
calculate_g <- function(x){
x <- x[order(x$cites, decreasing = TRUE), ]
which(diff(cumsum(x$cites) > ((1:nrow(x))^2)) == -1)
}
dt_wrap <- function(dat, childrow, options = NULL){
colnum <- which(names(dat) == childrow)
datatable(
cbind(' ' = '<img src="https://datatables.net/examples/resources/details_open.png"/>', dat), escape = -1,
options = c(list(
columnDefs = list(
list(visible = FALSE, targets = colnum),
list(orderable = FALSE, className = 'details-control', targets = 0)
)
), options),
callback = JS(paste0("table.column(0).nodes().to$().css({cursor: 'pointer'});
var format = function(d) {
return '<div style=\"background-color:#eee; padding: .5em;\"> ' +
d[", colnum, "] + '</div>';
};
table.on('click', 'td.details-control', function() {
var td = $(this), row = table.row(td.closest('tr'));
if (row.child.isShown()) {
row.child.hide();
td.html('<img src=\"https://datatables.net/examples/resources/details_open.png\"/>');
} else {
row.child(format(row.data())).show();
td.html('<img src=\"https://datatables.net/examples/resources/details_close.png\"/>');
}
});")
), rownames = FALSE)
}
scholar_stats <- read.csv("scholar_stats.csv", stringsAsFactors = FALSE)
```
## Experience
```{r results = "asis", echo = FALSE}
exp <- read.csv("Experience.csv", stringsAsFactors = FALSE)
#exp <- exp[order(exp$Order, decreasing = TRUE), ]
#exp$Begin <- gsub(" –.+$", "", exp$dates)
#exp$End <- gsub("^.+ – ", "", exp$dates)
exp <- exp[order(gsub("^\\w{3} ", "", exp$Begin), decreasing = TRUE), ]
row.names(exp) <- NULL
if(knitr::is_html_output()){
exp %>% select(Employer, Department, Position, Begin, End, Description) %>% dt_wrap("Description", options = list(dom = 't', "pageLength" = 40))
} else {
exp %>% select(Employer, Department, Position, Begin, End) %>% kable("latex", booktabs = TRUE) %>%
column_spec(column = c(1:3), width = "12em") %>%
kable_styling(latex_options = "striped", position = "left")
}
```
## Education
```{r results = "asis", echo = FALSE}
edu <- read.csv("education.csv", stringsAsFactors = FALSE)
row.names(edu) <- NULL
if(knitr::is_html_output()){
edu %>%
select(Institute,Field, Degree, Date, Description) %>%
dt_wrap("Description", options = list(dom = 't', "pageLength" = 40))
} else {
edu %>%
select(Institute,Field, Degree, Date) %>%
kable("latex", booktabs = TRUE) %>%
kable_styling(latex_options = "striped", position = "left")
}
```
## Publications
```{r, echo = FALSE, eval = run_everything}
library(scholar)
id <- 'ub59lUMAAAAJ'
## Get his profile
scholar_profile <- get_profile(id)
scholar_pubs <- get_publications(id, flush = TRUE)
scholar_pubs[sapply(scholar_pubs, is.factor)] <- lapply(scholar_pubs[sapply(scholar_pubs, is.factor)], as.character)
# scholar_pubs <- scholar_pubs[!grepl("Schmidt", scholar_pubs$title, ignore.case = T),]
scholar_stats <- data.frame(total = scholar_profile$total_cites,
G = calculate_g(scholar_pubs),
H = scholar_profile$h_index,
i10 = scholar_profile$i10_index)
write.csv(scholar_stats, "scholar_stats.csv", row.names = FALSE)
pub <- scholar_pubs
pub <- pub[!grepl("correction", pub$title, ignore.case = TRUE), ]
# Format authors in APA style
authors <- sapply(strsplit(pub$author, ","), function(x){
#browser()
initials <- gsub("^(.+?)\\s.*$", "\\1", trimws(x))
initials <- sapply(initials, function(i){
paste0(substring(i, seq(1, nchar(i), 1), seq(1, nchar(i), 1)), ".", collapse = " ")
})
last <- gsub("^.+?\\s", "", trimws(x))
paste0(last, ", ", initials, collapse = "; ")
})
authors <- gsub(";(?= [a-zA-Z ]+, ([A-Z]\\.){1,}$)", "; &", authors, perl = TRUE)
pub$author <- gsub("\\.{3}, \\.{2} \\.{2} \\.{2}", "et al\\.", authors)
# Abbreviate authors
num_authors <- lengths(regmatches(pub$author, gregexpr(";", pub$author)))
pub$author[num_authors > 4] <- gsub(";.+$", "; et al\\.", pub$author[num_authors > 4])
pub$author <- gsub("van Lissa", "Van Lissa", pub$author)
pub$author <- gsub(";", ",", pub$author)
if(any(pub$journal == toupper(pub$journal))){
pub$journal[which(pub$journal == toupper(pub$journal))] <- stringr::str_to_title(pub$journal[which(pub$journal == toupper(pub$journal))])
}
pub$title[nchar(pub$title) > 150] <- paste0(substr(pub$title[nchar(pub$title) > 150], 1, 149), "…")
pub$year[is.na(pub$year)] <- "in press"
# Filter out specific pubs
pub <- pub[!(grepl("(gorica|synthpop)", tolower(pub$title))), ]
pub <- pub[!(grepl("mplusauto", tolower(pub$title))), ]
pub <- pub[order(pub$year, decreasing = TRUE), c("author", "year", "title", "journal", "cites")]
names(pub) <- c("Authors", "Year", "Title", "Publication", "Cited")
pub[grepl("schumpe", pub$Authors, ignore.case = T), "Authors"] <- "Schumpe, P. C. C., Van Lissa, C. J. (joint 1st), et al."
write.csv(pub, "My publications.csv", row.names = FALSE)
```
According to [Google Scholar](https://scholar.google.com/citations?user=ub59lUMAAAAJ), my work has been cited `r scholar_stats$total` times (G-index: `r scholar_stats$G`, H-index: `r scholar_stats$H`, i10-index: `r scholar_stats$i10`).
```{r results = "asis", echo = FALSE, warning=FALSE}
pub <- read.csv("My publications.csv", stringsAsFactors = FALSE)
if(knitr::is_html_output()){
pub$Publication[!pub$Publication == ""] <- paste0('<i>', pub$Publication[!pub$Publication == ""], '</i>')
pub$Publication[grepl("(mplusautomation|bain|'metaforest'|gorica)", tolower(pub$Title))] <- "<tt>CRAN</tt>"
rownames(pub) <- NULL
pub %>% DT::datatable(escape=F, options = list(pageLength = nrow(pub)))
} else {
#pub$Publication[!pub$Publication == ""] <- paste0('*', pub$Publication[!pub$Publication == ""], '*')
#pub$Authors <- gsub("&", "\\&", pub$Authors)
#pub$Publication[!grepl("(r package version|^package)", tolower(pub$Title))] <- cell_spec(pub$Publication[!grepl("(r package version|^package)", tolower(pub$Title))], italic = TRUE, format = "latex")
pub$Publication[grepl("(r package version|^package)", tolower(pub$Title))] <- "CRAN"
rownames(pub) <- NULL
pub %>%
kable("latex", booktabs = TRUE, longtable = TRUE) %>% #
column_spec(1, width = "10em") %>%
column_spec(3, width = "20em") %>%
column_spec(4, width = "10em") %>%
kable_styling(latex_options = c("repeat_header", "striped"), position = "left")
}
```
## Software
```{r results = "asis", echo = FALSE, eval=run_everything}
pack <- data.frame(read.csv("R-packages.csv", stringsAsFactors = FALSE))
if(!exists(".dlstats")) .dlstats <- new.env()
downloads <- cran_stats(pack$title[pack$repo == "CRAN"])
downloads <- tapply(downloads$downloads, downloads$package, sum)
downloads[is.na(downloads)] <- 0
pack$downloads[match(names(downloads), pack$title)] <- downloads
pack <- pack[order(pack$downloads, decreasing = TRUE, na.last = TRUE), ]
write.csv(pack, "R-packages.csv", row.names = FALSE)
```
```{r results = "asis", echo = FALSE}
pack <- data.frame(read.csv("R-packages.csv", stringsAsFactors = FALSE))
pack$downloads[!is.na(pack$downloads)] <- paste0(pack$downloads[!is.na(pack$downloads)], " downloads ")
pack$downloads[is.na(pack$downloads)] <- ""
pack$Downloads <- pack$downloads
pack$Authors <- pack$authors
rownames(pack) <- NULL
if(knitr::is_html_output()){
pack$Title <- paste0('<a href = "', pack$url, '">', pack$title, '</a>')
pack$Outlet <- paste0('<tt>', pack$repo, '</tt>')
pack[,c("Authors", "Title", "Downloads", "Outlet")] %>%
DT::datatable(escape = FALSE, options = list(dom = 't'))
} else {
pack$Title <- pack$title
pack$Outlet <- pack$repo
#pack$Title <- paste0('[', pack$title, '](', pack$url, ")")
#pack$Outlet <- paste0('\texttt{', pack$repo, '}')
pack[,c("Authors", "Title", "Downloads", "Outlet")] %>%
kable("latex", booktabs = TRUE) %>%
column_spec(1, width = "25em") %>%
column_spec(2, width = "10em") %>%
column_spec(4, width = "10em") %>%
kable_styling(latex_options = "striped", position = "left")
}
```
## Managerial activities
```{r results = "asis", echo = FALSE}
manage <- data.frame(read.csv("managerial.csv", stringsAsFactors = FALSE))
manage <- manage[, c("Activity", "Start", "End", "Category")]
if(knitr::is_html_output()){
manage %>% DT::datatable(escape = F, options = list(dom = 't', pageLength = nrow(manage)), rownames = FALSE)
} else {
manage$Activity <- gsub("<.+?>", "", manage$Activity)
manage %>%
kable("latex", booktabs = TRUE) %>%
column_spec(1, width = "25em") %>%
kable_styling(latex_options = "striped", position = "left")
}
```
## International experience
```{r results = "asis", echo = FALSE}
int <- data.frame(read.csv("international.csv", stringsAsFactors = FALSE))
if(knitr::is_html_output()){
int %>%
dt_wrap("Details", options = list(dom = 't', "pageLength" = 40))
} else {
int %>%
kable("latex", booktabs = TRUE) %>%
column_spec(1, width = "15em") %>%
column_spec(4, width = "22em") %>%
kable_styling(latex_options = "striped", position = "left")
}
```
## Invited lectures and workshops
<a name="original"></a>
```{r results = "asis", echo = FALSE}
invited <- data.frame(read.csv("invited.csv", stringsAsFactors = FALSE))
rownames(invited) <- NULL
if(knitr::is_html_output()){
invited %>%
select(Institute, City, Country, Year, Topic) %>%
dt_wrap("Topic", options = list(dom = 't', "pageLength" = 40))
} else {
invited %>%
select(Institute, City, Country, Year) %>%
kable("latex", booktabs = TRUE) %>%
kable_styling(latex_options = "striped", position = "left")
}
```
## Funding
```{r results = "asis", echo = FALSE}
grant <- data.frame(read.csv("funding_acquired.csv", stringsAsFactors = FALSE), check.names = F)
names(grant) <- gsub("\\.", " ", names(grant))
grant$Date <- as.Date(grant$Date, format = "%d-%m-%Y")
grant$Date <- format.Date(grant$Date, "%b %Y")
if(knitr::is_html_output()){
grant %>% DT::datatable(escape = FALSE,options = list(dom = 't'), rownames = FALSE)
} else {
grant %>%
kable("latex", booktabs = TRUE) %>%
kable_styling(latex_options = "striped", position = "left")
}
```
## Collaborations
```{r results = "asis", echo = FALSE}
collab <- data.frame(read.csv("Collaborations.csv", stringsAsFactors = FALSE))
names(collab)[3] <- "Key collaborator"
if(knitr::is_html_output()){
collab %>%
select(Organization, "Key collaborator", Purpose) %>%
dt_wrap("Purpose", options = list(dom = 't', "pageLength" = 40))
} else {
collab %>%
select(Organization, "Key collaborator") %>%
kable("latex", booktabs = TRUE) %>%
kable_styling(latex_options = "striped", position = "left")
}
```
## Reviewer & Editorial experience
```{r}
library(rjson)
publons <- rjson::fromJSON(file = "publons.json")$records
publons <- data.frame(t(sapply(publons$review$per_journal, function(x){ c(x$name, x$count)})))
names(publons) <- c("Name", "N")
publons$Category <- "Journal"
write.csv(publons, "publons.csv", row.names = F)
publons <- read.csv("publons.csv", stringsAsFactors = F)
#publons$mergeid <- trimws(tolower(publons$Name))
rev <- read.csv("review.csv", stringsAsFactors = FALSE, header = FALSE)
names(rev) <- c("N", "Name", "Category")
# rev$mergeid <- trimws(tolower(rev$Name))
# rev[rev$mergeid %in% publons$mergeid, ]$N2 <- publons[match(rev[rev$mergeid %in% publons$mergeid, ]$mergeid, publons$mergeid), ]$N
rev <- rbind(publons, rev)
rev$N <- as.integer(rev$N)
rev_tab <- tapply(rev$N, factor(rev$Category), sum)
```
I am Associate Editor for [Research Synthesis Methods](https://onlinelibrary.wiley.com/journal/17592887), Statistical Consulting Editor for [Child Development](https://srcd.onlinelibrary.wiley.com/journal/14678624), and have reviewed `r rev_tab["Journal"]` journal articles, `r rev_tab["Conference"]` conference abstracts, and `r rev_tab["Funding body"]` grant applications.
```{r, eval = knitr::is_html_output(), results="asis"}
cat("<details>")
cat("<summary>Click here for a detailed overview of reviewing activities</summary>")
```
```{r results = "asis", echo = FALSE, eval = knitr::is_html_output()}
if(knitr::is_html_output()){
rev %>%
kable("html", escape=F) %>%
kable_styling(bootstrap_options = c("striped", position = "left", "hover"))
} else {
rev %>%
kable("latex", booktabs = TRUE) %>%
kable_styling(latex_options = "striped", position = "left")
}
```
```{r, eval = knitr::is_html_output(), results="asis"}
cat("</details><br>")
```
## Teaching
```{r results = "asis", echo = FALSE}
teach <- data.frame(read.csv("teaching.csv", stringsAsFactors = FALSE))
teach$Years <- gsub("^[a-zA-Z]+-", "20", teach$Years)
teach[5:12][teach[5:12] == "X"] <- "Yes"
super <- data.frame(read.csv("supervision.csv", stringsAsFactors = FALSE))
sum_sup <- tapply(as.numeric(super$Students), factor(super$Level), sum)
```
My teaching is well-reviewed and in 2021 I received the Teacher of the Year award from the Usocia student association.
Since my first teaching appointment in 2006, I have taught `r nrow(teach)` courses, to students from diverse backgrounds ranging from high-school to post-graduate (e.g., summer schools, pre-conference workshops). I have lectured in `r sum(teach$Hoorcolleges == "Yes")` courses, taught tutorials in `r sum(teach$Werkgroepen == "Yes")`, coordinated `r sum(teach$Coordinatie == "Yes")`, and developed the material for `r sum(teach$Ontwikkeling.herziening == "Yes")` courses.
```{r, eval = knitr::is_latex_output(), results="asis"}
cat("I have supervised", paste0(paste0(sum_sup[1:(length(sum_sup)-1)], " ", names(sum_sup)[1:(length(sum_sup)-1)], collapse = ", "), ", and ", tail(sum_sup, 1), " ", tail(names(sum_sup), 1), collapse = ""), "students.")
```
```{r, eval = knitr::is_html_output(), results="asis"}
cat("<details>")
cat("<summary>Click here for a detailed overview of teaching activities</summary>")
```
```{r results = "asis", echo = FALSE}
rownames(teach) <- NULL
names(teach) <- c("Course", "Year", "Sessions", "Students", "Lectures", "Tutorials", "Coordination", "Organization", "Syllabus", "Slides", "Digital aids", "Course development", "Details")
teach[sapply(teach, is.logical)] <- lapply(teach[sapply(teach, is.logical)], function(x)ifelse(x, "Yes", ""))
if(knitr::is_html_output()){
teach[[14]] <- NULL
teach %>%
kable("html", escape=F) %>%
add_header_above(c("Course details" = 4, "Responsibilities" = 8, " " =1)) %>%
kable_styling(bootstrap_options = c("striped", position = "left", "hover"))
} else {
teach[c(13:14)] <- NULL
names(teach) <- c("Course", "Year", "Sessions", "Students", "HC", "WC", "Coord", "Org", "Syll", "PPT", "Apps", "Dev")
teach %>%
kable("latex", booktabs = TRUE) %>%
kable_styling(latex_options = c("scale_down", "striped"), position = "left") %>%
add_footnote("HC: Lecture, WC: Tutorial, Coord: Coordination, Org: Organization, Syll: Made syllabus, PPT: Made presentation, Apps: Made digital aids, Dev: Conducted course development", notation="none")# %>%
#landscape()
}
```
```{r, eval = knitr::is_html_output(), results="asis"}
cat("</details><br>")
```
```{r, eval = knitr::is_html_output(), results="asis"}
cat("I have supervised", paste0(paste0(sum_sup[1:(length(sum_sup)-1)], " ", names(sum_sup)[1:(length(sum_sup)-1)], collapse = ", "), ", and ", tail(sum_sup, 1), " ", tail(names(sum_sup), 1), collapse = ""), "students.")
cat("<details>")
cat("<summary>Click here for a detailed overview of supervised students</summary>")
```
```{r results = "asis", echo = FALSE, eval = knitr::is_html_output()}
rownames(super) <- NULL
super$Level <- ordered(super$Level, levels = c("PhD", "Master", "Bachelor"))
super <- super[order(super$Level), ]
if(knitr::is_html_output()){
super[, c("Students", "Description", "Details", "Institute", "Level")] %>%
kable("html", escape=F, row.names = FALSE) %>%
kable_styling(bootstrap_options = c("striped", position = "left", "hover"))
} else {
super[, c("Students", "Description", "Details", "Institute", "Level")] %>%
kable("latex", booktabs = TRUE) %>%
kable_styling(latex_options = "striped", position = "left")
}
```
```{r, eval = knitr::is_html_output(), results="asis"}
cat("</details><br>")
```
## Conference attendance
```{r results = "asis", echo = FALSE}
conf <- data.frame(read.csv("conferences.csv", stringsAsFactors = FALSE))
```
I am very active at international conferences, and have contributed to `r nrow(conf)` conferences since my first attendance in 2012.
```{r, eval = knitr::is_html_output(), results="asis"}
cat("<details>")
cat("<summary>Click here for a detailed overview of conferences</summary>")
```
```{r results = "asis", echo = FALSE, eval = knitr::is_html_output()}
conf <- conf[order(conf$Date, decreasing = TRUE), c("Organization", "City", "Country", "Date")]
rownames(conf) <- NULL
if(knitr::is_html_output()){
conf %>%
kable("html", escape=F) %>%
kable_styling(bootstrap_options = c("striped", position = "left", "hover"))
} else {
conf %>%
kable("latex", booktabs = TRUE) %>%
kable_styling(latex_options = "striped", position = "left")
}
```
```{r, eval = knitr::is_html_output(), results="asis"}
cat("</details><br>")
```
## Media appearances
I have discussed my work in the following media outlets:
```{r results = "asis", echo = FALSE}
media <- data.frame(read.csv("media.csv", stringsAsFactors = FALSE))
media$Date <- as.Date(media$Date, format = "%d-%m-%Y")
media <- media[order(media$Date, decreasing = TRUE), ]
row.names(media) <- NULL
if(knitr::is_html_output()){
media %>%
select(Outlet, Type, Date, Country, Topic) %>%
dt_wrap("Topic", options = list(dom = 't', "pageLength" = 40))
} else {
media %>%
select(Outlet, Type, Date, Country) %>%
kable("latex", booktabs = TRUE) %>%
kable_styling(latex_options = "striped", position = "left")
}
```