From c3da2e298a8de1e7ba1ad8af5b0cf794bc5df910 Mon Sep 17 00:00:00 2001 From: najahn Date: Wed, 11 Oct 2023 13:54:33 +0200 Subject: [PATCH 1/4] Add two new DE views (Thieme and Elsevier) --- _quarto.yml | 8 ++++- config.csv | 2 ++ create_qmd.R | 2 +- renv.lock | 81 ++++++++++++++++++++++++------------------------- renv/activate.R | 27 +++++++++++++++-- 5 files changed, 73 insertions(+), 47 deletions(-) diff --git a/_quarto.yml b/_quarto.yml index e612c3df..b975b7d8 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -89,6 +89,8 @@ website: contents: - section: "DEAL" contents: + - text: "Elsevier" + href: "oam/elsevierdeal/index.qmd" - text: "Springer" href: oam/springerhybriddeal/index.qmd - text: "Wiley" @@ -123,10 +125,14 @@ website: href: oam/portlandpresstib/index.qmd - text: "RSC" href: oam/rsctib/index.qmd + - section: "ZBMED" + contents: + - text: "Thieme" + href: oam/thiemezbmed/index.qmd - section: "ZBW" contents: - text: "Taylor and Francis" - href: oam/taylorfranciszbw + href: oam/taylorfranciszbw/index.qmd - text: "About" href: "about.qmd" footer: funding_note.md diff --git a/config.csv b/config.csv index aa6026c2..0d5d2911 100644 --- a/config.csv +++ b/config.csv @@ -18,6 +18,7 @@ publisher,collection "BMJ Publishing","jct" "EDP Sciences","jct" "The Royal Society","jct" +"Elsevier (DEAL)","oam" "Springer Hybrid (DEAL)","oam" "Wiley Hybrid (DEAL)","oam" "Sage (BSB)","oam" @@ -34,3 +35,4 @@ publisher,collection "Karger (BSB)","oam" "Hogrefe (SUB Göttingen)","oam" "TaylorFrancis (ZBW)","oam" +"Thieme (ZB MED)","oam" diff --git a/create_qmd.R b/create_qmd.R index b74adac6..09973f3f 100644 --- a/create_qmd.R +++ b/create_qmd.R @@ -7,7 +7,7 @@ library(readr) library(fs) # Load agreements -my_ta <- readr::read_csv("config.csv") +my_ta <- readr::read_csv("config.csv") # Get ISSNs get_ta_jns <- function(publisher = NULL, collection = c("jct", "oam")) { match.arg(collection) diff --git a/renv.lock b/renv.lock index 11027997..32705f09 100644 --- a/renv.lock +++ b/renv.lock @@ -26,7 +26,7 @@ }, "Matrix": { "Package": "Matrix", - "Version": "1.6-1.1", + "Version": "1.6-1", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -39,7 +39,7 @@ "stats", "utils" ], - "Hash": "1a00d4828f33a9d690806e98bd17150c" + "Hash": "cb6855ac711958ca734b75e631b2035d" }, "R6": { "Package": "R6", @@ -253,7 +253,7 @@ }, "credentials": { "Package": "credentials", - "Version": "2.0.1", + "Version": "1.3.2", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -263,7 +263,7 @@ "openssl", "sys" ], - "Hash": "c7844b32098dcbd1c59cbd8dddb4ecc6" + "Hash": "93762d0a34d78e6a025efdbfb5c6bb41" }, "crosstalk": { "Package": "crosstalk", @@ -285,13 +285,13 @@ }, "curl": { "Package": "curl", - "Version": "5.1.0", + "Version": "5.0.2", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R" ], - "Hash": "9123f3ef96a2c1a93927d828b2fe7d4c" + "Hash": "511bacbfa153a15251166b463b4da4f9" }, "data.table": { "Package": "data.table", @@ -365,18 +365,18 @@ }, "evaluate": { "Package": "evaluate", - "Version": "0.22", + "Version": "0.21", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "methods" ], - "Hash": "66f39c7a21e03c4dcb2c2d21d738d603" + "Hash": "d59f3b464e8da1aef82dc04b588b8dfb" }, "fansi": { "Package": "fansi", - "Version": "1.0.4", + "Version": "1.0.5", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -384,7 +384,7 @@ "grDevices", "utils" ], - "Hash": "1d9e7ad3c8312a192dea7d3db0274fde" + "Hash": "3e8583a60163b4bc1a80016e63b9959e" }, "farver": { "Package": "farver", @@ -452,7 +452,7 @@ }, "gert": { "Package": "gert", - "Version": "2.0.0", + "Version": "1.9.3", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -463,7 +463,7 @@ "sys", "zip" ], - "Hash": "bbbd21a253d473f4671d7dcbd6d8971f" + "Hash": "b544c397820e05a97d391b2d614a921a" }, "ggiraph": { "Package": "ggiraph", @@ -624,19 +624,19 @@ }, "hoaddata": { "Package": "hoaddata", - "Version": "0.2.71", + "Version": "0.2.8", "Source": "GitHub", "RemoteType": "github", "RemoteHost": "api.github.com", "RemoteRepo": "hoaddata", "RemoteUsername": "subugoe", "RemoteRef": "HEAD", - "RemoteSha": "a9fc13b8c5880e2ffa19d8d3b3981114660dabd9", + "RemoteSha": "16333bdf5a6f0fc2dfe4242adc6818e7de17656d", "Requirements": [ "R", "tibble" ], - "Hash": "dc8a64b637a632817a82b1a6781919cc" + "Hash": "3c73ee53da67011ebd3a869bf1b43864" }, "htmltools": { "Package": "htmltools", @@ -782,7 +782,7 @@ }, "knitr": { "Package": "knitr", - "Version": "1.44", + "Version": "1.43", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -794,18 +794,18 @@ "xfun", "yaml" ], - "Hash": "60885b9f746c9dfaef110d070b5f7dc0" + "Hash": "9775eb076713f627c07ce41d8199d8f6" }, "labeling": { "Package": "labeling", - "Version": "0.4.3", + "Version": "0.4.2", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "graphics", "stats" ], - "Hash": "b64ec208ac5bc1852b285f665d6368b3" + "Hash": "3d5108641f47470611a32d0bdf357a72" }, "later": { "Package": "later", @@ -820,7 +820,7 @@ }, "lattice": { "Package": "lattice", - "Version": "0.21-9", + "Version": "0.21-8", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -831,7 +831,7 @@ "stats", "utils" ], - "Hash": "5558c61e0136e247252f5f952cdaad6a" + "Hash": "0b8a6d63c8770f02a8b5635f3c431e6b" }, "lazyeval": { "Package": "lazyeval", @@ -858,7 +858,7 @@ }, "lubridate": { "Package": "lubridate", - "Version": "1.9.3", + "Version": "1.9.2", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -867,7 +867,7 @@ "methods", "timechange" ], - "Hash": "680ad542fbcf801442c83a6ac5a2126c" + "Hash": "e25f18436e3efd42c7c590a1c4c15390" }, "magrittr": { "Package": "magrittr", @@ -881,7 +881,7 @@ }, "markdown": { "Package": "markdown", - "Version": "1.9", + "Version": "1.8", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -890,7 +890,7 @@ "utils", "xfun" ], - "Hash": "4dea09e610da59f847c041d887b4dcfc" + "Hash": "93cecf1e5f828d0fc1605a00ad48e3a2" }, "memoise": { "Package": "memoise", @@ -957,13 +957,13 @@ }, "openssl": { "Package": "openssl", - "Version": "2.1.1", + "Version": "2.1.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "askpass" ], - "Hash": "2a0dc8c6adfb6f032e4d4af82d258ab5" + "Hash": "273a6bb4a9844c296a459d2176673270" }, "patchwork": { "Package": "patchwork", @@ -1054,13 +1054,10 @@ }, "prettyunits": { "Package": "prettyunits", - "Version": "1.2.0", + "Version": "1.1.1", "Source": "Repository", "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "6b01fc98b1e86c4f705ce9dcfd2f57c7" + "Hash": "95ef9167b75dde9d2ccc3c7528393e7e" }, "processx": { "Package": "processx", @@ -1190,13 +1187,13 @@ }, "renv": { "Package": "renv", - "Version": "1.0.3", + "Version": "1.0.2", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "utils" ], - "Hash": "41b847654f567341725473431dd0d5ab" + "Hash": "4b22ac016fe54028b88d0c68badbd061" }, "rlang": { "Package": "rlang", @@ -1211,7 +1208,7 @@ }, "rmarkdown": { "Package": "rmarkdown", - "Version": "2.25", + "Version": "2.24", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -1231,7 +1228,7 @@ "xfun", "yaml" ], - "Hash": "d65e35823c817f09f4de424fcdfa812a" + "Hash": "3854c37590717c08c32ec8542a2e0a35" }, "rprojroot": { "Package": "rprojroot", @@ -1457,13 +1454,13 @@ }, "tinytex": { "Package": "tinytex", - "Version": "0.47", + "Version": "0.46", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "xfun" ], - "Hash": "8d4ccb733843e513c1c1cdd66a759f0d" + "Hash": "0c41a73214d982f539c56a7773c7afa5" }, "tzdb": { "Package": "tzdb", @@ -1553,7 +1550,7 @@ }, "vroom": { "Package": "vroom", - "Version": "1.6.4", + "Version": "1.6.3", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -1575,7 +1572,7 @@ "vctrs", "withr" ], - "Hash": "9db52c1656cf19c124f93124ea57f0fd" + "Hash": "8318e64ffb3a70e652494017ec455561" }, "webshot": { "Package": "webshot", @@ -1611,7 +1608,7 @@ }, "withr": { "Package": "withr", - "Version": "2.5.1", + "Version": "2.5.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -1620,7 +1617,7 @@ "graphics", "stats" ], - "Hash": "d77c6f74be05c33164e33fbc85540cae" + "Hash": "c0e49a9760983e81e55cdd9be92e7182" }, "xfun": { "Package": "xfun", diff --git a/renv/activate.R b/renv/activate.R index cb5401f9..2969c732 100644 --- a/renv/activate.R +++ b/renv/activate.R @@ -2,7 +2,7 @@ local({ # the requested version of renv - version <- "1.0.3" + version <- "1.0.2" attr(version, "sha") <- NULL # the project directory @@ -1034,6 +1034,19 @@ local({ } + + renv_bootstrap_in_rstudio <- function() { + commandArgs()[[1]] == "RStudio" + } + + # Used to work around buglet in RStudio if hook uses readline + renv_bootstrap_flush_console <- function() { + tryCatch({ + tools <- as.environment("tools:rstudio") + tools$.rs.api.sendToConsole("", echo = FALSE, focus = FALSE) + }, error = function(cnd) {}) + } + renv_json_read <- function(file = NULL, text = NULL) { jlerr <- NULL @@ -1172,8 +1185,16 @@ local({ # construct full libpath libpath <- file.path(root, prefix) - # run bootstrap code - renv_bootstrap_exec(project, libpath, version) + if (renv_bootstrap_in_rstudio()) { + # RStudio only updates console once .Rprofile is finished, so + # instead run code on sessionInit + setHook("rstudio.sessionInit", function(...) { + renv_bootstrap_exec(project, libpath, version) + renv_bootstrap_flush_console() + }) + } else { + renv_bootstrap_exec(project, libpath, version) + } invisible() From c7b84a85a4df89ad1ad68e23572ec630ef32cd28 Mon Sep 17 00:00:00 2001 From: najahn Date: Wed, 11 Oct 2023 15:10:15 +0200 Subject: [PATCH 2/4] Try ubuntu --- .github/workflows/build.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e50e8054..bc1fa8db 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -10,7 +10,7 @@ name: build jobs: CICD: - runs-on: macos-latest + runs-on: ubuntu-latest env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -24,14 +24,18 @@ jobs: run: | wget -O Atkinson_Hyperlegible.zip https://fonts.google.com/download?family=Atkinson%20Hyperlegible unzip -d Atkinson_Hyperlegible/ Atkinson_Hyperlegible.zip - mv Atkinson_Hyperlegible ~/Library/Fonts/ + mv Atkinson_Hyperlegible /usr/share/fonts/ fc-cache -fv - uses: quarto-dev/quarto-actions/setup@v2 + - run: | + quarto --version - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true - - uses: r-lib/actions/setup-renv@v2 + - uses: r-lib/actions/setup-r-dependencies@v2 - name: Create dashboard documents run: | From c9eb02363e172b9ea6571117c8ee63f6b6869ad5 Mon Sep 17 00:00:00 2001 From: najahn Date: Wed, 11 Oct 2023 16:09:51 +0200 Subject: [PATCH 3/4] Fix oam overview --- R/oam_publisher_market_share.R | 10 ++++++---- _quarto.yml | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/R/oam_publisher_market_share.R b/R/oam_publisher_market_share.R index ec98f011..274009d9 100644 --- a/R/oam_publisher_market_share.R +++ b/R/oam_publisher_market_share.R @@ -3,17 +3,17 @@ pub_shares <- my_df |> mutate( type = case_when( + esac_publisher == "Elsevier (DEAL)" ~ "Elsevier (DEAL)", esac_publisher == "Springer Hybrid (DEAL)" ~ "Springer Hybrid (DEAL)", esac_publisher == "Wiley Hybrid (DEAL)" ~ "Wiley Hybrid (DEAL)", - esac_publisher == "Wiley" ~ "Wiley", - esac_publisher %in% top_13[3:13] ~ "Top 3-13", + esac_publisher %in% top_13[3:13] ~ "Top 4-13", is.character(esac_publisher) ~ "Other" ) ) |> mutate(type = forcats::fct_relevel( type, - c("Springer Hybrid (DEAL)", "Wiley Hybrid (DEAL)", "Top 3-13", "Other") + c("Elsevier (DEAL)", "Springer Hybrid (DEAL)", "Wiley Hybrid (DEAL)", "Top 4-13", "Other") )) |> mutate(cat = forcats::fct_rev(as.factor(collection))) |> group_by(cat, type, esac_publisher) |> @@ -75,9 +75,10 @@ plot_pub_shares <- scale_fill_manual( "", values = c( + "Elsevier (DEAL)" = "#e9711c", "Springer Hybrid (DEAL)" = "#486a7e", "Wiley Hybrid (DEAL)" = "#068853", - "Top 3-13" = "grey60", + "Top 4-13" = "grey60", "Other" = "grey90" ), guide = guide_legend(reverse = FALSE, nrow = 1) @@ -86,6 +87,7 @@ plot_pub_shares <- scale_y_continuous(breaks = seq(0, 1, by = 0.1), labels = scales::percent_format(accuracy = 5L)) + labs(x = NULL, y = NULL) + + guides(fill = guide_legend(nrow = 2)) + theme_minimal(base_family = "Atkinson Hyperlegible", base_size = 14) + theme(panel.grid.minor = element_blank()) + theme(axis.ticks = element_blank()) + diff --git a/_quarto.yml b/_quarto.yml index b975b7d8..fd7d9b5a 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -125,7 +125,7 @@ website: href: oam/portlandpresstib/index.qmd - text: "RSC" href: oam/rsctib/index.qmd - - section: "ZBMED" + - section: "ZB MED" contents: - text: "Thieme" href: oam/thiemezbmed/index.qmd From 220d21cbdef4759c3ab6d807efbabcfc5e38eca9 Mon Sep 17 00:00:00 2001 From: najahn Date: Wed, 11 Oct 2023 19:45:19 +0200 Subject: [PATCH 4/4] Add Lancet and Cell hybrid --- renv.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/renv.lock b/renv.lock index 32705f09..68e8c81f 100644 --- a/renv.lock +++ b/renv.lock @@ -624,19 +624,19 @@ }, "hoaddata": { "Package": "hoaddata", - "Version": "0.2.8", + "Version": "0.2.81", "Source": "GitHub", "RemoteType": "github", "RemoteHost": "api.github.com", - "RemoteRepo": "hoaddata", "RemoteUsername": "subugoe", + "RemoteRepo": "hoaddata", "RemoteRef": "HEAD", - "RemoteSha": "16333bdf5a6f0fc2dfe4242adc6818e7de17656d", + "RemoteSha": "bf42b04456ce3fb7337489de930cd24a71c86ae9", "Requirements": [ "R", "tibble" ], - "Hash": "3c73ee53da67011ebd3a869bf1b43864" + "Hash": "24e1f9b2ed08e1c5ef080f0f700ac4db" }, "htmltools": { "Package": "htmltools",