-
Notifications
You must be signed in to change notification settings - Fork 1
/
publications.Rmd
117 lines (93 loc) · 3.26 KB
/
publications.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
---
title: "Publications"
output:
html_document
---
```{r echo= FALSE, message=FALSE, warning=FALSE}
rm(list = ls())
if (!require("pacman")) install.packages("pacman",repos = "http://cran.us.r-project.org")
pacman::p_load(ggplot2, tidyverse, dplyr, scholar, knitr, kableExtra,readxl)
process_paper_df = function(pub_df){
# reorder the pubs dataframe
reordered_pub = pub_df[which(startsWith(pub_df$author, "R Pei")),] %>%
rbind(pub_df[which(!startsWith(pub_df$author, "R Pei")),])
reordered_pub$pubstring = NA
for (i in c(1:nrow(reordered_pub))){
pubstring = paste0(reordered_pub$author[i], " (",
reordered_pub$year[i],
"). ", reordered_pub$title[i], ". *",
reordered_pub$journal[i], "* ")
reordered_pub$pubstring[i] = pubstring
}
reordered_pub = reordered_pub %>%
mutate(id = c(1:nrow(reordered_pub))) # add links to publications
return(reordered_pub)
}
```
<br>
<br>
<br>
<center> <h3>Papers</h3> </center>
```{r echo = FALSE,message=FALSE}
pubs = get_publications("asa20tUAAAAJ") %>%
mutate_all(as.character) # get pubs from google scholar
pubs_16 = pubs %>% filter(year == "2016")
pubs_17 = pubs %>% filter(year == "2017")
pubs_18 = pubs %>% filter(year == "2018")
pubs_19 = pubs %>% filter(year == "2019")
pubs_20 = pubs %>% filter(year == "2020")
reordered_16 = process_paper_df(pubs_16)
reordered_17 = process_paper_df(pubs_17)
reordered_18 = process_paper_df(pubs_18)
reordered_19 = process_paper_df(pubs_19)
reordered_20 = process_paper_df(pubs_20)
kable(reordered_20 %>%
select(id, pubstring), row.names = FALSE, col.names = NULL,
table.attr = "style='width:80%;'",
caption = "2020") %>%
kable_styling()
kable(reordered_19 %>%
select(id, pubstring), row.names = FALSE, col.names = NULL,
table.attr = "style='width:80%;'",
caption = "2019") %>%
kable_styling()
kable(reordered_18 %>%
select(id, pubstring), row.names = FALSE, col.names = NULL,
table.attr = "style='width:80%;'",
caption = "2018") %>%
kable_styling()
kable(reordered_17 %>%
select(id, pubstring), row.names = FALSE, col.names = NULL,
table.attr = "style='width:80%;'",
caption = "2017") %>%
kable_styling()
kable(reordered_16 %>%
select(id, pubstring), row.names = FALSE, col.names = NULL,
table.attr = "style='width:80%;'",
caption = "2016") %>%
kable_styling()
```
<center> <h3>Conferences and Talks</h3> </center>
```{r include = TRUE,echo = FALSE, message=FALSE, warning = FALSE}
talks <- read_excel("files/conferences.xlsx")
talks$id = c(1:nrow(talks))
talks$pubstring = NA
for (i in c(1:nrow(talks))){
pubstring = paste0(talks$talk[i], " ",
talks$presenters[i],
" (", talks$month[i], ", ",
talks$year[i], ") *",
talks$conference[i], "* ",
talks$location[i])
if (!is.na(talks$video_link[i])){
pubstring = paste0(pubstring, " [link to video](",
talks$video_link[i],
")")
}
talks$pubstring[i] = pubstring
}
kable(talks %>%
select(id, pubstring), row.names = FALSE, col.names = NULL,
table.attr = "style='width:80%;'") %>%
kable_styling()
```