Four cards take a closer look at what the contributions card and the statistics card sum up: how a user
contributes, who visits their repositories, how their GitHub Actions
runs go and what their code is made of. Each has a row of key figures
and up to three charts, as the other two have. This article explains
each of their numbers and charts. Get started
shows how to collect your own statistics and put the cards on your
profile.
The pull requests the user opened since they joined GitHub.
Issues
The issues they opened.
Reviews
The reviews they gave to pull requests.
New repositories
The repositories they created.
Followers
The users who follow them, with the number of users they follow
under it.
The contributions are those of the contribution graph of the profile.
The charts are:
"contribution_types": the contributions since the user
joined GitHub by type, as a ring with a legend of the shares: commits,
pull requests, issues, reviews, new repositories (“New repos”), and the
contributions to private repositories that the profile shows as bare
numbers (“Private”). Each type has a colour of its own, the same on
every card and whatever the other types, and the types without
contributions are left out. A type with a tiny share, such as a few new
repositories among thousands of commits, is too thin to see in the ring,
but the legend still has it. The ring adds up the totals that GitHub
gives for each type, so its total can differ a little from the
contributions of the contributions card, which come from the
contribution graph.
"weekdays": the contributions of each day of the week
in the 12 full months before the collection, Monday first. The days are
UTC days, as GitHub counts them, so work late in the evening in America
counts on the next day.
"top_committed": the five repositories with the most
commits of the user since they joined GitHub. A repository of someone
else starts with its owner, such as r-lib/gh. The commits
in private repositories count only when collect_stats() was
asked for them.
The visitors card
visitors_card() draws who visits the repositories and
where they come from:
The unique visitors of the repositories in the last 14 days.
Page views
The views of their pages in those days.
Cloners
The unique cloners of the repositories in those days.
Referring sites
The sites that sent visitors to any of the repositories.
Visited
How many of the repositories had visitors.
GitHub gives the sites that send visitors to a repository, and its
most viewed pages, only for its last 14 days as a whole, ten of each, so
this card always covers 14 days. GitHub also counts the visitors of each
repository on its own: someone who visits two repositories counts twice,
as the card says under its charts. The charts are:
"visitors": the unique visitors of each day, as
columns. Someone who comes back on another day counts on both, so the
columns add up to more than the visitors of the key figures.
"referrers": the five sites that sent the most page
views, such as search engines, GitHub itself and the sites that link to
the repositories.
"top_pages": the five most viewed pages, each named by
its path on GitHub without the user name: tidysurvey is the
front page of the repository tidysurvey, and
tidysurvey/issues its list of issues.
The history keeps the referring sites and the pages of each
collection, in the referrers and pages tables,
so it can show how they change beyond the 14 days. Like the page views,
all of this needs a token of the user, and the names of the visitors are
never collected: GitHub does not give them.
The GitHub Actions card
actions_card() draws the GitHub Actions runs of the
repositories:
The runs of the workflows of the repositories, in the days of the
card.
Succeeded
The share of the finished runs that succeeded.
Failed
The runs that failed, timed out or could not start.
Run time
The time that the runs took, each from its start to its end.
Workflows
The workflows that ran, and the repositories they ran in.
A run is finished when it succeeded or failed: one still going,
cancelled or skipped is left out of the share. A share just under 100%
shows as 99%, and one just over 0% as 1%, so that neither a failure nor
a success hides. The run time is what a clock measures, not the minutes
that GitHub bills, which add up the jobs of a run that run side by side
and are free in public repositories. Runs collected before rghcard 0.4.0
have no times: until they are older than the days of the card, the run
time counts the runs that have them, and says how many.
The days are the last 30, as on the statistics card, and
days changes them. The charts are:
"actions": the runs of each day, as columns, as on the
statistics card.
"top_workflows": the five workflows with the most runs.
Workflows of the same name in several repositories, such as
R-CMD-check, count together.
"run_time": the five repositories whose runs took the
longest.
"top_failed": the five workflows with the most failed
runs, which can take the place of one of the others:
actions_card(stats, "rghcard-actions.svg", days =14, panels =c("actions", "top_failed", "run_time"))
The code card
code_card() draws what the code of the repositories is
made of:
The bytes of code in the repositories, and how many repositories
have any.
Languages
The languages of the code, and the one with the most of it.
Stars
The stars of the repositories, and how many of them were given in
the last 12 months.
Forks
The forks of the repositories.
Watchers
The users who watch the repositories, whom GitHub tells of what
happens in them.
GitHub counts the code of each language as in the language bar of a
repository: without documentation, vendored and generated files. The
charts are:
"code_languages": the bytes of code per language, as a
ring with a legend of the shares, five languages at most and the rest
together as “Other”, each in the colour that GitHub gives the language.
The rings of the contributions card count repositories and commits; this
one counts the code itself, so a large repository counts more than a
small one.
"stars_history": the stars at the end of each of the 12
full months before the collection, as columns. GitHub keeps the time of
the stars still given, so a star taken back is gone from every
month.
"largest": the five repositories with the most
code.
"top_forked" and "top_watched": the five
repositories with the most forks or watchers, which can take the place
of one of the others.
Charts of other cards
Any card can show the charts of any other: panels
chooses one to three of all of them. The statistics card lists its charts, the contributions card
its own, and Draw the cards in R all 23
in one table: