[This article was first published on chem-bla-ics, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
I wanted to know when a set of publications I was aggregating on CiteULike was published. The number of publications per year, for example. I did a quick Google but could not find an R package to client to the CiteULike API, and because I wanted to play with JSON in R anyway, I created a citeuliker package. Because I’m a liker of CiteULike (see these posts). Well, to me that makes sense.Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
citeuliker uses jsonlite, plyr, and curl (and testthat for testing). The first converts the JSON returned by the API to a R data structure. The package unfolds the “published” field, so that I can more easily plot things by year. I use this code for that:
- data[,”year”] <- laply(data[,”published”], function(x) {
if (length(x) < 1) return(NA) else return(x[1])
})
- barplot(table(citeuliker::getData(user=”egonw”)[,”year”]))
Getting all the DOIs from my library is trivial too now:
- data <- citeuliker::getData(user=”egonw”)
doi <- as.vector(na.omit(data[,”doi”]))
I guess the as.vector() to remove attributes can be done more efficiently; suggestions welcome.
Now, this makes it really easy to aggregate #altmetrics, because the rOpenSci people provide the rAltmetric package, and I can simply do (continuing from the above):
- library(rAltmetric) acuna <- altmetrics(doi=dois[6]);
acuna_data <- altmetric_data(acuna);
plot(acuna)
Following the tutorial, I can easily get #altmetrics for all my DOIs, and plot a histogram of my Altmetric scores (make sure you have the plyr library loaded):
- raw_metrics <- lapply(dois, function(x) altmetrics(doi = x))
metric_data <- ldply(raw_metrics, altmetric_data
hist(metric_data$score, main=”Altmetric scores”, xlab=”score”)
The percentile statistics are also useful to me. After all, there is a clear pressure to have impact with your research. Getting your research known is a first step there. That’s why we submit abstracts for orals and posters too. Advertisement. Anyway, there is enough to be said about how useful #altmetrics are, and my main interest is in using them to see what people say about that, but I don’t have time now to do anything with that (it’s about time for dinner and Dr. Who).
But, as a last plot, and happy my online presence is useful for something, here a plot of the percentile of my papers in the journal it was published in and for the full Altmetric.com corpus:
- plot(
as.vector(metric_data$context.all.pct),
as.vector(metric_data$context.journal.pct),
xlab=”pct all”, ylab=”pct journal”
)
abline(0,1)
This figure shows that my social campaign puts many of my publications in the top 10. That’s a start. Of course, these do not link one-to-one to citations, which are valued more by many, even though it also does not reflect well the true impact. Sadly, scientists here commonly ignore that the citation count also includes cito:disagreesWith and cito:citesAsAuthority.
Anyways… I think I need other R packages for getting citation counts from Google Scholar, Web of Science, and Scopus.
To leave a comment for the author, please follow the link and comment on their blog: chem-bla-ics.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.