Skip to content

Track package and paper metrics weekly - #136

Closed
sbfnk wants to merge 1 commit into
mainfrom
stats-tracking
Closed

Track package and paper metrics weekly#136
sbfnk wants to merge 1 commit into
mainfrom
stats-tracking

Conversation

@sbfnk

@sbfnk sbfnk commented Aug 26, 2026

Copy link
Copy Markdown
Member

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.csv gets 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.csv gets 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 main rather than opening a weekly pull request, which needs permissions: 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.csv is absent, the metadata line renders as it did before.

Co-authored-by: sbfnk <sebastian.funk@lshtm.ac.uk>
@sbfnk

sbfnk commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

Reopening under the bot account for consistency with the commit author.

@sbfnk sbfnk closed this Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants