This is a short vignette explaning how to use rAltmetric
. Altmetric is a private company that collects metrics that go far beyond traditional citations. It collects mentions on various social media to provide a more complete picture of the impact of a scholarly publication.
The core functionality of the package is captured in two functions:
altmetrics
- Returns data for a valid identifier such as an altmetric object id, a pubmed ID, an arxiv identifier, a doi, ISBN and so on.altmetric_data
- takes the output of the previous function and returns a tidy data.frame
The package can be used to parse a whole batch of identifiers at once.
e.g.
library(rAltmetric)
library(magrittr)
library(purrr)
##
## Attaching package: 'purrr'
## The following object is masked from 'package:magrittr':
##
## set_names
ids <- list(c(
"10.1038/nature09210",
"10.1126/science.1187820",
"10.1016/j.tree.2011.01.009",
"10.1086/664183"
))
alm <- function(x) altmetrics(doi = x) %>% altmetric_data()
results <- pmap_df(ids, alm)
## doi
## doi
## doi
## doi
# This results in a data.frame with one row per identifier.
You can now see some citation data for these papers.
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:purrr':
##
## contains, order_by
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
knitr::kable(results %>% select(title, doi, starts_with("cited")))
title | doi | cited_by_fbwalls_count | cited_by_feeds_count | cited_by_msm_count | cited_by_policies_count | cited_by_posts_count | cited_by_tweeters_count | cited_by_accounts_count | cited_by_rh_count |
---|---|---|---|---|---|---|---|---|---|
Coupled dynamics of body mass and population growth in response to environmental change | 10.1038/nature09210 | 1 | 7 | 1 | 1 | 13 | 3 | 13 | NA |
Stochastic Community Assembly Causes Higher Biodiversity in More Productive Environments | 10.1126/science.1187820 | NA | 1 | NA | NA | 3 | 1 | 3 | 1 |
Why intraspecific trait variation matters in community ecology | 10.1016/j.tree.2011.01.009 | NA | 2 | NA | NA | 11 | 7 | 9 | NA |
Enemies Maintain Hyperdiverse Tropical Forests | 10.1086/664183 | NA | NA | NA | NA | 3 | 2 | 3 | 1 |