Skip to content

isaborucki/rpublons

 
 

Repository files navigation

R Client for Publons.com

rpublons is a package for extracting data from Publons.com, a site for publicly reporting scholarly peer review activity. Use of the package requires a Publons account. The username and password combination are used retrieve an API token. You can either set your username and password via environment variables or use publons_auth() to retrieve (and set) the API token as an environment variable. This is long-lived, so you can also set the PUBLONS_TOKEN environment variable (once you have it) and avoid the authorization handshake.

The package currently provides a minimalist API client.

library("rpublons")
if (Sys.getenv("PUBLONS_TOKEN") == "") {
    publons_auth("myusername", "mypassword")
}

# get list of academics
publons("GET", "academic/")
## [1] "{\"count\":335085,\"next\":\"http://publons.com/api/v2/academic/?page=2\",\"previous\":null,\"results\":[{\"ids\":{\"orcid\":\"\",\"id\":43342,\"api\":\"https://publons.com/api/v2/academic/43342/\",\"url\":\"https://publons.com/author/43342/\"},\"publishing_name\":\"Georges Debregeas\",\"bio\":\"\",\"merit\":3,\"affiliations\":{\"other\":[{\"name\":\"FRE3231 Laboratoire Jean Perrin, Centre National de la Recherche Scientifique, UPMC Université Paris 6, Paris, France\",\"url\":null},{\"name\":\"Frontiers\",\"url\":\"http://frontiersin.org/people/u/51305\"}],\"institutions\":[]},\"reviews\":{\"post\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=43342&pre=false\"},\"pre\":{\"count\":1,\"url\":\"https://publons.com/api/v2/academic/review/?academic=43342&pre=true\"}}},{\"ids\":{\"orcid\":\"\",\"id\":117882,\"api\":\"https://publons.com/api/v2/academic/117882/\",\"url\":\"https://publons.com/author/117882/\"},\"publishing_name\":\"Miller Mendoza Jimenez\",\"bio\":\"\",\"merit\":3,\"affiliations\":{\"other\":[{\"name\":\"ETH Zuerich, Switzerland\",\"url\":null},{\"name\":\"Frontiers\",\"url\":\"http://frontiersin.org/people/u/127220\"}],\"institutions\":[]},\"reviews\":{\"post\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=117882&pre=false\"},\"pre\":{\"count\":1,\"url\":\"https://publons.com/api/v2/academic/review/?academic=117882&pre=true\"}}},{\"ids\":{\"orcid\":\"\",\"id\":265822,\"api\":\"https://publons.com/api/v2/academic/265822/\",\"url\":\"https://publons.com/author/265822/\"},\"publishing_name\":\"D E. Mushi\",\"bio\":\"\",\"merit\":0,\"affiliations\":{\"other\":[],\"institutions\":[]},\"reviews\":{\"post\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=265822&pre=false\"},\"pre\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=265822&pre=true\"}}},{\"ids\":{\"orcid\":\"\",\"id\":279202,\"api\":\"https://publons.com/api/v2/academic/279202/\",\"url\":\"https://publons.com/author/279202/\"},\"publishing_name\":\"Tarek A. Leil\",\"bio\":\"\",\"merit\":0,\"affiliations\":{\"other\":[{\"name\":\"Frontiers in Pharmacology\",\"url\":\"http://frontiersin.org/people/u/105476\"},{\"name\":\"Quantitative Clinical Pharmacology, Clinical Pharmacology and Pharmacometrics, Exploratory Clinical and Translational Research, Bristol-Myers Squibb, Princeton, NJ, USA\",\"url\":null}],\"institutions\":[]},\"reviews\":{\"post\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=279202&pre=false\"},\"pre\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=279202&pre=true\"}}},{\"ids\":{\"orcid\":\"\",\"id\":565489,\"api\":\"https://publons.com/api/v2/academic/565489/\",\"url\":\"https://publons.com/author/565489/\"},\"publishing_name\":\"Helle Sørensen\",\"bio\":\"\",\"merit\":0,\"affiliations\":{\"other\":[],\"institutions\":[]},\"reviews\":{\"post\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=565489&pre=false\"},\"pre\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=565489&pre=true\"}}},{\"ids\":{\"orcid\":\"\",\"id\":780674,\"api\":\"https://publons.com/api/v2/academic/780674/\",\"url\":\"https://publons.com/author/780674/\"},\"publishing_name\":\"N A. Mortensen\",\"bio\":\"\",\"merit\":0,\"affiliations\":{\"other\":[],\"institutions\":[]},\"reviews\":{\"post\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=780674&pre=false\"},\"pre\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=780674&pre=true\"}}},{\"ids\":{\"orcid\":\"\",\"id\":283118,\"api\":\"https://publons.com/api/v2/academic/283118/\",\"url\":\"https://publons.com/author/283118/\"},\"publishing_name\":\"Ossama Rasslan\",\"bio\":\"\",\"merit\":0,\"affiliations\":{\"other\":[],\"institutions\":[]},\"reviews\":{\"post\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=283118&pre=false\"},\"pre\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=283118&pre=true\"}}},{\"ids\":{\"orcid\":\"\",\"id\":112744,\"api\":\"https://publons.com/api/v2/academic/112744/\",\"url\":\"https://publons.com/author/112744/\"},\"publishing_name\":\"John Rogers\",\"bio\":\"\",\"merit\":0,\"affiliations\":{\"other\":[],\"institutions\":[]},\"reviews\":{\"post\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=112744&pre=false\"},\"pre\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=112744&pre=true\"}}},{\"ids\":{\"orcid\":\"\",\"id\":240775,\"api\":\"https://publons.com/api/v2/academic/240775/\",\"url\":\"https://publons.com/author/240775/\"},\"publishing_name\":\"Vincenzo Miranda\",\"bio\":\"\",\"merit\":0,\"affiliations\":{\"other\":[],\"institutions\":[]},\"reviews\":{\"post\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=240775&pre=false\"},\"pre\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=240775&pre=true\"}}},{\"ids\":{\"orcid\":\"\",\"id\":490673,\"api\":\"https://publons.com/api/v2/academic/490673/\",\"url\":\"https://publons.com/author/490673/\"},\"publishing_name\":\"Jordi Guillen\",\"bio\":\"\",\"merit\":0,\"affiliations\":{\"other\":[],\"institutions\":[]},\"reviews\":{\"post\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=490673&pre=false\"},\"pre\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=490673&pre=true\"}}}]}"
# get academics by institution
publons("GET", "academic/", query = list(institution = "Harvard University"))
## [1] "{\"count\":372,\"next\":\"http://publons.com/api/v2/academic/?institution=Harvard+University&page=2\",\"previous\":null,\"results\":[{\"ids\":{\"orcid\":\"\",\"id\":27848,\"api\":\"https://publons.com/api/v2/academic/27848/\",\"url\":\"https://publons.com/author/27848/\"},\"publishing_name\":\"Masahito Yamagata\",\"bio\":\"\",\"merit\":0,\"affiliations\":{\"other\":[],\"institutions\":[{\"ids\":{\"id\":323,\"url\":\"https://publons.com/institution/323/\"},\"name\":\"Harvard University\"}]},\"reviews\":{\"post\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=27848&pre=false\"},\"pre\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=27848&pre=true\"}}},{\"ids\":{\"orcid\":\"\",\"id\":31142,\"api\":\"https://publons.com/api/v2/academic/31142/\",\"url\":\"https://publons.com/author/31142/\"},\"publishing_name\":\"P Gregg Greenough\",\"bio\":\"\",\"merit\":3,\"affiliations\":{\"other\":[{\"name\":\"Reviewer - BMJ Open\",\"url\":null}],\"institutions\":[{\"ids\":{\"id\":323,\"url\":\"https://publons.com/institution/323/\"},\"name\":\"Harvard University\"}]},\"reviews\":{\"post\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=31142&pre=false\"},\"pre\":{\"count\":1,\"url\":\"https://publons.com/api/v2/academic/review/?academic=31142&pre=true\"}}},{\"ids\":{\"orcid\":\"\",\"id\":41764,\"api\":\"https://publons.com/api/v2/academic/41764/\",\"url\":\"https://publons.com/author/41764/\"},\"publishing_name\":\"Ofer Pasternak\",\"bio\":\"\",\"merit\":0,\"affiliations\":{\"other\":[{\"name\":\"Frontiers\",\"url\":\"http://frontiersin.org/people/u/62870\"}],\"institutions\":[{\"ids\":{\"id\":323,\"url\":\"https://publons.com/institution/323/\"},\"name\":\"Harvard University\"}]},\"reviews\":{\"post\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=41764&pre=false\"},\"pre\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=41764&pre=true\"}}},{\"ids\":{\"orcid\":\"\",\"id\":142363,\"api\":\"https://publons.com/api/v2/academic/142363/\",\"url\":\"https://publons.com/author/142363/\"},\"publishing_name\":\"Karl Szpunar\",\"bio\":\"\",\"merit\":15,\"affiliations\":{\"other\":[{\"name\":\"Frontiers\",\"url\":\"http://frontiersin.org/people/u/62764\"}],\"institutions\":[{\"ids\":{\"id\":323,\"url\":\"https://publons.com/institution/323/\"},\"name\":\"Harvard University\"}]},\"reviews\":{\"post\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=142363&pre=false\"},\"pre\":{\"count\":5,\"url\":\"https://publons.com/api/v2/academic/review/?academic=142363&pre=true\"}}},{\"ids\":{\"orcid\":\"\",\"id\":43737,\"api\":\"https://publons.com/api/v2/academic/43737/\",\"url\":\"https://publons.com/author/43737/\"},\"publishing_name\":\"Karl K Szpunar\",\"bio\":\"\",\"merit\":0,\"affiliations\":{\"other\":[{\"name\":\"Frontiers\",\"url\":\"http://frontiersin.org/people/u/62764\"}],\"institutions\":[{\"ids\":{\"id\":323,\"url\":\"https://publons.com/institution/323/\"},\"name\":\"Harvard University\"}]},\"reviews\":{\"post\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=43737&pre=false\"},\"pre\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=43737&pre=true\"}}},{\"ids\":{\"orcid\":\"\",\"id\":43740,\"api\":\"https://publons.com/api/v2/academic/43740/\",\"url\":\"https://publons.com/author/43740/\"},\"publishing_name\":\"Daniel L Schacter\",\"bio\":\"\",\"merit\":0,\"affiliations\":{\"other\":[{\"name\":\"Frontiers\",\"url\":\"http://frontiersin.org/people/u/14914\"}],\"institutions\":[{\"ids\":{\"id\":323,\"url\":\"https://publons.com/institution/323/\"},\"name\":\"Harvard University\"}]},\"reviews\":{\"post\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=43740&pre=false\"},\"pre\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=43740&pre=true\"}}},{\"ids\":{\"orcid\":\"\",\"id\":46060,\"api\":\"https://publons.com/api/v2/academic/46060/\",\"url\":\"https://publons.com/author/46060/\"},\"publishing_name\":\"Stephen Azariah Allsop\",\"bio\":\"\",\"merit\":0,\"affiliations\":{\"other\":[{\"name\":\"Frontiers\",\"url\":\"http://frontiersin.org/people/u/131144\"}],\"institutions\":[{\"ids\":{\"id\":446,\"url\":\"https://publons.com/institution/446/\"},\"name\":\"Massachusetts Institute of Technology\"},{\"ids\":{\"id\":323,\"url\":\"https://publons.com/institution/323/\"},\"name\":\"Harvard University\"}]},\"reviews\":{\"post\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=46060&pre=false\"},\"pre\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=46060&pre=true\"}}},{\"ids\":{\"orcid\":\"\",\"id\":49356,\"api\":\"https://publons.com/api/v2/academic/49356/\",\"url\":\"https://publons.com/author/49356/\"},\"publishing_name\":\"Foivos Markopoulos\",\"bio\":\"\",\"merit\":0,\"affiliations\":{\"other\":[],\"institutions\":[{\"ids\":{\"id\":323,\"url\":\"https://publons.com/institution/323/\"},\"name\":\"Harvard University\"}]},\"reviews\":{\"post\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=49356&pre=false\"},\"pre\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=49356&pre=true\"}}},{\"ids\":{\"orcid\":\"\",\"id\":49772,\"api\":\"https://publons.com/api/v2/academic/49772/\",\"url\":\"https://publons.com/author/49772/\"},\"publishing_name\":\"Shelby B. Dietz\",\"bio\":\"\",\"merit\":0,\"affiliations\":{\"other\":[{\"name\":\"Frontiers\",\"url\":\"http://frontiersin.org/people/u/31317\"}],\"institutions\":[{\"ids\":{\"id\":202,\"url\":\"https://publons.com/institution/202/\"},\"name\":\"Cornell University\"},{\"ids\":{\"id\":323,\"url\":\"https://publons.com/institution/323/\"},\"name\":\"Harvard University\"}]},\"reviews\":{\"post\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=49772&pre=false\"},\"pre\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=49772&pre=true\"}}},{\"ids\":{\"orcid\":\"\",\"id\":50486,\"api\":\"https://publons.com/api/v2/academic/50486/\",\"url\":\"https://publons.com/author/50486/\"},\"publishing_name\":\"Matcheri S Keshavan\",\"bio\":\"\",\"merit\":0,\"affiliations\":{\"other\":[{\"name\":\"Frontiers\",\"url\":\"http://frontiersin.org/people/u/5901\"}],\"institutions\":[{\"ids\":{\"id\":903,\"url\":\"https://publons.com/institution/903/\"},\"name\":\"University of Pittsburgh\"},{\"ids\":{\"id\":323,\"url\":\"https://publons.com/institution/323/\"},\"name\":\"Harvard University\"}]},\"reviews\":{\"post\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=50486&pre=false\"},\"pre\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=50486&pre=true\"}}}]}"
# get a specific academic by ORCiD
publons("GET", paste0("academic/", "0000-0003-4097-6326"))
## [1] "{\"ids\":{\"orcid\":\"0000-0003-4097-6326\",\"id\":634082,\"api\":\"https://publons.com/api/v2/academic/634082/\",\"url\":\"https://publons.com/author/634082/\"},\"publishing_name\":\"Thomas Leeper\",\"bio\":\"Assistant Professor in Political Behaviour at the London School of Economics and Political Science. Interested in public opinion, political psychology, survey and experimental methods, open science, cloud computing, and R.\",\"merit\":405,\"affiliations\":{\"other\":[],\"institutions\":[{\"ids\":{\"id\":8037,\"url\":\"https://publons.com/institution/8037/\"},\"name\":\"London School of Economics and Political Science, University of London\"}]},\"reviews\":{\"post\":{\"count\":0,\"url\":\"https://publons.com/api/v2/academic/review/?academic=634082&pre=false\"},\"pre\":{\"count\":135,\"url\":\"https://publons.com/api/v2/academic/review/?academic=634082&pre=true\"}}}"
# get reviews for a specific academic by ORCiD
publons("GET", "academic/review/", 
        query = list(academic = "0000-0003-4097-6326"))
## [1] "{\"count\":135,\"next\":\"http://publons.com/api/v2/academic/review/?academic=0000-0003-4097-6326&page=2\",\"previous\":null,\"results\":[{\"ids\":{\"academic\":{\"id\":\"an9X4IDT\",\"api\":\"https://publons.com/api/v2/academic/review/an9X4IDT/\",\"url\":\"https://publons.com/author/review/an9X4IDT/\"}},\"date_reviewed\":\"2017\",\"verification\":{\"verified\":true},\"publisher\":{\"name\":\"Taylor & Francis\",\"ids\":{\"id\":24,\"url\":\"https://publons.com/publisher/24/\"}},\"journal\":null,\"article\":null},{\"ids\":{\"academic\":{\"id\":\"PYxSQoA2\",\"api\":\"https://publons.com/api/v2/academic/review/PYxSQoA2/\",\"url\":\"https://publons.com/author/review/PYxSQoA2/\"}},\"date_reviewed\":\"2017\",\"verification\":{\"verified\":true},\"publisher\":{\"name\":\"University of Chicago Press\",\"ids\":{\"id\":35,\"url\":\"https://publons.com/publisher/35/\"}},\"journal\":null,\"article\":null},{\"ids\":{\"academic\":{\"id\":\"QBNmyitw\",\"api\":\"https://publons.com/api/v2/academic/review/QBNmyitw/\",\"url\":\"https://publons.com/author/review/QBNmyitw/\"}},\"date_reviewed\":\"2017\",\"verification\":{\"verified\":true},\"publisher\":{\"name\":\"University of Chicago Press\",\"ids\":{\"id\":35,\"url\":\"https://publons.com/publisher/35/\"}},\"journal\":null,\"article\":null},{\"ids\":{\"academic\":{\"id\":\"NZ9q0J5V\",\"api\":\"https://publons.com/api/v2/academic/review/NZ9q0J5V/\",\"url\":\"https://publons.com/author/review/NZ9q0J5V/\"}},\"date_reviewed\":\"2016\",\"verification\":{\"verified\":true},\"publisher\":{\"name\":\"Cambridge University Press\",\"ids\":{\"id\":50,\"url\":\"https://publons.com/publisher/50/\"}},\"journal\":null,\"article\":null},{\"ids\":{\"academic\":{\"id\":\"L7rHDXId\",\"api\":\"https://publons.com/api/v2/academic/review/L7rHDXId/\",\"url\":\"https://publons.com/author/review/L7rHDXId/\"}},\"date_reviewed\":\"2017\",\"verification\":{\"verified\":true},\"publisher\":{\"name\":\"Cambridge University Press\",\"ids\":{\"id\":50,\"url\":\"https://publons.com/publisher/50/\"}},\"journal\":null,\"article\":null},{\"ids\":{\"academic\":{\"id\":\"X1dph3BZ\",\"api\":\"https://publons.com/api/v2/academic/review/X1dph3BZ/\",\"url\":\"https://publons.com/author/review/X1dph3BZ/\"}},\"date_reviewed\":\"2016\",\"verification\":{\"verified\":true},\"publisher\":{\"name\":\"SAGE Publishing\",\"ids\":{\"id\":64,\"url\":\"https://publons.com/publisher/64/\"}},\"journal\":null,\"article\":null},{\"ids\":{\"academic\":{\"id\":\"xgvBYI4m\",\"api\":\"https://publons.com/api/v2/academic/review/xgvBYI4m/\",\"url\":\"https://publons.com/author/review/xgvBYI4m/\"}},\"date_reviewed\":\"2017\",\"verification\":{\"verified\":true},\"publisher\":{\"name\":\"Routledge\",\"ids\":{\"id\":92,\"url\":\"https://publons.com/publisher/92/\"}},\"journal\":null,\"article\":null},{\"ids\":{\"academic\":{\"id\":\"nrn4cPa9\",\"api\":\"https://publons.com/api/v2/academic/review/nrn4cPa9/\",\"url\":\"https://publons.com/author/review/nrn4cPa9/\"}},\"date_reviewed\":\"2016\",\"verification\":{\"verified\":true},\"publisher\":{\"name\":\"Taylor & Francis\",\"ids\":{\"id\":24,\"url\":\"https://publons.com/publisher/24/\"}},\"journal\":null,\"article\":null},{\"ids\":{\"academic\":{\"id\":\"lDG6hK4E\",\"api\":\"https://publons.com/api/v2/academic/review/lDG6hK4E/\",\"url\":\"https://publons.com/author/review/lDG6hK4E/\"}},\"date_reviewed\":\"2017\",\"verification\":{\"verified\":true},\"publisher\":{\"name\":\"Cambridge University Press\",\"ids\":{\"id\":50,\"url\":\"https://publons.com/publisher/50/\"}},\"journal\":null,\"article\":null},{\"ids\":{\"academic\":{\"id\":\"ow39lMIU\",\"api\":\"https://publons.com/api/v2/academic/review/ow39lMIU/\",\"url\":\"https://publons.com/author/review/ow39lMIU/\"}},\"date_reviewed\":\"2014\",\"verification\":{\"verified\":true},\"publisher\":{\"name\":\"Taylor & Francis\",\"ids\":{\"id\":24,\"url\":\"https://publons.com/publisher/24/\"}},\"journal\":null,\"article\":null}]}"
# get a specific review
publons("GET", paste0("academic/review/", "YK8zafgo"))
## [1] "{\"ids\":{\"academic\":{\"id\":\"YK8zafgo\",\"api\":\"https://publons.com/api/v2/academic/review/YK8zafgo/\",\"url\":\"https://publons.com/author/review/YK8zafgo/\"}},\"date_reviewed\":\"2014\",\"verification\":{\"verified\":true},\"publisher\":{\"name\":\"American Institute of Physics (AIP)\",\"ids\":{\"id\":176,\"url\":\"https://publons.com/publisher/176/\"}},\"journal\":null,\"article\":null}"

Installation

CRAN Downloads Travis Build Status Appveyor Build Status codecov.io

This package is not yet on CRAN. To install the latest development version you can install pull a potentially unstable version directly from GitHub:

if (!require("remotes")) {
    install.packages("remotes")
}
remotes::install_github("leeper/rpublons")

About

Client for Publons.com

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 100.0%