Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 2024 #15

Merged
merged 6 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ jobs:
with:
fetch-depth: 0

- name: Install Google Fonts
- name: Provide Fonts
run: |
wget -O Atkinson_Hyperlegible.zip https://fonts.google.com/download?family=Atkinson%20Hyperlegible
unzip -d Atkinson_Hyperlegible/ Atkinson_Hyperlegible.zip
mv Atkinson_Hyperlegible /usr/share/fonts/
mkdir /usr/share/fonts/Atkinson_Hyperlegible
cp -r fonts/ /usr/share/fonts/Atkinson_Hyperlegible/
fc-cache -fv

- uses: quarto-dev/quarto-actions/setup@v2
Expand Down
2 changes: 1 addition & 1 deletion R/country_top_20.R
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ country_multiple_plot <- ggplot(country_multiple_df_plot, aes(cr_year, prop, fil
scale_fill_identity() +
theme_minimal(base_family = "Atkinson Hyperlegible") +
labs(
y = "OA Share", x = "2017 - 2023",
y = "OA Share", x = "2017 - 2024",
subtitle = "**Country**<br><br>Total Lead Author Articles | Country Share"
) +
theme(
Expand Down
2 changes: 1 addition & 1 deletion R/cr_upw.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cr_upw_data <- function(cr_upw = hoaddata::cr_upw, my_cat = "Global", ...) {

cr_upw_plot <- function(cr_upw_data = hoaddata::cr_upw, ...) {
plot_df <- cr_upw_data(cr_upw_data, ...)
my_plot <- ggplot(plot_df, aes(cr_year, value / article_total,
my_plot <- ggplot(plot_df, aes(as.character(cr_year), value / article_total,
fill = name,
tooltip = glue::glue('<small>{name}</small><br><b>{format(value, big.mark = ",")} / {round((value / article_total) * 100, 1)}%</b><br><small>articles with CC license in {cr_year}</small>')
)) +
Expand Down
2 changes: 1 addition & 1 deletion R/oam_publisher_cc.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ top_13_plot <- function(.collection = NULL, ...) {
`CC BY-NC-ND` = "#C82E6B"
)) +
theme_minimal(base_family = "Atkinson Hyperlegible", base_size = 13) +
labs(y = NULL, x = "2017-2023") +
labs(y = NULL, x = "2017-2024") +
theme(panel.grid.major.x = element_blank(),
panel.grid.minor.x = element_blank(),
axis.text.x=element_blank(),
Expand Down
1 change: 1 addition & 0 deletions R/open_md.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ open_md_react <- function(...) {
`2021` = indicator_column(name = "2021"),
`2022` = indicator_column(name = "2022"),
`2023` = indicator_column(name = "2023"),
`2024` = indicator_column(name = "2024"),
cat = colDef(show = FALSE)
))

Expand Down
2 changes: 1 addition & 1 deletion R/publisher_cc.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ top_13_plot <- function(.collection = NULL, ...) {
`CC BY-NC-ND` = "#C82E6B"
)) +
theme_minimal(base_family = "Atkinson Hyperlegible", base_size = 13) +
labs(y = NULL, x = "2017-2023") +
labs(y = NULL, x = "2017-2024") +
theme(panel.grid.major.x = element_blank(),
panel.grid.minor.x = element_blank(),
axis.text.x=element_blank(),
Expand Down
50 changes: 25 additions & 25 deletions R/teaser.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,25 @@ cc_ind_global <- function(jn_ind_df = jn_ind_df) {
distinct() %>%
ungroup()
}
#' Publications 2017 - 2022
#' Publications 2017 - 2024
all_publications <- cc_ind_global(jn_ind_df = jn_ind_df) |>
distinct(cr_year, jn_all) |>
pull(jn_all) |>
sum(na.rm = TRUE)
#' Publications 2022
all_publications_2022 <-
#' Publications 2023
all_publications_2023 <-
cc_ind_global(jn_ind_df = jn_ind_df) |>
distinct(cr_year, jn_all) |>
filter(cr_year == "2022") |>
filter(cr_year == "2023") |>
pull(jn_all) |>
sum(na.rm = TRUE)
#' CC publications 2017 - 2022
cc_publications <- cc_ind_global(jn_ind_df = jn_ind_df) |>
pull(cc_total) |>
sum(na.rm = TRUE)
#' CC publications 2022
cc_publications_22 <- cc_ind_global(jn_ind_df = jn_ind_df) |>
filter(cr_year == "2022") |>
#' CC publications 2023
cc_publications_23 <- cc_ind_global(jn_ind_df = jn_ind_df) |>
filter(cr_year == "2023") |>
pull(cc_total) |>
sum(na.rm = TRUE)

Expand Down Expand Up @@ -66,25 +66,25 @@ cc_ind_de <- function(jn_aff_df = jn_aff_df) {
mutate_if(is.numeric, ~replace(., is.na(.), 0))
}

#' Publications 2017 - 2022
#' Publications 2017 - 2024
all_publications_de <- cc_ind_de(jn_aff_df = jn_aff_df) |>
distinct(cr_year, jn_all) |>
pull(jn_all) |>
sum(na.rm = TRUE)
#' Publications 2022
all_publications_2022_de <-
#' Publications 2023
all_publications_2023_de <-
cc_ind_de(jn_aff_df = jn_aff_df) |>
distinct(cr_year, jn_all) |>
filter(cr_year == "2022") |>
filter(cr_year == "2023") |>
pull(jn_all) |>
sum(na.rm = TRUE)
#' CC publications 2017 - 2022
#' CC publications 2017 - 2023
cc_publications_de <- cc_ind_de(jn_aff_df = jn_aff_df) |>
pull(cc_total) |>
sum(na.rm = TRUE)
#' CC publications 2022
cc_publications_22_de <- cc_ind_de(jn_aff_df = jn_aff_df) |>
filter(cr_year == "2022") |>
#' CC publications 2023
cc_publications_23_de <- cc_ind_de(jn_aff_df = jn_aff_df) |>
filter(cr_year == "2023") |>
pull(cc_total) |>
sum(na.rm = TRUE)

Expand All @@ -97,10 +97,10 @@ basic_stat <- function(...) {
cc_publications_de = cc_publications_de,
all_publications_de = all_publications_de,
all_publications = all_publications,
cc_publications_22 = cc_publications_22,
all_publications_2022 = all_publications_2022,
cc_publications_22_de = cc_publications_22_de,
all_publications_2022_de = all_publications_2022_de
cc_publications_23 = cc_publications_23,
all_publications_2023 = all_publications_2023,
cc_publications_23_de = cc_publications_23_de,
all_publications_2023_de = all_publications_2023_de
) |>
mutate(across(everything(), ~ case_when(
. < 1000 ~ as.character(.),
Expand All @@ -110,7 +110,7 @@ basic_stat <- function(...) {

glue::glue('<div class="grid">
<div class="g-col-lg-6 g-col-12">
<p style="text-align: center;" class="text-muted">2017-2023</p>
<p style="text-align: center;" class="text-muted">2017-2024</p>
<table style="margin:auto;padding:0;width:80%;text-align: center;">
<colgroup>
<col span="1" style="width: 50%;">
Expand All @@ -134,7 +134,7 @@ basic_stat <- function(...) {
</table>
</div>
<div class="g-col-lg-6 g-col-12">
<p style="text-align: center;" class="text-muted">2022</p>
<p style="text-align: center;" class="text-muted">2023</p>
<table style="margin:auto;padding:0;width:80%;text-align: center;">
<colgroup>
<col span="1" style="width: 50%;">
Expand All @@ -147,12 +147,12 @@ basic_stat <- function(...) {
<td colspan="1" style="border-top: 1px solid rgb(255, 255, 255); font-size: 100%; border-left: 1px solid rgb(26, 55, 113);">Germany*</td>
</tr>
<tr >
<td colspan="1" scope="row" style="font-size: 157%;">{round(cc_publications_22 / all_publications_2022 * 100, 1)}%</td>
<td colspan="1" style="font-size: 157%; border-left: 1px solid rgb(26, 55, 113);">{round(cc_publications_22_de / all_publications_2022_de * 100, 1)}%</td>
<td colspan="1" scope="row" style="font-size: 157%;">{round(cc_publications_23 / all_publications_2023 * 100, 1)}%</td>
<td colspan="1" style="font-size: 157%; border-left: 1px solid rgb(26, 55, 113);">{round(cc_publications_23_de / all_publications_2023_de * 100, 1)}%</td>
</tr>
<tr >
<td colspan="1" scope="row" style="border-top: 1px solid rgb(255, 255, 255); color: rgb(102, 102, 102); font-size: 91%;">{number_format$cc_publications_22} out of {number_format$all_publications_2022}</td>
<td colspan="1" style="border-top: 1px solid rgb(255, 255, 255); color: rgb(102, 102, 102); font-size: 91%; border-left: 1px solid rgb(26, 55, 113);">{number_format$cc_publications_22_de} out of {number_format$all_publications_2022_de}</td>
<td colspan="1" scope="row" style="border-top: 1px solid rgb(255, 255, 255); color: rgb(102, 102, 102); font-size: 91%;">{number_format$cc_publications_23} out of {number_format$all_publications_2023}</td>
<td colspan="1" style="border-top: 1px solid rgb(255, 255, 255); color: rgb(102, 102, 102); font-size: 91%; border-left: 1px solid rgb(26, 55, 113);">{number_format$cc_publications_23_de} out of {number_format$all_publications_2023_de}</td>
</tr>
</tbody>
</table>
Expand Down
19 changes: 7 additions & 12 deletions _jct_overview.qmd
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
---
title: "Hybrid Open Access Dashboard"
subtitle: "How open are hybrid journals in transformative agreements? You can analyse progress made over time by open license, publisher and country. You can also monitor the availability of publisher-provided metadata in Crossref."
format:
html:
theme: default
toc: true
toc-location: right
execute:
echo: false
warnings: false
Expand Down Expand Up @@ -142,7 +137,7 @@ export_files(.data = cc_df, .plot = cc_de_plot, width = 9, height = 6 * 0.618)

### Creative Commons licenses over time by publisher

Percentage of Open Access in hybrid journals included in transformative agreements by Creative Commons license types and Top 13 publishers in terms of total Open Access articles published in these journals between 2017 and 2023.
Percentage of Open Access in hybrid journals included in transformative agreements by Creative Commons license types and Top 13 publishers in terms of total Open Access articles published in these journals between 2017 and 2024.

```{r}
#| echo: false
Expand Down Expand Up @@ -277,7 +272,7 @@ my_df |>

### Market shares

Publisher market shares as measured by articles published between 2017 and 2023 in hybrid journals included in transformative agreements.
Publisher market shares as measured by articles published between 2017 and 2024 in hybrid journals included in transformative agreements.

```{r}
#| echo: FALSE
Expand Down Expand Up @@ -409,7 +404,7 @@ export_files(
```{js, echo = FALSE}
/* https://stackoverflow.com/a/66216595 */
$(document).ready(function() {
document.getElementById("filter_year").getElementsByClassName("selectized")[0].selectize.setValue("2022", false);
document.getElementById("filter_year").getElementsByClassName("selectized")[0].selectize.setValue("2023", false);
document.getElementById("filter_input").getElementsByClassName("selectized")[0].selectize.setValue("Global", false);
});
```
Expand All @@ -421,7 +416,7 @@ This section shows how hybrid open access has been adopted in different parts of

### Open Access in hybrid journals by country

Open Access uptake in hybrid journals with a Creative Commons license per country. Shown are the Top 20 most productive countries in terms of articles published in hybrid journals included in transformative agreements between 2017 and 2023. The analysis is based on lead author country affiliations.
Open Access uptake in hybrid journals with a Creative Commons license per country. Shown are the Top 20 most productive countries in terms of articles published in hybrid journals included in transformative agreements between 2017 and 2024. The analysis is based on lead author country affiliations.

::: column-body-outset
```{r country_top_20}
Expand Down Expand Up @@ -511,7 +506,7 @@ export_files(
```{js,echo = FALSE}
/* https://stackoverflow.com/a/66216595 */
$(document).ready(function() {
document.getElementById("filter_country_year").getElementsByClassName("selectized")[0].selectize.setValue("2022", false);
document.getElementById("filter_country_year").getElementsByClassName("selectized")[0].selectize.setValue("2023", false);
document.getElementById("filter_country_deal").getElementsByClassName("selectized")[0].selectize.setValue("All", false);
});
```
Expand Down Expand Up @@ -597,7 +592,7 @@ export_files(.data = shared_upw_cr_diff_year$data())
```{js, echo = FALSE}
/* https://stackoverflow.com/a/66216595 */
$(document).ready(function() {
document.getElementById("filter_cr_year").getElementsByClassName("selectized")[0].selectize.setValue("2022", false);
document.getElementById("filter_cr_year").getElementsByClassName("selectized")[0].selectize.setValue("2023", false);
document.getElementById("filter_cr_input").getElementsByClassName("selectized")[0].selectize.setValue("Global", false);
});
```
Expand Down Expand Up @@ -677,7 +672,7 @@ $(document).ready(function() {

## Journal table

This table presents the publication volume and Open Access share by journal between 2017 and 2023, 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.
This table presents the publication volume and Open Access share by 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

Expand Down
19 changes: 7 additions & 12 deletions _oam_overview.qmd
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
---
title: "Hybrid Open Access Dashboard: Consortial Transformative Agreements in Germany"
subtitle: "How open are hybrid journals in transformative agreements with library consortia based in Germany? You can analyse progress made over time by open license, publisher and country. You can also monitor the availability of publisher-provided metadata in Crossref."
format:
html:
theme: default
toc: true
toc-location: right
execute:
echo: false
warnings: false
Expand Down Expand Up @@ -143,7 +138,7 @@ export_files(.data = cc_ind_de(jn_aff_df = jn_aff_df), .plot = cc_de_plot, wid

### Creative Commons licenses over time by publisher

Percentage of Open Access in hybrid journals included in consortial transformative agreements in Germany by Creative Commons license types and Top 13 publishers in terms of total Open Access articles published in these journals between 2017 and 2023.
Percentage of Open Access in hybrid journals included in consortial transformative agreements in Germany by Creative Commons license types and Top 13 publishers in terms of total Open Access articles published in these journals between 2017 and 2024.

```{r}
#| echo: false
Expand Down Expand Up @@ -278,7 +273,7 @@ my_df |>

### Market shares

Publisher market shares as measured by articles published between 2017 and 2023 in hybrid journals included in consortial transformative agreements in Germany.
Publisher market shares as measured by articles published between 2017 and 2024 in hybrid journals included in consortial transformative agreements in Germany.

```{r}
#| echo: FALSE
Expand Down Expand Up @@ -426,7 +421,7 @@ export_files(
```{js, echo = FALSE}
/* https://stackoverflow.com/a/66216595 */
$(document).ready(function() {
document.getElementById("filter_year").getElementsByClassName("selectized")[0].selectize.setValue("2022", false);
document.getElementById("filter_year").getElementsByClassName("selectized")[0].selectize.setValue("2023", false);
document.getElementById("filter_input").getElementsByClassName("selectized")[0].selectize.setValue("Global", false);
});
```
Expand All @@ -438,7 +433,7 @@ This section shows how hybrid open access has been adopted in different parts of

### Open Access in hybrid journals by country

Open Access uptake in hybrid journals with a Creative Commons license per country. Shown are the Top 20 most productive countries in terms of articles published in hybrid journals included in consortial transformative agreements in Germany between 2017 and 2023. The analysis is based on lead author country affiliations.
Open Access uptake in hybrid journals with a Creative Commons license per country. Shown are the Top 20 most productive countries in terms of articles published in hybrid journals included in consortial transformative agreements in Germany between 2017 and 2024. The analysis is based on lead author country affiliations.

::: column-body-outset
```{r country_top_20}
Expand Down Expand Up @@ -528,7 +523,7 @@ export_files(
```{js,echo = FALSE}
/* https://stackoverflow.com/a/66216595 */
$(document).ready(function() {
document.getElementById("filter_country_year").getElementsByClassName("selectized")[0].selectize.setValue("2022", false);
document.getElementById("filter_country_year").getElementsByClassName("selectized")[0].selectize.setValue("2023", false);
document.getElementById("filter_country_deal").getElementsByClassName("selectized")[0].selectize.setValue("All", false);
});
```
Expand Down Expand Up @@ -620,7 +615,7 @@ export_files(.data = shared_upw_cr_diff_year$data())
```{js, echo = FALSE}
/* https://stackoverflow.com/a/66216595 */
$(document).ready(function() {
document.getElementById("filter_cr_year").getElementsByClassName("selectized")[0].selectize.setValue("2022", false);
document.getElementById("filter_cr_year").getElementsByClassName("selectized")[0].selectize.setValue("2023", false);
document.getElementById("filter_cr_input").getElementsByClassName("selectized")[0].selectize.setValue("Global", false);
});
```
Expand Down Expand Up @@ -699,7 +694,7 @@ $(document).ready(function() {

## Journal table

This table presents the publication volume and Open Access share by hybrid journal included in consortial transformative agreements in Germany between 2017 and 2023, 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.
This table presents the publication volume and Open Access share by hybrid journal included in consortial transformative agreements in Germany 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

Expand Down
11 changes: 3 additions & 8 deletions _portfolio_template.qmd
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
---
format:
html:
theme: default
toc: true
toc-location: right
execute:
echo: false
warnings: false
Expand Down Expand Up @@ -216,7 +211,7 @@ This section shows how hybrid open access has been adopted in different parts of

### 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 2023. The analysis is based on lead author country affiliations.
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}
Expand Down Expand Up @@ -299,7 +294,7 @@ export_files(
```{js,echo = FALSE}
/* https://stackoverflow.com/a/66216595 */
$(document).ready(function() {
document.getElementById("filter_country_year").getElementsByClassName("selectized")[0].selectize.setValue("2022", false);
document.getElementById("filter_country_year").getElementsByClassName("selectized")[0].selectize.setValue("2023", false);
});
```

Expand Down Expand Up @@ -436,7 +431,7 @@ $(document).ready(function() {

## Journal table

**`r params$publisher`**: This table presents the publication volume and Open Access share by hybrid journal between 2017 and 2023, 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.
**`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

Expand Down
2 changes: 2 additions & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ website:
format:
html:
theme: [cosmo, styles.scss]
toc: true
toc-location: right
grid:
sidebar-width: 300px

Expand Down
Loading