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

Add two new DE views (Thieme and Elsevier) #11

Merged
merged 4 commits into from
Oct 12, 2023
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
10 changes: 7 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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: |
Expand Down
10 changes: 6 additions & 4 deletions R/oam_publisher_market_share.R
Original file line number Diff line number Diff line change
Expand Up @@ -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) |>
Expand Down Expand Up @@ -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)
Expand All @@ -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()) +
Expand Down
8 changes: 7 additions & 1 deletion _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -123,10 +125,14 @@ website:
href: oam/portlandpresstib/index.qmd
- text: "RSC"
href: oam/rsctib/index.qmd
- section: "ZB MED"
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
Expand Down
2 changes: 2 additions & 0 deletions config.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -34,3 +35,4 @@ publisher,collection
"Karger (BSB)","oam"
"Hogrefe (SUB Göttingen)","oam"
"TaylorFrancis (ZBW)","oam"
"Thieme (ZB MED)","oam"
2 changes: 1 addition & 1 deletion create_qmd.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading