使用 R 检索期刊论文的引用

标签 r web-scraping citations google-scholar scopus

使用 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" 来获得 scopus id。在函数中 fulltext::ft_search (并包含一个 scopus API key )。

如果使用DOI,我可以使用R库rcrossref获得文章的引用次数:
rcrossref::cr_citation_count(res1$crossref$ids[1])

同样,我可以使用 R 包 rscopus如果我想使用 scopus id,而不是 DOI。

不幸的是,这些信息对我来说还不够,因为我需要引用该论文的文章列表,而不是数量。

我在网上看到很多人在用这个包scholar .但是,如果我理解正确的话,为了使这个工作正常,我需要文章的作者有一个谷歌学者 ID,我必须找到一种方法来检索这个 ID。所以它看起来不像一个可行的解决方案。

有没有人知道如何解决这个问题?

最佳答案

获得 DOI 后,您可以使用 OpenCitations API获取有关引用该文章的出版物的数据。使用 rjson 访问 API -包装通过https://opencitations.net/index/coci/api/v1/citations/{DOI} .字段名称 citing包含引用该出版物的所有出版物的 DOI 作为值。然后您可以使用 CrossRef's API获取关于施引论文的更多元数据,例如标题、期刊、出版日期和作者(通过 https://api.crossref.org/works/{DOI})。
Here is an example 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"
由于您在 citing 中有一个 DOI 向量,你也可以使用这种方法:
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}"

关于使用 R 检索期刊论文的引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55064193/

相关文章:

html - 列表中允许使用 HTML <cite> 标签吗?

R引用哪一年引用?

r - 在 R 中修复日期

r - 将多列添加到 R 中的 data.table

python - 无法以正确的方式使用 "explicit wait"

python - Beautifulsoup、urllib2 和请求没有找到来自 9gag.com 的所有 HTML 标签

java - Android/Java : Html scraping, 正则表达式 Spotify 专辑封面

latex - Biblatex 的数字引用不起作用?

r - 如何在R中实现countifs函数(excel)

r - 查找向量中值之间的中点