user-statistician

Overview

The cicirello/user-statistician GitHub Action generates a detailed visual summary of your activity on GitHub in the form of an SVG, suitable to display on your GitHub Profile README. For a live example, see Vincent A. Cicirello's GitHub Profile, the developer of the action. Although the intended use-case is to generate an SVG image for your GitHub Profile README, you can also potentially link to the GitHub stats image from a personal website, or from anywhere else where you'd like to share a summary of your activity on GitHub. The SVG that the action generates includes statistics for the repositories that you own, your contribution statistics (e.g., commits, issues, pull requests, etc), as well as the distribution of languages within public repositories that you own visualized as a pie chart. The user stats image can be customized, including the colors such as with one of the built-in themes or your own set of custom colors. You can also pick and choose which sections of the card to include, as well as the order of appearance of the sections; and you can choose to hide individual stats.

The user-statistician action runs entirely on GitHub, and is implemented in Python. It uses the GitHub GraphQL API to collect the necessary data. The contribution counts are as reported by the GitHub GraphQL API. For details of how GitHub counts contributions, see GitHub's documentation. The repository, contribution, and language data included on the card is all public. This is true even of the Private Contributions entry on the stats image, as the restrictedContributionsCount returned from the query executed by the action will only be non-zero if you have opted in to sharing private contributions via GitHub's profile settings. You can also hide the Private Contributions entry regardless of your GitHub settings, or any of the other entries that you don't want to display. Each statistic also auto-hides if the associated count is 0.

The user-statistician action runs entirely on GitHub. To use it, you just need to set up a workflow in your GitHub Profile repository (or technically any repository that you own) on a schedule (daily should be sufficient), and then add a link to the image in your README. The action handles committing and pushing the generated image to the repository.

Features: The features of the user-statistician GitHub Action include the following:

The user-statistician source code repository is hosted on GitHub; and is licensed under the MIT License. Also in the GitHub repository you will find detailed instructions for use including several sample ready-to-use GitHub workflows.

The user-statistician GitHub Action is developed by Vincent A. Cicirello. It was originally implemented for my own use, but I have decided to share it with others.

Live Examples

The first example below uses all of the default settings, except it switches the color theme to dark (my preference on GitHub). The second uses custom colors to match the color palette of my personal website.

Live ExampleWorkflow
Vincent A. Cicirello's GitHub Profile userstats.yml
Vincent A. Cicirello's personal website userstats.yml

Tech Stack

The user-statistician GitHub Action utilizes the following:

Blog Posts About the user-statistician

As the author of the user-statistician, I occasionally post about this, and other software that I maintain on DEV.to. See my DEV.to profile for a full list of such posts. Below is a selection of blog posts specifically about the user-statistician.