Skip to content

Instantly share code, notes, and snippets.

@tklebel
Last active October 14, 2019 06:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tklebel/8689932505ffcc57e938b4a70bf092f8 to your computer and use it in GitHub Desktop.
Save tklebel/8689932505ffcc57e938b4a70bf092f8 to your computer and use it in GitHub Desktop.
Query Crossref for journals from SpringerNature
library(tidyverse)
library(rcrossref)
# determine the maximum number of records that will be retrieved
initial_res <- cr_members(member_ids = 297, works = T,
filter = list(type = "journal"), limit = 1)
# query all of them
res <- cr_members(member_ids = 297, works = T,
filter = list(type = "journal"), cursor = "*",
cursor_max = initial_res$meta$total_results, limit = 10)
journal_data <- res$data %>%
as_tibble()
out <- journal_data %>%
select(-link, -license, -type, -reference.count, -score, -source)
# there is an issue here with duplicated cases
out %>%
arrange(title) %>%
count(title, sort = T) %>%
left_join(out) %>%
filter(n > 1) %>%
select(-n) %>%
write_csv("duplicates.csv")
out_file <- paste0("springer_nature_journals", "-", lubridate::today(), ".csv")
out %>%
write_csv(out_file)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment