<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="https://www.r-bloggers.com/an-analysis-of-contributions-to-pubmed-commons/"></div></div><div><a data-url="https://www.r-bloggers.com/an-analysis-of-contributions-to-pubmed-commons/" data-counturl="https://www.r-bloggers.com/an-analysis-of-contributions-to-pubmed-commons/" data-count="horizontal" data-text="An Analysis of Contributions to PubMed Commons" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://nsaunders.wordpress.com/2016/12/02/an-analysis-of-contributions-to-pubmed-commons/"> R – What You're Doing Is Rather Desperate</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>I recently saw a tweet floating by which included a link to some recent statistics from <a target="_blank" rel="nofollow" href="https://www.ncbi.nlm.nih.gov/pubmedcommons/">PubMed Commons</a>, the NCBI service for commenting on scientific articles in PubMed. Perhaps it was <a target="_blank" rel="nofollow" href="https://pubmedcommonsblog.ncbi.nlm.nih.gov/2016/11/21/pubmed-comments-their-continuing-conversations/">this post</a> at their blog. So I thought now would be a good time to write some code to analyse PubMed Commons data.</p>
<p>The <a target="_blank" rel="nofollow" href="https://en.wikipedia.org/wiki/Wikipedia:Too_long;_didn%27t_read">tl;dr</a> version: here’s the <a target="_blank" rel="nofollow" href="https://github.com/neilfws/PubMed/tree/master/commons">Github repository</a> and the <a target="_blank" rel="nofollow" href="http://rpubs.com/neilfws/231996">RPubs report</a>.</p>
<p>For further details and some charts, read on.</p>
<p><span></span></p>
<p>Currently, there is no access to PubMed Commons data via the NCBI Entrez API aside from a PubMed search filter to return articles that have comments. However, a Google search for “pubmed commons api” returns <a target="_blank" rel="nofollow" href="https://gist.github.com/hubgit/ed04da6ea8a2fca07583">this useful Gist</a>. It shows how to construct a URL which returns JSON-formatted PubMed Commons data for a given PMID. If Alf is reading this, I’d like to know how he discovered this information gem!</p>
<p>Armed with this I was able to write <a target="_blank" rel="nofollow" href="https://github.com/neilfws/PubMed/blob/master/commons/code/ruby/pubmedcommons.rb">Ruby code</a> to return all PMIDs with comments, fetch the comment data, parse it and output a summary to <a target="_blank" rel="nofollow" href="https://github.com/neilfws/PubMed/blob/master/commons/data/commons.csv">a CSV file</a>. I used to be an XPath guy. This experience changed me into a CSS selector guy.</p>
<p>Analysis and visualisation can then be performed using <a target="_blank" rel="nofollow" href="https://github.com/neilfws/PubMed/blob/master/commons/code/R/pubmedcommons.Rmd">this RMarkdown file</a>. Here are some of the highlights; the RPubs report contains the complete analysis.</p>
<p><a target="_blank" rel="nofollow" href="https://i1.wp.com/github.com/neilfws/PubMed/raw/master/commons/output/count-comments-1.png?ssl=1"><img alt="" src="https://i1.wp.com/github.com/neilfws/PubMed/raw/master/commons/output/count-comments-1.png?w=400&ssl=1" data-recalc-dims="1"></a>At the time of writing 5 877 “real” comments have been written, for 4 703 articles, authored by 1 504 people. By “real comments”, I mean those with an author name and comment text. This excludes automatically-generated notes and moderated comments (more on those later).<br>
According to the PubMed Commons blog, the service has over 10 500 members, so the active participation rate is about what we’d expect from other forums. The fraction of articles is obviously very small, given that there are now close to 27 000 000 PubMed articles.</p>
<p><br></p>
<p><a target="_blank" rel="nofollow" href="https://i0.wp.com/github.com/neilfws/PubMed/raw/master/commons/output/comments-month-year-1.png?ssl=1"><img alt="" src="https://i0.wp.com/github.com/neilfws/PubMed/raw/master/commons/output/comments-month-year-1.png?w=400&ssl=1" data-recalc-dims="1"></a>The chart of comments by month shows the closed trial period, the opening (October 2013) and some peaks in activity around the end of 2014 and in August 2016. The peaks often correspond to an individual annotating many articles in one sitting with a short comment, as in <a target="_blank" rel="nofollow" href="https://www.ncbi.nlm.nih.gov/pubmed/?term=24260145">this example</a>.</p>
<p><br></p>
<p><a target="_blank" rel="nofollow" href="https://i1.wp.com/github.com/neilfws/PubMed/raw/master/commons/output/comments-article-date_dist-1.png?ssl=1"><img alt="" src="https://i1.wp.com/github.com/neilfws/PubMed/raw/master/commons/output/comments-article-date_dist-1.png?w=400&ssl=1" data-recalc-dims="1"></a>More recent articles get more comments. What’s more, it seems that this trend is shifting year on year: that is, comments posted each year tend to be on articles published more recently. I think what’s happening here is that users tend to comment on articles as they are published, which is interesting.<br>
By contrast, the oldest article with a comment currently <a target="_blank" rel="nofollow" href="https://www.ncbi.nlm.nih.gov/pubmed/20786242">comes from 1945</a>.</p>
<p><br></p>
<p><a target="_blank" rel="nofollow" href="https://i0.wp.com/github.com/neilfws/PubMed/raw/master/commons/output/votes-density-1.png?ssl=1"><img alt="" src="https://i0.wp.com/github.com/neilfws/PubMed/raw/master/commons/output/votes-density-1.png?w=400&ssl=1" data-recalc-dims="1"></a>PubMed Commons has a system to rate comments (up/down vote) and around 44% of them have received at least one vote. The most frequent response is that one user finds the comment useful and gives it one up vote. There are a couple of interesting outliers with many more up votes than most comments. These correspond to comments made on the rather-infamous “<a target="_blank" rel="nofollow" href="https://www.ncbi.nlm.nih.gov/pubmed/26771483">heroes of CRISPR</a>” review.</p>
<p><br></p>
<p><a target="_blank" rel="nofollow" href="https://i0.wp.com/github.com/neilfws/PubMed/raw/master/commons/output/comments-mod-1.png?ssl=1"><img alt="" src="https://i0.wp.com/github.com/neilfws/PubMed/raw/master/commons/output/comments-mod-1.png?w=400&ssl=1" data-recalc-dims="1"></a>Last one. An important aspect of any online forum is moderation and it’s possible to extract this information from the HTML (<em>class=”not_appr”</em>). To date, moderators have removed 66 comments and users have deleted 110 (one presumes either after some thought or some prompting). I’d suggest that this is a very small proportion in comparison to other forums.</p>
<p><br></p>
<p>Included in the RPubs report, but not here, are some density plots to show distributions of comments per article and comments per author. As you might expect, what’s observed most frequently is one comment (per article or author), followed by a “long tail”. You may be interested in the article with the most comments. Currently it’s an editorial titled “<a target="_blank" rel="nofollow" href="https://www.ncbi.nlm.nih.gov/pubmed/26933091">When Is Science Ultimately Unreliable?</a>“: you can decide for yourself why it is creating debate. You may also be interested in the most prolific comment authors; I was not, so that’s left as an exercise for those interested – the CSV file is available.</p>
<p><strong>Summary</strong><br>
In my opinion, PubMed Commons is a valuable and reasonably-successful service. It’s obviously something of a “niche” online forum and is never going to set the world alight. However, monthly activity has remained relatively consistent, with more activity in 2016 compared with 2015. Users seems to find many of the comments valuable and community standards are high. It’s interesting that a lot of discussion is around articles as they are published. This is good, but I think we also need maintenance annotation of older articles to point out issues such as broken URLs.</p>
<p>All it needs now is more active users, more comments per user and a real API.</p>
<p>Filed under: <a target="_blank" rel="nofollow" href="https://nsaunders.wordpress.com/category/publications/">publications</a>, <a target="_blank" rel="nofollow" href="https://nsaunders.wordpress.com/category/statistics/r/">R</a>, <a target="_blank" rel="nofollow" href="https://nsaunders.wordpress.com/category/statistics/">statistics</a> Tagged: <a target="_blank" rel="nofollow" href="https://nsaunders.wordpress.com/tag/comments/">comments</a>, <a target="_blank" rel="nofollow" href="https://nsaunders.wordpress.com/tag/ncbi/">ncbi</a>, <a target="_blank" rel="nofollow" href="https://nsaunders.wordpress.com/tag/pubmed-commons/">pubmed commons</a> <a target="_blank" rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nsaunders.wordpress.com/4401/"><img alt="" src="http://feeds.wordpress.com/1.0/comments/nsaunders.wordpress.com/4401/" border="0"></a> <img alt="" src="https://i1.wp.com/pixel.wp.com/b.gif?resize=1%2C1&ssl=1" border="0" data-recalc-dims="1"></p>
<p><div><div><div><div data-width="55" data-show-faces="false" data-send="true" data-layout="box_count" data-height="62" data-href="https://www.r-bloggers.com/an-analysis-of-contributions-to-pubmed-commons/"></div></div><div><a data-url="https://www.r-bloggers.com/an-analysis-of-contributions-to-pubmed-commons/" data-counturl="https://www.r-bloggers.com/an-analysis-of-contributions-to-pubmed-commons/" data-count="vertical" data-text="An Analysis of Contributions to PubMed Commons" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://nsaunders.wordpress.com/2016/12/02/an-analysis-of-contributions-to-pubmed-commons/"> R – What You're Doing Is Rather Desperate</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="https://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="https://www.r-bloggers.com/?s=data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="https://www.r-bloggers.com/?s=Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="https://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="https://www.r-bloggers.com/?s=map">maps</a>, <a title="Animation in R" rel="nofollow" href="https://www.r-bloggers.com/?s=animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="https://www.r-bloggers.com/?s=RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="https://www.r-bloggers.com/?s=sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="https://www.r-bloggers.com/?s=LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="https://www.r-bloggers.com/?s=SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="https://www.r-bloggers.com/?s=eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="https://www.r-bloggers.com/?s=git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="https://www.r-bloggers.com/?s=hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="https://www.r-bloggers.com/?s=Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="https://www.r-bloggers.com/?s=PCA">PCA</a>, <a title="Time series" rel="nofollow" href="https://www.r-bloggers.com/?s=time+series">time series</a>, <a title="finance trading" rel="nofollow" href="https://www.r-bloggers.com/?s=trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/bbVVgFylwyM"></a></div>