-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLandscape Phase 1 Screening Results.Rmd
164 lines (123 loc) · 4.04 KB
/
Landscape Phase 1 Screening Results.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
---
title: "Landscape Phase 1 Screening Results"
author: "Alexander Hart, Meng Liu"
date: "`r Sys.Date()`"
output: html_document
editor_options:
chunk_output_type: console
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
if (!require(bibliometrix)) install.packages("bibliometrix"); library(bibliometrix)
if (!require(dplyr)) install.packages("dplyr"); library(dplyr)
if (!require(ggplot2)) install.packages("ggplot2"); library(ggplot2)
if (!require(stringr)) install.packages("stringr"); library(stringr)
```
```{r data}
# Fetch data
googlesheet_id <- "<<SHEET ID HERE>>"
url_metasheet <- paste0("https://docs.google.com/spreadsheets/d/", googlesheet_id, "/export?format=csv")
df.screening <- read.csv(url_metasheet, stringsAsFactors = F, encoding = 'UTF-8') %>%
# Exclude example row
filter(doi != "Example")
# Rename columns
colnames(df.screening) <- c("unique_id", "title", "author_keywords",
"abstract", "keywords_plus", "doi",
"sc_fulltxt_required", "sc_conclusion",
"sc_screener")
# Transform columns
df.screening.t <- df.screening %>%
mutate(sc_fulltxt_required = sc_fulltxt_required == 1,
sc_conclusion = factor(sc_conclusion,
levels = c("include", "exclude", "uncertain")),
unique_id = as.numeric(unique_id))
```
# Conclusion
```{r plot conclusion}
ggplot(df.screening.t) +
geom_bar(aes(x = sc_conclusion)) +
labs(x = "conclusion") +
theme_classic()
```
## Top author keywords included
```{r print top keywords included}
df.screening.t %>%
filter(sc_conclusion == "include") %>%
pull(author_keywords) %>%
# Isolate keywords
str_split(pattern = ";;") %>%
sapply(., str_split, pattern = ";") %>%
unlist() %>%
# Remove excess white space
str_trim() %>%
# Remove empty strings
.[. != ""] -> top_keywords_included
table(top_keywords_included) %>%
as.data.frame() %>%
arrange(-Freq) %>%
head(10) %>%
knitr::kable(col.names = c("Keyword", "Frequency"))
```
## Top keywords excluded
```{r print top keywords excluded}
df.screening.t %>%
filter(sc_conclusion == "exclude") %>%
pull(author_keywords) %>%
# Isolate keywords
str_split(pattern = ";;") %>%
sapply(., str_split, pattern = ";") %>%
unlist() %>%
# Remove excess white space
str_trim() %>%
# Remove empty strings
.[. != ""] -> top_keywords_excluded
table(top_keywords_excluded) %>%
as.data.frame() %>%
arrange(-Freq) %>%
head(10) %>%
knitr::kable(col.names = c("Keyword", "Frequency"))
```
# Full text required
```{r plot ftr}
ggplot(df.screening.t) +
geom_bar(aes(x = sc_fulltxt_required)) +
labs(x = "full text required") +
theme_classic()
```
# Uncertain Studies
```{r print classified uncertain}
df.screening.t %>%
filter(sc_conclusion == "uncertain") %>%
select(title, doi) %>%
knitr::kable(col.names = c("Title", "DOI"))
```
# Excluded Studies
```{r print classified exclude}
df.screening.t %>%
filter(sc_conclusion == "exclude") %>%
select(title, doi) %>%
knitr::kable(col.names = c("Title", "DOI"))
```
```{r merge screening results}
# Check if results were already merged (delete file to remerge)
if (!file.exists("data/processed/post_screening.csv")) {
# Load raw data
files <- c("raw data/savedrecs(1).bib",
"raw data/savedrecs(2).bib",
"raw data/savedrecs(3).bib",
"raw data/savedrecs(4).bib",
"raw data/savedrecs(5).bib")
raw_data <- convert2df(files, dbsource = "wos", format = "bibtex") %>%
as_tibble() %>%
# assign unique ID
mutate(unique_id = row_number())
# Join raw data and screening results by row number
raw_data %>%
full_join(
df.screening.t %>%
select(unique_id, starts_with("sc")),
by = "unique_id",
) -> merged
write.csv(merged, "data/processed/post_screening.csv")
}
```