{"action":"created","issue":{"url":"https://api.github.com/repos/ropensci/wishlist/issues/14","labels_url":"https://api.github.com/repos/ropensci/wishlist/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/ropensci/wishlist/issues/14/comments","events_url":"https://api.github.com/repos/ropensci/wishlist/issues/14/events","html_url":"https://github.com/ropensci/wishlist/issues/14","id":70263018,"number":14,"title":"server providing a badge/shield for R package download statistics from the CRAN mirror","user":{"login":"cboettig","id":222586,"avatar_url":"https://avatars.githubusercontent.com/u/222586?v=3","gravatar_id":"","url":"https://api.github.com/users/cboettig","html_url":"https://github.com/cboettig","followers_url":"https://api.github.com/users/cboettig/followers","following_url":"https://api.github.com/users/cboettig/following{/other_user}","gists_url":"https://api.github.com/users/cboettig/gists{/gist_id}","starred_url":"https://api.github.com/users/cboettig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cboettig/subscriptions","organizations_url":"https://api.github.com/users/cboettig/orgs","repos_url":"https://api.github.com/users/cboettig/repos","events_url":"https://api.github.com/users/cboettig/events{/privacy}","received_events_url":"https://api.github.com/users/cboettig/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-04-22T23:39:53Z","updated_at":"2015-04-23T03:57:21Z","closed_at":null,"body":"Stealing this suggestion from @jennybc: it would be nice to be able to badge R packages on Github with download statistics, something like:\r\n\r\n![](https://img.shields.io/badge/downloads-4532-blue.svg)\r\n\r\nLooks like it would be straight forward to have service parse the cran logs and compute a simple sum of total downloads by package. (This could be done incrementally by storing the current sums to avoid parsing every single file every time).\r\n\r\nIt could then generate an svg file with the appropriate data for each package (e.g. using the shields.io api or maybe more simply just based on those svg layouts).  A user could then add the shield to the readme using a url based on the package name, e.g.\r\n\r\n```\r\n![](http://path.to.service/packagename.svg)\r\n```\r\n\r\nMaybe there are more elegant ways to do this, but seems simple enough.  \r\n\r\n\r\nObviously it would be handy to have a slightly more general purpose R package for parsing the logs and computing common statistics by package; e.g. downloads over time etc. \r\n"},"comment":{"url":"https://api.github.com/repos/ropensci/wishlist/issues/comments/95420158","html_url":"https://github.com/ropensci/wishlist/issues/14#issuecomment-95420158","issue_url":"https://api.github.com/repos/ropensci/wishlist/issues/14","id":95420158,"user":{"login":"cboettig","id":222586,"avatar_url":"https://avatars.githubusercontent.com/u/222586?v=3","gravatar_id":"","url":"https://api.github.com/users/cboettig","html_url":"https://github.com/cboettig","followers_url":"https://api.github.com/users/cboettig/followers","following_url":"https://api.github.com/users/cboettig/following{/other_user}","gists_url":"https://api.github.com/users/cboettig/gists{/gist_id}","starred_url":"https://api.github.com/users/cboettig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cboettig/subscriptions","organizations_url":"https://api.github.com/users/cboettig/orgs","repos_url":"https://api.github.com/users/cboettig/repos","events_url":"https://api.github.com/users/cboettig/events{/privacy}","received_events_url":"https://api.github.com/users/cboettig/received_events","type":"User","site_admin":false},"created_at":"2015-04-23T03:57:21Z","updated_at":"2015-04-23T03:57:21Z","body":"@karthik Great points. Looks like cranlogs.app is in javascript so a PR is above my pay grade (I cause enough trouble with my terribly ruby on the fishbaseapi app).  I filed the issue linked above, hopefully this is something Gabor can do in his sleep ;-)\r\n\r\nYeah, it's annoying just how crude the download count number is, though I imagine people will tend to benchmark the number against other R packages, which mitigates the issue a bit.  All download counts are in some sense underestimates (e.g. pip install misses downloads of the same package by apt-get, or prepackaged in some other distribution system like anaconda or a virtual machine etc).  I could go either way."}}