Tracking R package downloads on Github
August 17, 2019
[ Misc ]
R python github analytics

As a package author, it’s nice to know how often your package is getting installed and used. This is not only good for staying motivated (assuming your package is getting some use), but it’s also important as part of building a portfolio in data science. After all, data science is all about measurement and quantification. What better evidence is there of your contributions to Open Source Software than cold hard numbers that represent usage data?

If your R package is published to CRAN, then package installs can be found in the CRAN logs and accessed with the cranlogs library.

If your package was published to Github, you can track repository clones. However, Github’s built-in analytics is limited to the most recent two-weeks of data. This is not helpful if you want to track overall usage. So you really have to roll your own script that continually harvests this analytics data from Github.

This is how I did it using R.


comments powered by Disqus