Skip to content

Instantly share code, notes, and snippets.

@peterdalle
Created January 12, 2022 14:27
Show Gist options
  • Save peterdalle/d0483a23ae14d63c421b2f8f5b692991 to your computer and use it in GitHub Desktop.
Save peterdalle/d0483a23ae14d63c421b2f8f5b692991 to your computer and use it in GitHub Desktop.
Article processing charges (APC's) for top 50 most expensive Nature journals
library(tidyverse)
library(rio)
xlsx_file <- "https://resource-cms.springernature.com/springer-cms/rest/v1/content/19770948/data/v8"
df <- import(xlsx_file, skip=3)
journal_apc <- df %>%
mutate(cost = as.integer(str_extract(`APC EUR '22`, "\\d+"))) %>%
select(journal = `Journal title`, cost)
journal_apc %>%
arrange(desc(cost)) %>%
head(50) %>%
ggplot(aes(cost, reorder(journal, cost))) +
geom_bar(stat="identity") +
scale_x_continuous(expand = c(0, 0, .1, 0)) +
labs(title = "Article processing charges (APC's) for top 50 most expensive Nature journals",
subtitle = "Note: some journals only have their list prices on the website",
x = "APC Cost (EUR)",
y = NULL)
journal_apc %>%
pull(cost) %>%
hist(main = "Histogram of cost")
@peterdalle
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment