Vitaly Fedorov

Published papers citation tracking using Altmetric

During the development of web-site for London Institute for Mathematical Sciences (LIMS) ( we needed to track citations and mentions in media of papers published on the LIMS website. Altmetric and Dimensions metrics APIs were considered to use for implementation of update history tracking widgets since Altmetric Donuts and Dimensions Badges were already in use on the website.

The task was to obtain update data, store it in form convenient to use and display as a list grouped by update date.
Widget development
Development began with available APIs analysis.
APIs overview
Digital Object Identifier or DOI was used as a parameter for both Altmetric and Dimensions API calls. In case of success APIs returns JSON-encoded response.

Dimensions metrics API calls look like

PMID (PubMed identifier or Dimensions ID (identifier in Dimensions database) might be used as API call parameter aside from DOI.

Let's look at Dimensions metrics API response:
"doi": "10.1103/physrevmaterials.2.073804",
"times_cited": 0,
"recent_citations": 0,
"highly_cited_1": false,
"highly_cited_5": false,
"highly_cited_10": false,
"relative_citation_ratio": null,
"field_citation_ratio": null,
"license": "This data has been sourced via the Dimensions Metrics API, use of which is subject to the terms at Any use by an unregistered organization is not authorized. Please contact for further information."

Only 'times_cited' attribute is necessary for widget functionality. Attribute name is pretty self-explanatory - it reflects total number of paper`s citations. More detailed info on returning values from Dimensions metrics API you can find in the reference.

Altmetric API calls look like<ID>

It accepts paper`s Altmetric ID or DOI as parameters.

Altmetric API response contains more data than necessary so let's take a look at response fragment with the most valuable attributes:

"cited_by_posts_count": 160,
"cited_by_msm_count": 5,
"cited_by_feeds_count": 1,
"cited_by_tweeters_count": 106,
"cited_by_fbwalls_count": 6,
"cited_by_accounts_count": 118,
"last_updated": 1531823409,
"score": 114.3,

Fragment contains counters for different media sources that will be displayed in widget, date of last update (last time the paper was mentioned in media) in Unix time and Altmetric Attention Score calculated using counters` weighted values. More details about Altmetric API can be found in the reference and detailed attributes description can be found in the following table.
Both APIs return momentary values while it was necessary to keep update history so the decision was to save counters`s values in our own repository on Altmetric and Dimensions score / citation count daily update. There weren't any issues with storing Dimensions data - adding database entry on every 'times_cited' count update was enough. But Altmetric widget requires displaying of media source and count of mentions for each media source whereas non-commercial version of Altmetric API doesn't provide such details so separate table for storing media sources` counts was created.
'Altmetric media counts' table fragment
Column names correspond attribute names from Altmetric API response however 'updated' row reflects time of actual counts update in our repository not 'last_updated' value from response.

All that remains is to display papers in correct order and group by date.
Encountered issues
The main difficulty encountered during development was a bit unclear changing of Altmetric media counts.
Media count changes
Take a look at 'by_tweeters' column. Its value increases and decreases what leads to appearance of 'false' updates. These updates aren't present on papers` page on Altmetric website and it's completely unclear where do they come from. Perhaps it's somehow connected with Twitter users remove retweets corresponding papers mentioned in.
Note: I believe the described issue doesn't appear in commercial version of Altmetric API (aka '/fetch' API) but I didn't have a chance to work with it so I can't say for sure.
Unfortunately the optimal solution for this problem hasn't been found yet.

As a result following widgets were created:
'Citation updates' widget displaying date when papers were cited last time is simple enough. 'Online media updates' widget is more interesting - it's also shows media source paper was mentioned in and count of mentions in corresponding media. Colors used for marking different media sources are same as used at Altmetric Donuts and the title with description pops-up on hover.

Backend logic of data filtering will be improved in the future as well as widgets` appearance but even now developed widgets are easy to implement using minimal available API level and already work for a while.
Thanks for reading!