Skip to content

Instantly share code, notes, and snippets.

@seandavi
Last active January 26, 2020 17:52
Show Gist options
  • Save seandavi/5f3dd7c5b3a3da68627771312427ce1d to your computer and use it in GitHub Desktop.
Save seandavi/5f3dd7c5b3a3da68627771312427ce1d to your computer and use it in GitHub Desktop.
Get RCR and citation metrics for a list of pubmed IDs from https://icite.od.nih.gov/analysis
#' Get publication metrics from iCite
#'
#' iCite is a tool to access a dashboard of bibliometrics for papers
#' associated with a portfolio. Users upload the PubMed IDs of articles
#' of interest (from SPIRES or PubMed), optionally grouping them for
#' comparison. iCite then displays the number of articles, articles per
#' year, citations per year, and Relative Citation Ratio (a field-normalized
#' metric that shows the citation impact of one or more articles relative
#' to the average NIH-funded paper). A range of years can be selected,
#' as well as article type (all, or only research articles), and individual
#' articles can be toggled on and off. Users can download a report table
#' with the article-level detail for later use or further visualization.
#'
#' @param pmids a vector of numeric pubmed IDs
#'
#' @return a data frame with citation information
#'
#' @depends httr
#' @export
getPubMetrics = function(pmids) {
require(httr)
do.call(rbind,lapply(pmids,function(pmid) {
return(content(GET(sprintf('https://icite.od.nih.gov/api/pubs/%d',pmid))))
}))
}
@seandavi
Copy link
Author

seandavi commented Sep 8, 2016

Thanks, @morgenweck. I need to adjust the code a bit to do a better job of doing multiple lookups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment