-
Notifications
You must be signed in to change notification settings - Fork 0
/
report.Rmd
183 lines (143 loc) · 5.54 KB
/
report.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
---
title: "Exploration: Funding Acknowledgements from OpenAIRE in WOS-KB"
author: "Najko Jahn"
date: "10/7/2019"
output: github_document
---
## Summary
![Flow Chart](flow.png)
```{r, echo = FALSE, message = FALSE, warning = FALSE}
knitr::opts_chunk$set(
comment = "#>",
collapse = TRUE,
warning = FALSE,
message = FALSE,
echo = TRUE
)
```
## OpenAIRE Publications
To start with, a sample of grant-supported publications indexed in OpenAIRE with EC-funding acknwoledgement was used. Only H2020 EC-projects with participation from the University of Göttingen were investigated. These data were already obtained for the OpenAIRE Institutional Dashboard Pilot:
<https://subugoe.shinyapps.io/openaire_ugoe/>
Load publications:
```{r}
library(tidyverse)
library(jsonlite)
ugoe_pubs <- jsonlite::stream_in(file("data/pubs_ugoe.json"), verbose = FALSE) %>%
as_tibble()
```
In total, the sample consists of `r length(unique(ugoe_pubs$openaire_id))` distinct records.
For matching, the DOI article identifier is used:
```{r}
ugoe_dois_df <- ugoe_pubs %>%
select(pid, access, openaire_project_id, openaire_id) %>%
unnest(cols = c(pid)) %>%
mutate(pid_type = ifelse(grepl("^10.", pid), "doi", NA)) %>%
mutate(pid = tolower(pid)) %>%
mutate(openaire_project_id = as.character(openaire_project_id))
```
In total, `r ugoe_dois_df %>% filter(pid_type == "doi") %>% distinct(openaire_id) %>% nrow()` records have a DOI, representing a share of `r round(ugoe_dois_df %>% filter(pid_type == "doi") %>% distinct(openaire_id) %>% nrow() / length(unique(ugoe_pubs$openaire_id)) * 100, 2)` %.
Store records with DOIs in separate data.frame
```{r}
ugoe_dois <- ugoe_dois_df %>%
filter(pid_type == "doi") %>%
distinct(pid) %>%
mutate(pid = trimws(pid))
```
Connect to WOS-KB and store data.frame in KB Table Space
```{r}
require(RJDBC)
require(rJava)
.jinit()
jdbcDriver <-
JDBC(driverClass = "oracle.jdbc.OracleDriver", classPath = "inst/jdbc_driver/ojdbc8.jar")
jdbcConnection <-
dbConnect(
jdbcDriver,
"jdbc:oracle:thin:@//biblio-p-db01:1521/bibliodb01.fiz.karlsruhe",
Sys.getenv("kb_user"),
Sys.getenv("kb_pwd")
)
```
```{r}
dbWriteTable(conn = jdbcConnection,
name = "openaire_ugoe_dois",
value = ugoe_dois,
overwrite = TRUE)
```
## DOI coverage in WoS-KB
Matching using Oracle SQL statement:
```{sql, connection=jdbcConnection, output.var="openaire_wos_doi"}
select
wos_b_2019.items.doi,
wos_b_2019.items.doctype
from
wos_b_2019.items
inner join
openaire_ugoe_dois
on lower(wos_b_2019.items.doi) = openaire_ugoe_dois.pid
```
Summary stats
```{r}
openaire_wos_doi %>%
group_by(DOCTYPE) %>%
summarise(n= n_distinct(DOI)) %>%
arrange(desc(n))
```
In total `r length(unique(openaire_wos_doi$DOI))` DOIs were both indexed in OpenAIRE and Wos-KB.
## Merge with WOS-KB funding info
Oracle SQL statement to obtain funding information from WoS-KB for the OpenAIRE-DOI-sample
```{sql, connection=jdbcConnection, output.var="openaire_wos"}
select
wos_b_2019.fundingorganizations.fundingorganization,
wos_b_2019.grantnumbers.grantnumber,
wos_b_2019.items.doi
from
wos_b_2019.items
inner join
wos_b_2019.grantnumbers
on wos_b_2019.grantnumbers.fk_items = wos_b_2019.items.pk_items
inner join
wos_b_2019.fundingorganizations
on wos_b_2019.fundingorganizations.pk_fundingorganizations = wos_b_2019.grantnumbers.fk_fundingorganizations
inner join
openaire_ugoe_dois
on lower(wos_b_2019.items.doi) = openaire_ugoe_dois.pid
```
### Funding Organization
Identify the European Commission as funding organization using pattern matching.
```{r}
openaire_wos %>%
as_tibble() %>%
mutate(eu_funding = ifelse(grepl("^EU|^Eur|^ERC", FUNDINGORGANIZATION), "EU", NA)) %>%
filter(eu_funding == "EU")
```
In total, `r openaire_wos %>% mutate(eu_funding = ifelse(grepl("^EU|^Eur|^ERC", FUNDINGORGANIZATION), "EU", NA)) %>% filter(eu_funding == "EU") %>% distinct(DOI) %>% nrow()` Web of Science records acknowledge the European Commission as funder (`wos_b_2019.fundingorganizations.fundingorganization`).
There is a certain variation how EU support is acknowledged in `wos_b_2019.fundingorganizations.fundingorganization`: `r openaire_wos %>% mutate(eu_funding = ifelse(grepl("^EU|^Eur|^ERC", FUNDINGORGANIZATION), "EU", NA)) %>% filter(eu_funding == "EU") %>% distinct(FUNDINGORGANIZATION) %>% nrow()` variants were found based on our sample.
Example
```{r}
openaire_wos %>%
as_tibble() %>%
mutate(eu_funding = ifelse(grepl("^EU|^Eur|^ERC", FUNDINGORGANIZATION), "EU", NA)) %>%
filter(eu_funding == "EU") %>%
distinct(FUNDINGORGANIZATION, GRANTNUMBER) %>%
head()
```
### Grant Agreements
Extract EU Grant IDs, which end with a six-digit number
```{r}
openaire_wos_grant <- openaire_wos %>%
mutate(eu_funding = ifelse(grepl("^EU|^Eur|^ERC", FUNDINGORGANIZATION), "EU", NA)) %>%
filter(eu_funding == "EU") %>%
mutate(eu_grant_id = str_extract(GRANTNUMBER, "[0-9]{6,6}")) %>%
mutate(doi = tolower(DOI)) %>%
inner_join(ugoe_dois_df, by = c("doi" = "pid", "eu_grant_id" = "openaire_project_id"))
```
In total, `r length(unique(openaire_wos_grant$doi))` WoS-KB records have identical Grant IDs.
How many `GRANTNUMBER` values consists of a six-digit number:
```{r}
openaire_wos %>%
mutate(eu_funding = ifelse(grepl("^EU|^Eur|^ERC", FUNDINGORGANIZATION), "EU", NA)) %>%
filter(eu_funding == "EU") %>%
filter(grepl("^[0-9]{6,6}", GRANTNUMBER)) %>%
as_tibble()
```