Track package and paper metrics weekly - #136
Closed
sbfnk wants to merge 1 commit into
Closed
Conversation
Co-authored-by: sbfnk <sebastian.funk@lshtm.ac.uk>
Member
Author
|
Reopening under the bot account for consistency with the commit author. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a weekly job that records download counts, GitHub stars and citation counts, and shows the download figure on the software page.
Issue #85 asked for this to support grant applications. The value is the history, which only accumulates from the day the job starts, so this collects the numbers now and keeps the presentation minimal.
What it collects
_data/package-stats.csvgets one row per package per week: stars, forks, open issues, whether the package is on CRAN, and CRAN downloads for the last month. The list of packages comes from the r-universe registry plus_data/software-extras.yml, so it tracks exactly what the software page shows and needs no list of its own._data/paper-citations.csvgets one row per paper per week, with citation counts from OpenAlex. The DOIs come from_data/papers.bib, which the publications workflow already maintains.Rerunning on the same day corrects the rows rather than duplicating them.
What it shows
One addition to the software page: the download figure joins the existing metadata line, reading
R · Updated Aug 2026 · 598 CRAN downloads/month. Naming CRAN matters because only the ten packages on CRAN have a figure, and without it a blank could be read as "not used" rather than "not on CRAN".Nothing else is rendered. In particular there is no citation count anywhere on the site.
Why citations are collected but not shown
Citation counts belong in a grant application, not on a public page. Beside each paper in a list sorted by year they become a column the eye reads down and ranks, including work by different people in the group, and recent papers legitimately show zero: the ten 2025 papers have 19 citations between them, which is normal and looks poor in a table.
The numbers are also concentrated. Of 5,240 citations across 39 papers, 2,830 belong to a single 2020 paper, and the median paper has 15. OpenAlex indexes fewer sources than Google Scholar, so these are a lower bound.
Packages carry no citation column at all. Of sixteen, three declare a citable reference, and one of those is a CRAN package DOI that is almost never cited, so the column would have been blank or misleading nearly everywhere.
Stars are collected but not displayed for the same reason. They measure visibility rather than use, and the two diverge: scoringutils has 934 downloads and 64 stars, EpiNow2 has 598 and 140, contactsurveys has 263 and 2.
Notes
The job commits the CSVs directly to
mainrather than opening a weekly pull request, which needspermissions: contents: write. That commit triggers a site build, so the download figures on the software page refresh themselves.The software page degrades safely: if
_data/package-stats.csvis absent, the metadata line renders as it did before.