Here is my collection of basic code to do simple bibliometric and altmetric tasks
AltExtractor.R — Get altmetric.com data for a given list of DOIs
ESURFscraper.R — Get DOIs for all ESURFD manuscripts and scrape the webpages for Reviewer comments
GRLDOIextractor.R — Get DOIs for all GRL manuscripts, retrieve altmetric.com data, then scrape Altmetric.com page of each paper for details on the wikipedia edit.
NatureGeoscienceSkewed.R — Download and plot data from the Nature Geoscience editorial (http://rdcu.be/vJHW)