Skip to content

Explanation of Rank Calculation in GitHub Stats #4187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
SinaAboutalebi opened this issue Mar 18, 2025 · 1 comment
Open

Explanation of Rank Calculation in GitHub Stats #4187

SinaAboutalebi opened this issue Mar 18, 2025 · 1 comment
Labels
enhancement New feature or request.

Comments

@SinaAboutalebi
Copy link

Is your feature request related to a problem? Please describe.

While the github-readme-stats repository includes a brief explanation in the README about the available ranks and the general rank calculation method, it lacks a detailed, step-by-step explanation of how the percentile and rank are actually computed. The brief mention of the exponential and log-normal distributions is helpful, but there is no clear documentation on the exact formulas, weightings, and how each metric contributes to the overall score.

Describe the solution you'd like

I would greatly appreciate a more detailed documentation section or a dedicated document explaining the rank calculation methodology. Specifically, it would be helpful to understand:

  1. The exact formula used for rank calculation.
  2. A breakdown of how each metric (commits, PRs, issues, reviews, stars, and followers) is weighted and normalized.
  3. How the cumulative distribution function (CDF) for the exponential and log-normal distributions is applied to the individual metrics.
  4. Clarification on the global percentile calculation, including how the percentiles for each statistic are combined.
  5. How the final percentile is mapped to a rank (S, A+, A, etc.) based on the thresholds.

Describe alternatives you've considered

Currently, the only available explanation is the brief overview in the README, which does not go into detail about how each metric is treated and how the overall rank is calculated. Without this, it’s difficult for users to fully understand the underlying calculations.

Additional context

The current explanation in the README mentions that the ranks are based on the Japanese academic grading system and provide percentile thresholds for each rank (S, A+, A, etc.), but additional context on how the percentiles are weighted and calculated would improve transparency and help users interpret their ranks with more confidence.

It would be great if this explanation could be included in the documentation, or at least provide a reference to the code (e.g., src/calculateRank.js).

@SinaAboutalebi SinaAboutalebi added the enhancement New feature or request. label Mar 18, 2025
@ZjzMisaka
Copy link

calculateRank.js may help you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request.
Projects
None yet
Development

No branches or pull requests

2 participants