sha*_*azz 7 r citations web-scraping 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
Run Code Online (Sandbox Code Playgroud)
以同样的方式,我可以通过from = "scopus"在函数中设置fulltext::ft_search(并包含 Scopus API 密钥)来获取 scopus id。
如果使用 DOI,我可以使用 R 库获取文章的引用次数rcrossref:
rcrossref::cr_citation_count(res1$crossref$ids[1])
Run Code Online (Sandbox Code Playgroud)
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的示例,有 3 次引用(截至 2021 年 1 月)。
\n这是一个可能的代码(与上面的示例相同):
\nopcit <- "https://opencitations.net/index/coci/api/v1/citations/10.1177/1369148118786043"\n\nresult <- rjson::fromJSON(file = opcit)\n\nciting <- lapply(result, function(x){\n x[[\'citing\']]\n})\n# a vector with three DOIs, each of which cite the paper\nciting <- unlist(citing) \nRun Code Online (Sandbox Code Playgroud)\n现在我们有了带有三个 DOI 的向量citing。然后,您可以用来rcrossref查找有关施引论文的基本信息,例如:
paper <- rcrossref::cr_works(citing[1])\n\n# find out the title of that paper\npaper[["data"]][["title"]]\n\n# output: "Exchange diplomacy: theory, policy and practice in the Fulbright program"\nRun Code Online (Sandbox Code Playgroud)\n由于您在 中有一个 DOI 向量citing,因此您也可以使用此方法:
citingdata <- rcrossref::cr_cn(citing)\nRun Code Online (Sandbox Code Playgroud)\n的输出citingdata应该导致三篇施引论文的元数据,其结构如这两个示例所示:
[[1]]\n[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}"\n\n[[2]]\n[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\xc3\xa4lksoo 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}"\nRun Code Online (Sandbox Code Playgroud)\n