r - 使用 R 检索期刊论文的引用
问题描述
使用 R,我想获取引用科学期刊论文的文章列表。
我拥有的唯一信息是文章的标题,例如“使用叶绿素苯酚试剂进行蛋白质测量”。
有没有人可以通过制作一个我可以使用的可复制示例来帮助我?
这是我到目前为止所尝试的。
R 包fulltext
似乎很有用,因为它允许检索链接到文章的 ID 列表。例如,我可以获得文章的 DOI:
library(fulltext)
res1 <- ft_search(query = "Protein measurement with the folin phenol reagent", from = "crossref")
res1 <- ft_links(res1)
res1$crossref$ids
同样,我可以通过from = "scopus"
在函数中设置fulltext::ft_search
(并包含 scopus API 密钥)来获取 scopus id。
如果使用 DOI,我可以使用 R 库获得文章的引用次数rcrossref
:
rcrossref::cr_citation_count(res1$crossref$ids[1])
rscopus
同样,如果我想使用 scopus id 而不是 DOI ,我可以使用 R 包。
不幸的是,这些信息对我来说还不够,因为我需要的是引用该论文的文章列表,而不是数量。
我在网上看到很多人在使用这个包scholar
。但是,如果我理解正确的话,我需要文章的作者拥有一个谷歌学者 ID,并且我必须找到一种方法来检索这个 ID。所以它看起来不是一个可行的解决方案。
有谁知道如何解决这个问题?
解决方案
获得 DOI 后,您可以使用OpenCitations API获取有关引用该文章的出版物的数据。rjson
通过 -package访问 API https://opencitations.net/index/coci/api/v1/citations/{DOI}
。字段名称citing
包含引用该出版物的所有出版物的 DOI 作为值。然后,您可以使用CrossRef 的 API获取有关施引论文的更多元数据,例如标题、期刊、出版日期和作者(通过https://api.crossref.org/works/{DOI}
)。
以下是OpenCitations的 API示例,其中包含三个引用(截至 2021 年 1 月)。
这是一个可能的代码(与上面的示例相同):
opcit <- "https://opencitations.net/index/coci/api/v1/citations/10.1177/1369148118786043"
result <- rjson::fromJSON(file = opcit)
citing <- lapply(result, function(x){
x[['citing']]
})
# a vector with three DOIs, each of which cite the paper
citing <- unlist(citing)
现在我们有了citing
具有三个 DOI 的向量。然后,您可以使用rcrossref
来查找有关施引论文的基本信息,例如:
paper <- rcrossref::cr_works(citing[1])
# find out the title of that paper
paper[["data"]][["title"]]
# output: "Exchange diplomacy: theory, policy and practice in the Fulbright program"
由于你有一个 DOI 向量citing
,你也可以使用这种方法:
citingdata <- rcrossref::cr_cn(citing)
的输出citingdata
应该指向三篇施引论文的元数据,其结构类似于以下两个示例:
[[1]]
[1] "@article{Wong_2020,\n\tdoi = {10.1017/s1752971920000196},\n\turl = {https://doi.org/10.1017%2Fs1752971920000196},\n\tyear = 2020,\n\tmonth = {jun},\n\tpublisher = {Cambridge University Press ({CUP})},\n\tpages = {1--31},\n\tauthor = {Seanon S. Wong},\n\ttitle = {One-upmanship and putdowns: the aggressive use of interaction rituals in face-to-face diplomacy},\n\tjournal = {International Theory}\n}"
[[2]]
[1] "@article{Aalberts_2020,\n\tdoi = {10.1080/21624887.2020.1792734},\n\turl = {https://doi.org/10.1080%2F21624887.2020.1792734},\n\tyear = 2020,\n\tmonth = {aug},\n\tpublisher = {Informa {UK} Limited},\n\tvolume = {8},\n\tnumber = {3},\n\tpages = {240--264},\n\tauthor = {Tanja Aalberts and Xymena Kurowska and Anna Leander and Maria Mälksoo and Charlotte Heath-Kelly and Luisa Lobato and Ted Svensson},\n\ttitle = {Rituals of world politics: on (visual) practices disordering things},\n\tjournal = {Critical Studies on Security}\n}"
推荐阅读
- php - 通过composer仅更新单个包的命令
- go - 通道如何使用通道查找素数问题?
- python - pytorch MNIST 神经网络产生几个非零输出
- visual-studio - 如何从 GitHub 操作中升级 Visual Studio 项目?
- python - 将带引号的字符串拆分为数组
- spartacus-storefront - 如果初始语言不在新列表中,则强制语言在登录后刷新并重置活动语言
- python - 从 conda env 内部与 conda envs 外部启动 jupyter
- amazon-web-services - Spot 创建失败(将 ASG 与实例启动模板一起使用)
- python - Selenium Python Bot在抓取时没有保存完整的数组
- ef-core-5.0 - EFCore 5.0 拦截器语句类型