Last active
October 14, 2019 06:57
-
-
Save tklebel/8689932505ffcc57e938b4a70bf092f8 to your computer and use it in GitHub Desktop.
Query Crossref for journals from SpringerNature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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