-
Notifications
You must be signed in to change notification settings - Fork 2
/
_portfolio_template.qmd
569 lines (483 loc) · 15 KB
/
_portfolio_template.qmd
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
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
---
execute:
echo: false
warnings: false
message: false
freeze: false
sidebar: true
---
<!-- Required R packages -->
```{r setup}
#| echo: false
#| message: false
source("R/setup.R")
if (params$collection == "oam") {
oam <- hoaddata::oam_hybrid_jns |>
dplyr::distinct(issn_l, esac_publisher = vertrag)
}
```
<!-- data preparation -->
```{r data prep}
#| echo: false
#| message: false
jn_ind_df <- hoaddata::jn_ind |>
dplyr::mutate(cr_year = as.character(cr_year)) |>
dplyr::mutate(cc = factor(
cc,
# Order by permissiveness
levels = c(
"CC BY",
"CC BY-SA",
"CC BY-NC",
"CC BY-NC-SA",
"CC BY-ND",
"CC BY-NC-ND"
)
)) |>
# Journal selection
filter(issn_l %in% params$issn_l)
jn_aff_df <- hoaddata::jn_aff |>
dplyr::mutate(cr_year = as.character(cr_year)) |>
dplyr::mutate(cc = factor(
cc,
# Order by permissiveness
levels = c(
"CC BY",
"CC BY-SA",
"CC BY-NC",
"CC BY-NC-SA",
"CC BY-ND",
"CC BY-NC-ND"
)
)) |>
# Journal selection
filter(issn_l %in% params$issn_l)
```
```{r ta_text}
#| echo: false
#| message: false
if (params$collection == "oam") {
ta_text <- paste0("hybrid journals included in the German consortial transformative agreement **", params$publisher, "**")
} else {
ta_text <- paste0("**", params$publisher, "**", " hybrid journals included in transformative agreements")
}
```
<!-- Teaser -->
The share of Open Access articles with a Creative Commons license in `r format(length(unique(jn_ind_df$issn_l)), big.mark = ",")` hybrid journals is as follows:
```{r}
#| echo: false
#| message: false
#| warning: false
#| results: asis
source("R/teaser.R")
basic_stat(jn_ind_df = jn_ind_df, jn_aff_df = jn_aff_df)
```
<small><sup>*</sup>Journal articles from lead authors based in Germany. Country affiliation data derived from OpenAlex.</small>
<!-- Creative Commons license prevalence-->
## Creative Commons licenses over time
Percentage of Open Access in `r ta_text` by Creative Commons license types as provided by Crossref.
```{r}
#| echo: false
#| message: false
#| warning: false
source("R/cc_over_year.R")
```
::: {.panel-tabset}
## Global
```{r cc_global_plot, message=FALSE}
cc_global_plot <- plot_cc_variants_by_year(cc_ind_global(jn_ind_df = jn_ind_df))
# Return SVG
girafe(
ggobj = cc_global_plot,
width_svg = 9,
height_svg = 6 * 0.618,
options = list(opts_tooltip(
css = "background-color:white;
;font-size:1.15em;padding:10px;border-radius:5px;box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.5)",
opacity = .95
),
opts_toolbar(saveaspng = FALSE))
)
export_files(.data = cc_ind_global(jn_ind_df = jn_ind_df), .plot = cc_global_plot, width = 9, height = 6 * 0.618)
```
## Germany<sup>*</sup>
```{r cc_de_plot, message=FALSE}
cc_de_plot <- plot_cc_variants_by_year(cc_ind_de(jn_aff_df = jn_aff_df))
# Return SVG
girafe(
ggobj = cc_de_plot,
width_svg = 9,
height_svg = 6 * 0.618,
options = list(opts_tooltip(
css = "background-color:white;
;font-size:1.15em;padding:10px;border-radius:5px;box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.5)",
opacity = .95
),
opts_toolbar(saveaspng = FALSE))
)
export_files(.data = cc_ind_de(jn_aff_df = jn_aff_df), .plot = cc_de_plot, width = 9, height = 6 * 0.618)
```
<small><sup>*</sup>Journal articles from lead authors based in Germany. Country affiliation data derived from OpenAlex.</small>
:::
## Publishing market
Hybrid journal portfolio analysis, showing publishing market shares in terms of total and Open Access article volume. Dashed lines represent median OA percentage (red) and median publication output (orange). Note that only hybrid journals included in transformative agreements are shown.
```{r}
#| echo: false
#| message: false
#| warning: false
# Data prep
if (params$collection == "oam") {
oam <- hoaddata::oam_hybrid_jns |>
dplyr::distinct(issn_l, esac_publisher = vertrag)
source("R/oam_data_prep.R")
} else {
source("R/data_prep.R")
}
my_df <- summarize_pubs(var_summary = c(cr_year, esac_publisher)) |>
tidyr::complete(cr_year, esac_publisher, collection) |>
mutate_if(is.numeric, ~ replace(., is.na(.), 0)) |>
mutate(pub_col = ifelse(esac_publisher %in% params$publisher, "#0093C7", "#999999"))
```
::: {.panel-tabset}
```{r publishing_market}
#| echo: false
#| message: false
#| warning: false
source("R/pub_scatter.R")
```
## Global
```{r publishing_market_global}
#| echo: false
#| message: false
#| warning: false
plot_scatterplot(my_df, collection = "global")
my_df |>
dplyr::filter(collection == "global") |>
mutate(oa_prop = oa_articles / articles) |>
export_files(.drop = c("pub_col"))
```
## Germany<sup>*</sup>
```{r publishing_market_de}
#| echo: false
#| message: false
#| warning: false
plot_scatterplot(my_df, collection = "de")
my_df |>
dplyr::filter(collection == "de") |>
mutate(oa_prop = oa_articles / articles) |>
export_files(.drop = c("pub_col"))
```
<small><sup>*</sup>Journal articles from lead authors based in Germany. Country affiliation data derived from OpenAlex.</small>
:::
## Country view
This section shows how hybrid open access has been adopted in different parts of the world. The analysis is based on the country affiliation of lead authors. Lead authors are the first named authors of scholarly articles, who have typically conducted most of the research presented in the article, although the role of lead authors can vary across disciplines. We used OpenAlex as a data source to determine the affiliation of lead authors.
### Open Access in hybrid journals by country
Open Access uptake in hybrid journals with a Creative Commons license per country. Showing the Top 20 most productive countries in terms of articles published in `r ta_text` between 2017 and 2024. The analysis is based on lead author country affiliations.
::: column-body-outset
```{r country_top_20}
#| echo: false
#| message: false
#| warning: false
source("R/country_top_20.R")
ggiraph::girafe(
ggobj = country_multiple_plot,
width_svg = 9,
height_svg = 7 * 0.618,
options = list(opts_tooltip(
css = "background-color:white;
;font-size:1.15em;padding:10px;border-radius:5px;box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.5)",
opacity = .95
),
opts_toolbar(saveaspng = FALSE))
)
export_files(
.data = country_multiple_plot$data,
.plot = country_multiple_plot,
width = 9,
height = 7 * 0.618,
.drops = c("my_cols", "tooltip_text", ".group", "max_")
)
```
:::
### Country league
Publication volume and Open Access share per country in `r ta_text`. You can search for specific countries, and filter by publisher and publication year. The analysis is based on country-affiliations of lead authors.
```{r}
#| echo: false
#| message: false
#| warning: false
source("R/country_league.R")
```
```{r country_league}
htmltools::div(
class = "agreement-tbl",
htmltools::div(
class = "filters",
htmltools::div(
class = "filter-input",
filter_select(
"filter_country",
"Countries",
shared_oa_country_df,
~country_name,
multiple = TRUE
)
),
htmltools::div(
class = "filter-input",
filter_select(
"filter_country_year",
"Publication Year",
shared_oa_country_df,
~cr_year,
multiple = FALSE
)
)
),
react_table_oa_country
)
export_files(
.data = shared_oa_country_df$data(),
.drops = c("max_group", "max_all_group")
)
```
```{js,echo = FALSE}
/* https://stackoverflow.com/a/66216595 */
$(document).ready(function() {
document.getElementById("filter_country_year").getElementsByClassName("selectized")[0].selectize.setValue("2023", false);
});
```
## Open metadata
Open and comprehensive metadata is a key requirement of many transformative agreements. The following tables illustrate potential gaps in Crossref metadata for Open Access articles in hybrid journals included in transformative agreements.
### License metadata gaps
**`r params$publisher`**: Comparison of open licence metadata in Crossref with Unpaywall via OpenAlex per year. You can compare global metrics with metrics only for articles by lead authors based in Germany. In addition to Crossref licence information, Unpaywall also analyses publisher websites to determine whether an article has been published under an open content licence. More Open Access articles derived from Crossref may indicate a delay between metadata changes and Unpaywall-indexing, while more Open Access articles identified by Unpaywall suggest that publishers have not deposited licensing metadata in Crossref for all articles.
::: {.panel-tabset}
## Global
```{r cr_upw_global}
#| echo: false
#| message: false
#| warning: false
source("R/cr_upw.R")
cr_upw_global_plot <- cr_upw_plot(cr_upw_data = hoaddata::cr_upw, params$issn_l, my_cat = "Global")
ggiraph::girafe(
ggobj = cr_upw_global_plot,
width_svg = 9,
height_svg = 6 * 0.618,
options = list(
opts_tooltip(
css = "background-color:white;
;font-size:1.15em;padding:10px;border-radius:5px;box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.5)",
opacity = .95
),
opts_toolbar(saveaspng = FALSE)
)
)
export_files(
.data = cr_upw_data(hoaddata::cr_upw, params$issn_l, my_cat = "Global") |>
dplyr::mutate(oa_share = value / article_total) |>
dplyr::rename(oa_articles = value),
.plot = cr_upw_global_plot,
width = 9,
height = 6 * 0.618,
.drops = c("my_cols", "tooltip_text", ".group", "max_")
)
```
## Germany<sup>*</sup>
```{r cr_upw_de}
#| echo: false
#| message: false
#| warning: false
cr_upw_de_plot <- cr_upw_plot(cr_upw_data = hoaddata::cr_upw, params$issn_l, my_cat = "Germany")
ggiraph::girafe(
ggobj = cr_upw_de_plot,
width_svg = 9,
height_svg = 6 * 0.618,
options = list(
opts_tooltip(
css = "background-color:white;
;font-size:1.15em;padding:10px;border-radius:5px;box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.5)",
opacity = .95
),
opts_toolbar(saveaspng = FALSE)
)
)
export_files(
.data = cr_upw_data(hoaddata::cr_upw, params$issn_l, my_cat = "Germany") |>
dplyr::mutate(oa_share = value / article_total) |>
dplyr::rename(oa_articles = value),
.plot = cr_upw_de_plot,
width = 9,
height = 6 * 0.618,
.drops = c("my_cols", "tooltip_text", ".group", "max_")
)
```
<small><sup>*</sup>Journal articles from lead authors based in Germany. Country affiliation data derived from OpenAlex.</small>
:::
### Crossref metadata coverage
This table shows the proportion of Crossref metadata that is publicly available for Open Access articles in hybrid journals included in transformative agreements. Publishers can use Crossref to share information about [Text and Data Mining (TDM)](https://www.crossref.org/blog/evolving-our-support-for-text-and-data-mining/ ), authors [(ORCID)](https://orcid.org/) and [funding](https://www.crossref.org/community/funders/). They can also open up [abstracts](https://i4oa.org/) and [reference lists](https://i4oc.org/) through Crossref.
```{r crossref_md_coverage}
#| echo: false
#| message: false
#| warning: false
source("R/open_md.R")
# Should be done in hoaddata
md_tmp <- hoaddata::cr_md |>
tidyr::complete(cr_year, issn_l, cat) |>
mutate_all(~ ifelse(is.na(.), 0, .))
my_df <- shared_open_md_df(.data = md_tmp, issn_l = params$issn_l, publisher = params$publisher)
htmltools::div(
class = "agreement-tbl",
# filters,
htmltools::div(
class = "filters",
htmltools::div(
class = "filter-input",
filter_select(
"filter_open_md_cat_input",
"Global / Germany",
my_df,
~cat,
multiple = FALSE
)
),
),
# table
open_md_react(
my_df
)
)
export_files(.data = my_df$data())
```
```{js,echo = FALSE}
/* https://stackoverflow.com/a/66216595 */
$(document).ready(function() {
document.getElementById("filter_open_md_cat_input").getElementsByClassName("selectized")[0].selectize.setValue("Global", false);
});
```
## Journal table
**`r params$publisher`**: This table presents the publication volume and Open Access share by hybrid journal between 2017 and 2024, comparing global metrics with metrics only for articles by lead authors based in Germany. Charts show the yearly Open Access share. You can search for journals or select a table header to sort by journal name or a metric.
::: column-body-outset
```{r}
#| echo: false
#| message: false
#| warning: false
my_df <- summarize_pubs(var_summary = c(cr_year, issn_l)) |>
filter(issn_l %in% params$issn_l) |>
tidyr::complete(cr_year, issn_l, collection) |>
mutate_if(is.numeric, ~ replace(., is.na(.), 0))
```
```{r journal_indicators}
#| echo: false
#| message: false
#| warning: false
source("R/journal_tbl.R")
htmltools::div(
class = "agreement-tbl",
journal_listing
)
export_files(.data = my_df)
```
:::
<small>Dashboard last compiled on `r format(Sys.time(), '%d %B, %Y')`.</small>
```{css}
.my-tbl {
margin: 0 auto;
width: 575px;
}
.tbl-header {
margin: 18px 0;
font-size: 1.25em;
}
.filters {
display: flex;
flex-wrap: wrap;
margin-top: 4px;
margin-bottom: 24px;
margin-left: auto;
margin-right: auto;
}
.filter-input {
margin-top: 4px;
margin-left: 32px;
flex: 1;
max-width: 250px;
}
.filter-input label {
color: hsl(0, 0%, 45%);
font-weight: 700;
font-size: 13px;
letter-spacing: 0.4px;
text-transform: uppercase;
}
.group-header {
font-weight: 700;
font-size: 14px;
letter-spacing: 0.4px;
text-transform: uppercase;
}
.filter-input select,
.filter-input input[type="search"] {
padding: 0 6px;
height: 32px;
}
.filter-input input[type="search"] {
/* Reset Bootstrap 3 styles */
-webkit-appearance: searchfield;
}
.filter-input input[type="search"]::-webkit-search-cancel-button {
/* Reset Bootstrap 3 styles */
-webkit-appearance: searchfield-cancel-button;
}
.followers-tbl a {
color: inherit;
}
.header {
border-bottom: 2px solid #555;
font-size: 14px;
font-weight: bold;
text-transform: uppercase;
}
.header:hover {
background-color: #eee;
}
/* Highlight headers when sorting */
.header:hover,
.header[aria-sort="ascending"],
.header[aria-sort="descending"] {
background-color: rgba(236, 236, 237, 1);
}
.agreement-footer {
margin: 18px 0;
font-size: 10px;
}
.agreement-tbl {
margin: 18px 0;
font-size: 14px;
}
.bar-cell {
display: flex;
align-items: center;
}
.number {
font-family: monospace;
font-size: 14px;
white-space: pre;
}
.label {
font-size: 14px;
white-space: pre;
}
.bar-chart {
flex-grow: 1;
margin-left: 6px;
height: 14px;
}
.bar {
height: 100%;
}
.border-left {
border-left: 1px solid #b5b5b5;
}
.name {
font-weight: 900;
}
```