0

Looking for author affiliations of a journal using pubmedR, I see that they are sometimes incomplete. Below an example:

library(pubmedR)
journal <- "Advances in Clinical Chemistry[JO] AND 2021:2021[DP]"
article_count <- pmQueryTotalCount(query = journal, api_key = NULL)
article_count$total_count
# [1] 21
article_request <- pmApiRequest(query = journal, limit = article_count$total_count, api_key = NULL)
dfa <- pmApi2df(article_request, format = "bibliometrix")

In the affiliations columns 'C1' or 'AF_UN' of the dataframe 'dfa', we can observe, e.g. for rows 2 and 3 (PMID 34044912 and 34044911), that the country does not appear although it is well mentioned in the corresponding Pubmed affiliations (Iceland and Saudi Arabia, respectively). https://pubmed.ncbi.nlm.nih.gov/34044912/ https://pubmed.ncbi.nlm.nih.gov/34044911/

How to retrieve exhaustive affiliations?

denis
  • 199
  • 1
  • 8

1 Answers1

0

The best way I finally found to retrieve exhaustive affiliations from Pubmed articles is that from ciakovx (thanks to him) :

# https://stackoverflow.com/questions/64103323/extracting-affiliation-information-from-pubmed-search-string-in-r/64109130#64109130
library(pubmedR)
library(purrr)
library(tidyr)

journal <- "Advances in Clinical Chemistry[JO] AND 2021:2021[DP]"
article_count <- pmQueryTotalCount(query = journal, api_key = NULL)
article_count$total_count
# [1] 21

article_request <- pmApiRequest(query = journal, limit = article_count$total_count, api_key = NULL)

dfa <- pluck(article_request, "data") %>% {
  tibble(
    pmid = map_chr(., pluck, "MedlineCitation", "PMID", "text"),
    journal = map(., pluck, "MedlineCitation", "Article", "Journal", "ISOAbbreviation"),
    pubdate = map(., pluck, "MedlineCitation", "Article", "Journal", "JournalIssue", "PubDate", "Year"),
    affiliation = map(., pluck, "MedlineCitation", "Article", "AuthorList", "Author", "AffiliationInfo", "Affiliation")
  )
}
dfa <- as.data.frame(dfa)
denis
  • 199
  • 1
  • 8