Skip to contents

Get started puts the cards on your GitHub profile, where a GitHub Actions workflow draws them every week. rghcard plots the same cards in R, on your computer: this article collects the statistics of your GitHub account, keeps them as CSV files, and plots the cards from them as SVG or PNG files. Its code runs as it is in the console of RStudio, Positron or R.

Install rghcard

install.packages("rghcard", repos = c(
  "https://sedzinfo.r-universe.dev",
  "https://cloud.r-project.org"
))

This also installs the packages that rghcard needs: gh, which reads from GitHub, and rsvg, which turns a card into a PNG. The README has the other ways to install it, and how to install R.

A token

GitHub shows the page views and clones of a repository only to those who can push to it, so rghcard reads them with a token of yours: a password that lets a program read from GitHub for you. The gh package, which rghcard uses, finds it by itself, if you have one. See whether you do:

gh::gh_whoami()

It prints your user name and the scopes of your token, or says that there is no token. Then create one with this link, which fills in GitHub’s form: the name rghcard and the scope repo, which the page views and clones need. Choose when it expires, click Generate token, copy the token, and give it to R:

gitcreds::gitcreds_set()

It asks for the token and keeps it in the credential store of your computer, where gh, and git, find it in every R session. gitcreds_set() needs git; without it, put the token into the file .Renviron of your home folder, which file.edit("~/.Renviron") opens, as the line GITHUB_PAT= followed by the token, and restart R. Never write a token into a script, which others may read: anyone who has it can act as you on GitHub. When the token expires, create another the same way.

A fine-grained token, such as the one of the workflow in Get started, works too, but GitHub then leaves out your private contributions, so the cards can count fewer contributions than your profile does. contributions_token of collect_stats() then reads them with another token, such as a classic one.

Collect your statistics

library(rghcard)
stats <- collect_stats()
stats

collect_stats() reads the repositories you own, the public ones that are not forks, and your contributions since you joined GitHub: a minute or two for a few dozen repositories. It returns the statistics, for the cards to draw, and keeps them as CSV files in the folder rghcard-data of the working directory, which getwd() shows. There is a file for each of the 14 tables of the statistics, and meta.csv, with your user name, the day of the collection and the day you joined GitHub. These are the files of the made-up user that this article draws:

list.files(system.file("extdata", "example", package = "rghcard"))
#>  [1] "actions.csv"            "clones.csv"             "commits.csv"            "contribution_types.csv" "contributions.csv"      "languages.csv"          "meta.csv"              
#>  [8] "pages.csv"              "profile.csv"            "referrers.csv"          "releases.csv"           "repos.csv"              "stars.csv"              "traffic.csv"           
#> [15] "views.csv"

A spreadsheet opens them, and read_stats() reads them back into R, without asking GitHub, as in a new R session:

stats <- read_stats("rghcard-data")

GitHub keeps the page views and clones for 14 days only, so collect at least once a week, into the same folder: each collection adds the days since the one before, and the history keeps them all. include_private = TRUE and include_forks = TRUE add your private repositories and your forks; dir chooses another folder, and dir = NULL keeps nothing on disk. The help page of collect_stats() describes every argument, and Explore the data goes through the tables.

The six cards

Each card has its function, which plots it into a file: an SVG file when the name of the file ends in .svg, and a PNG file when it ends in .png. Without a file name, it writes a PNG into the working directory, such as rghcard-stats.png. Without the statistics either, it reads them from the history in rghcard-data, so after a collection, plot_stats_card() alone plots the statistics card. The cards here are those of get_example_stats(), the statistics of a made-up user, so that they plot without a token:

The help page of each function explains each number and chart of its card.

Contributions

The contributions, commits and streaks of the user, and the languages they commit in:

plot_contributions_card(stats, "rghcard-contributions.svg")
GitHub contributions of example-user Contributions: 4.1K (since Mar 2019), Last 12 months: 1.2K (contributions), Commits: 2.5K (public repositories), Current streak: 23 days (since 10 Nov), Longest streak: 41 days (7 Apr – 17 May 2025), 14 Mar 2019 – 3 Dec 2026.example-user· GitHub contributions14 Mar 2019 – 3 Dec 2026Contributions4.1Ksince Mar 2019Last 12 months1.2KcontributionsCommits2.5Kpublic repositoriesCurrent streak23 dayssince 10 NovLongest streak41 days7 Apr – 17 May 2025Contributionsper month, Dec 2025 – Nov 2026050100150200Dec 2025: 53 contributionsJan 2026: 94 contributionsFeb 2026: 72 contributionsMar 2026: 117 contributionsApr 2026: 97 contributionsMay 2026: 82 contributionsJun 2026: 123 contributionsJul 2026: 146 contributionsAug 2026: 57 contributionsSep 2026: 113 contributionsOct 2026: 94 contributionsNov 2026: 162 contributions162Dec 2025Nov 2026Languages by commitscommits per repository languageR: 1,781 commits (71.8%)Python: 267 commits (10.8%)HTML: 205 commits (8.3%)TeX: 155 commits (6.3%)Shell: 71 commits (2.9%)2.5KcommitsR71.8%Python10.8%HTML8.3%TeX6.3%Shell2.9%Languages by repositoriesrepositories per main languageR: 4 repositories (50%)HTML: 1 repository (12.5%)Python: 1 repository (12.5%)Shell: 1 repository (12.5%)TeX: 1 repository (12.5%)8repositoriesR50%HTML12.5%Python12.5%Shell12.5%TeX12.5%Contributions as the contribution graph of the GitHub profile counts them.rghcard · updated 3 Dec 2026

Statistics

The stars, page views, clones, release downloads and GitHub Actions runs of their repositories:

plot_stats_card(stats, "rghcard-stats.svg")
GitHub statistics of example-user Repositories: 8 (public), Stars: 101 (total), Page views: 1.1K (last 30 days), Clones: 1.4K (last 30 days), Release downloads: 599 (all time), Actions runs: 86 (last 30 days), 3 Nov – 2 Dec 2026.example-user· GitHub statistics3 Nov – 2 Dec 2026Repositories8publicStars101totalPage views1.1Klast 30 daysClones1.4Klast 30 daysRelease downloads599all timeActions runs86last 30 daysPage viewsper day, last 30 days0204060801003 Nov 2026: 47 page views4 Nov 2026: 30 page views5 Nov 2026: 26 page views6 Nov 2026: 53 page views7 Nov 2026: 22 page views8 Nov 2026: 9 page views9 Nov 2026: 37 page views10 Nov 2026: 38 page views11 Nov 2026: 33 page views12 Nov 2026: 32 page views13 Nov 2026: 29 page views14 Nov 2026: 14 page views15 Nov 2026: 20 page views16 Nov 2026: 52 page views17 Nov 2026: 36 page views18 Nov 2026: 40 page views19 Nov 2026: 39 page views20 Nov 2026: 82 page views21 Nov 2026: 23 page views22 Nov 2026: 15 page views23 Nov 2026: 43 page views24 Nov 2026: 55 page views25 Nov 2026: 39 page views26 Nov 2026: 37 page views27 Nov 2026: 61 page views28 Nov 2026: 16 page views29 Nov 2026: 22 page views30 Nov 2026: 33 page views1 Dec 2026: 47 page views2 Dec 2026: 42 page views823 Nov2 DecClonesper day, last 30 days0501003 Nov 2026: 51 clones4 Nov 2026: 68 clones5 Nov 2026: 51 clones6 Nov 2026: 57 clones7 Nov 2026: 25 clones8 Nov 2026: 24 clones9 Nov 2026: 43 clones10 Nov 2026: 66 clones11 Nov 2026: 67 clones12 Nov 2026: 48 clones13 Nov 2026: 60 clones14 Nov 2026: 25 clones15 Nov 2026: 22 clones16 Nov 2026: 62 clones17 Nov 2026: 65 clones18 Nov 2026: 58 clones19 Nov 2026: 48 clones20 Nov 2026: 86 clones21 Nov 2026: 19 clones22 Nov 2026: 22 clones23 Nov 2026: 48 clones24 Nov 2026: 65 clones25 Nov 2026: 45 clones26 Nov 2026: 48 clones27 Nov 2026: 41 clones28 Nov 2026: 19 clones29 Nov 2026: 19 clones30 Nov 2026: 64 clones1 Dec 2026: 58 clones2 Dec 2026: 52 clones863 Nov2 DecMost viewed repositoriespage views, last 30 daystidysurveytidysurvey: 434 page views434plotkitplotkit: 202 page views202shiny-weathershiny-weather: 143 page views143websitewebsite: 114 page views114workshop-2026workshop-2026: 88 page views88Clones include automated ones: GitHub Actions runs, package builders, app deployments.rghcard · updated 3 Dec 2026

Activity

Their pull requests, issues, reviews and followers, and their contributions by type and by day of the week:

plot_activity_card(stats, "rghcard-activity.svg")
GitHub activity of example-user Pull requests: 654 (since Mar 2019), Issues: 474 (since Mar 2019), Reviews: 356 (since Mar 2019), New repositories: 14 (since Mar 2019), Followers: 87 (following 41), 14 Mar 2019 – 3 Dec 2026.example-user· GitHub activity14 Mar 2019 – 3 Dec 2026Pull requests654since Mar 2019Issues474since Mar 2019Reviews356since Mar 2019New repositories14since Mar 2019Followers87following 41Contributions by typesince Mar 2019Commits: 2,479 contributions (60%)Pull requests: 654 contributions (15.8%)Issues: 474 contributions (11.5%)Reviews: 356 contributions (8.6%)Private: 155 contributions (3.8%)4.1KcontributionsCommits60%Pull requests15.8%Issues11.5%Reviews8.6%New repos0.3%Private3.8%Contributions by weekdayper weekday, Dec 2025 – Nov 20260100200300Mon: 180 contributionsTue: 210 contributionsWed: 234 contributionsThu: 184 contributionsFri: 214 contributionsSat: 85 contributionsSun: 103 contributions234MonTueWedThuFriSatSunMost committed repositoriescommits, since Mar 2019tidysurveytidysurvey: 783 commits783plotkitplotkit: 455 commits455shiny-weathershiny-weather: 270 commits270pyscriptspyscripts: 267 commits267websitewebsite: 205 commits205Contributions as the contribution graph of the GitHub profile counts them.rghcard · updated 3 Dec 2026

Visitors

The unique visitors and cloners of the last 14 days, the sites that sent them and the pages they viewed:

plot_visitors_card(stats, "rghcard-visitors.svg")
GitHub visitors of example-user Visitors: 176 (unique, last 14 days), Page views: 554 (last 14 days), Cloners: 190 (unique, last 14 days), Referring sites: 6 (last 14 days), Visited: 8 of 8 (repositories), 19 Nov – 2 Dec 2026.example-user· GitHub visitors19 Nov – 2 Dec 2026Visitors176unique, last 14 daysPage views554last 14 daysCloners190unique, last 14 daysReferring sites6last 14 daysVisited8 of 8repositoriesVisitorsunique per day, last 14 days020406019 Nov 2026: 18 visitors20 Nov 2026: 52 visitors21 Nov 2026: 11 visitors22 Nov 2026: 10 visitors23 Nov 2026: 23 visitors24 Nov 2026: 25 visitors25 Nov 2026: 21 visitors26 Nov 2026: 20 visitors27 Nov 2026: 32 visitors28 Nov 2026: 9 visitors29 Nov 2026: 10 visitors30 Nov 2026: 17 visitors1 Dec 2026: 23 visitors2 Dec 2026: 22 visitors5219 Nov2 DecReferring sitespage views, last 14 daysgoogle.comgoogle.com: 103 page views103github.comgithub.com: 67 page views67example-user.r-universe.devexample-user.r-universe.dev: 22 page views22stackoverflow.comstackoverflow.com: 9 page views9fosstodon.orgfosstodon.org: 6 page views6Most viewed pagespage views, last 14 daystidysurveytidysurvey: 98 page views98plotkitplotkit: 52 page views52shiny-weathershiny-weather: 33 page views33tidysurvey/issuestidysurvey/issues: 24 page views24websitewebsite: 18 page views18GitHub counts visitors per repository: a visitor of two counts twice.rghcard · updated 3 Dec 2026

GitHub Actions

Their GitHub Actions runs: how many succeeded and failed, how long they took, and the busiest workflows:

plot_actions_card(stats, "rghcard-actions.svg")
GitHub Actions of example-user Runs: 86 (last 30 days), Succeeded: 90% (of 86 finished), Failed: 9 (last 30 days), Run time: 9.8 h (last 30 days), Workflows: 4 (in 4 repositories), 3 Nov – 2 Dec 2026.example-user· GitHub Actions3 Nov – 2 Dec 2026Runs86last 30 daysSucceeded90%of 86 finishedFailed9last 30 daysRun time9.8 hlast 30 daysWorkflows4in 4 repositoriesGitHub Actions runsper day, last 30 days024683 Nov 2026: 3 runs4 Nov 2026: 7 runs5 Nov 2026: 2 runs6 Nov 2026: 4 runs7 Nov 2026: 1 run8 Nov 2026: 2 runs9 Nov 2026: 2 runs10 Nov 2026: 4 runs12 Nov 2026: 2 runs13 Nov 2026: 4 runs14 Nov 2026: 2 runs15 Nov 2026: 1 run16 Nov 2026: 3 runs17 Nov 2026: 5 runs18 Nov 2026: 2 runs19 Nov 2026: 7 runs20 Nov 2026: 3 runs21 Nov 2026: 2 runs22 Nov 2026: 2 runs23 Nov 2026: 4 runs25 Nov 2026: 3 runs26 Nov 2026: 4 runs27 Nov 2026: 2 runs28 Nov 2026: 2 runs29 Nov 2026: 4 runs30 Nov 2026: 3 runs1 Dec 2026: 3 runs2 Dec 2026: 3 runs73 Nov2 DecBusiest workflowsruns, last 30 daysR-CMD-checkR-CMD-check: 60 runs60pages build and deploymentpages build and deployment: 19 runs19Deploy appDeploy app: 7 runs7Run time by repositorystart to end of the runs, last 30 daystidysurveytidysurvey: 5.3 h of runs5.3 hplotkitplotkit: 3.8 h of runs3.8 hshiny-weathershiny-weather: 27 min of runs27 minwebsitewebsite: 19 min of runs19 minRun time: from the start of each run to its end, not the minutes GitHub bills.rghcard · updated 3 Dec 2026

Code

The size of their code in each language, their largest repositories, their stars month by month, and their forks and watchers:

plot_code_card(stats, "rghcard-code.svg")
GitHub code of example-user Code: 1.1 MB (in 8 repositories), Languages: 10 (mostly R), Stars: 101 (+38 in 12 months), Forks: 19 (total), Watchers: 18 (total), 3 Dec 2026.example-user· GitHub code3 Dec 2026Code1.1 MBin 8 repositoriesLanguages10mostly RStars101+38 in 12 monthsForks19totalWatchers18totalLanguages by code sizebytes of code per languageR: 731 KB of code (63.6%)TeX: 238 KB of code (20.7%)HTML: 59.8 KB of code (5.2%)Python: 41.2 KB of code (3.6%)C++: 37.3 KB of code (3.2%)Other: 41.2 KB of code (3.6%)1.1 MBof codeR63.6%TeX20.7%HTML5.2%Python3.6%C++3.2%Other3.6%Starstotal at the end of each month050100150Dec 2025: 66 starsJan 2026: 70 starsFeb 2026: 70 starsMar 2026: 72 starsApr 2026: 76 starsMay 2026: 78 starsJun 2026: 82 starsJul 2026: 83 starsAug 2026: 87 starsSep 2026: 89 starsOct 2026: 95 starsNov 2026: 101 stars101Dec 2025Nov 2026Largest repositoriesbytes of codetidysurveytidysurvey: 440 KB of code440 KBthesisthesis: 268 KB of code268 KBplotkitplotkit: 158 KB of code158 KBshiny-weathershiny-weather: 102 KB of code102 KBwebsitewebsite: 72.9 KB of code72.9 KBCode as GitHub's language bars count it: without documentation, vendored or generated files.rghcard · updated 3 Dec 2026

SVG, PNG or SVG code

The end of the file name chooses the format:

  • .svg: sharp at any size, and about a tenth of the size of a PNG. Its text takes the fonts of the screen that shows it, as GitHub’s own pages do.
  • .png: a picture, for places that take no SVG files, such as some social networks and slides. Its text takes the fonts of your computer, and it has twice as many pixels as width, so that it stays sharp on high-resolution screens.
plot_stats_card(stats, "rghcard-stats.svg")
plot_stats_card(stats, "rghcard-stats.png")

A file name may hold a folder, such as "cards/rghcard-stats.svg", and a folder that does not exist yet is created. file = NULL writes no file but returns the SVG code, to put the card into a web page that R makes, such as an R Markdown or Quarto document, as this article does, or a Shiny app:

# in a chunk of an R Markdown or Quarto document
knitr::raw_html(plot_stats_card(stats, file = NULL))

# in the user interface of a Shiny app
shiny::HTML(plot_stats_card(stats, file = NULL))

A card is 900 pixels wide, so on a narrower screen it needs this CSS, as in this article, to shrink with the page:

svg[role="img"] { max-width: 100%; height: auto; }

See a card in RStudio or Positron

view_card() shows a card in the Viewer pane of RStudio or Positron:

view_card("rghcard-stats.svg")

The Viewer shows it as a web page: sharp at any size, shrunk to fit the pane, and telling the value of each column and bar when you point at it. In R on its own, view_card() opens your web browser instead. The Plots pane shows the card as a picture, as a GitHub profile does, without the values:

view_card("rghcard-stats.svg", "plots")

view_card() takes what the card functions return, so it also shows a card as it is plotted, into a file or, with file = NULL, without one:

view_card(plot_stats_card(stats, "rghcard-stats.svg"))
view_card(plot_stats_card(stats, file = NULL), "plots")

Choose the charts

Under its key figures, a card has one to three charts, which panels chooses. Any card can show any of the 23 charts, whichever card they come from; its key figures stay its own. One chart takes the whole width of the card:

plot_stats_card(stats, "rghcard-views.svg", panels = "views")
GitHub statistics of example-user Repositories: 8 (public), Stars: 101 (total), Page views: 1.1K (last 30 days), Clones: 1.4K (last 30 days), Release downloads: 599 (all time), Actions runs: 86 (last 30 days), 3 Nov – 2 Dec 2026.example-user· GitHub statistics3 Nov – 2 Dec 2026Repositories8publicStars101totalPage views1.1Klast 30 daysClones1.4Klast 30 daysRelease downloads599all timeActions runs86last 30 daysPage viewsper day, last 30 days0204060801003 Nov 2026: 47 page views4 Nov 2026: 30 page views5 Nov 2026: 26 page views6 Nov 2026: 53 page views7 Nov 2026: 22 page views8 Nov 2026: 9 page views9 Nov 2026: 37 page views10 Nov 2026: 38 page views11 Nov 2026: 33 page views12 Nov 2026: 32 page views13 Nov 2026: 29 page views14 Nov 2026: 14 page views15 Nov 2026: 20 page views16 Nov 2026: 52 page views17 Nov 2026: 36 page views18 Nov 2026: 40 page views19 Nov 2026: 39 page views20 Nov 2026: 82 page views21 Nov 2026: 23 page views22 Nov 2026: 15 page views23 Nov 2026: 43 page views24 Nov 2026: 55 page views25 Nov 2026: 39 page views26 Nov 2026: 37 page views27 Nov 2026: 61 page views28 Nov 2026: 16 page views29 Nov 2026: 22 page views30 Nov 2026: 33 page views1 Dec 2026: 47 page views2 Dec 2026: 42 page views823 Nov2 DecClones include automated ones: GitHub Actions runs, package builders, app deployments.rghcard · updated 3 Dec 2026

Two or three share it, in the order given. Here the code card shows the bytes of code per language next to the commits per language, a chart of the contributions card:

plot_code_card(stats, "rghcard-code.svg",
               panels = c("code_languages", "commit_languages"))
GitHub code of example-user Code: 1.1 MB (in 8 repositories), Languages: 10 (mostly R), Stars: 101 (+38 in 12 months), Forks: 19 (total), Watchers: 18 (total), 3 Dec 2026.example-user· GitHub code3 Dec 2026Code1.1 MBin 8 repositoriesLanguages10mostly RStars101+38 in 12 monthsForks19totalWatchers18totalLanguages by code sizebytes of code per languageR: 731 KB of code (63.6%)TeX: 238 KB of code (20.7%)HTML: 59.8 KB of code (5.2%)Python: 41.2 KB of code (3.6%)C++: 37.3 KB of code (3.2%)Other: 41.2 KB of code (3.6%)1.1 MBof codeR63.6%TeX20.7%HTML5.2%Python3.6%C++3.2%Other3.6%Languages by commitscommits per repository languageR: 1,781 commits (71.8%)Python: 267 commits (10.8%)HTML: 205 commits (8.3%)TeX: 155 commits (6.3%)Shell: 71 commits (2.9%)2.5KcommitsR71.8%Python10.8%HTML8.3%TeX6.3%Shell2.9%Code as GitHub's language bars count it: without documentation, vendored or generated files.rghcard · updated 3 Dec 2026

These are the charts, under the card that shows each of them by default, whose help page explains them:

Card Chart What it shows
plot_contributions_card() "contributions" Contributions per month, in the last 12 months
"commit_languages" Commits per language, as a ring
"languages" Repositories per main language, as a ring
plot_stats_card() "views" Page views per day
"clones" Clones per day
"actions" GitHub Actions runs per day
"top_viewed" The five repositories with the most page views
"top_cloned" The five repositories with the most clones
"top_starred" The five repositories with the most stars
plot_activity_card() "contribution_types" Contributions by type, as a ring
"weekdays" Contributions per day of the week, in the last 12 months
"top_committed" The five repositories with the most commits of the user
plot_visitors_card() "visitors" Unique visitors per day
"referrers" The five sites that sent the most page views
"top_pages" The five most viewed pages
plot_actions_card() "top_workflows" The five workflows with the most runs
"run_time" The five repositories whose runs took longest
"top_failed" The five workflows with the most failed runs
plot_code_card() "code_languages" Bytes of code per language, as a ring
"stars_history" Stars at the end of each month, in the last 12 months
"largest" The five repositories with the most code
"top_forked" The five repositories with the most forks
"top_watched" The five repositories with the most watchers

A name that rghcard does not know stops the card, with the list of them all:

plot_stats_card(stats, "rghcard-stats.svg", panels = "view")
#> Error:
#> ! `panels` must be one to three of: views, clones, actions, top_viewed, top_cloned, top_starred, languages, contributions, commit_languages, contribution_types, weekdays, top_committed, visitors, referrers, top_pages, top_workflows, run_time, top_failed, code_languages, stars_history, largest, top_forked, top_watched.

Theme, days, title and size

These options change a card:

  • theme = "light" plots the card in the colors of GitHub’s light mode, and "dark", the default, in those of its dark mode.
  • days sets the days of the page views, clones and runs of plot_stats_card() and of the runs of plot_actions_card(): the last 30 by default, up to the day before the collection, the last day that GitHub had finished counting.
  • title replaces the user name and the name of the card at the top left.
  • width is the width of the card in pixels, 900 by default; its height follows.
plot_actions_card(stats, "rghcard-actions-light.svg", theme = "light",
                  days = 14, title = "My workflows", width = 700)
GitHub Actions of example-user Runs: 42 (last 14 days), Succeeded: 90% (of 42 finished), Failed: 4 (last 14 days), Run time: 4.9 h (last 14 days), Workflows: 4 (in 4 repositories), 19 Nov – 2 Dec 2026.My workflows19 Nov – 2 Dec 2026Runs42last 14 daysSucceeded90%of 42 finishedFailed4last 14 daysRun time4.9 hlast 14 daysWorkflows4in 4 repositoriesGitHub Actions runsper day, last 14 days0246819 Nov 2026: 7 runs20 Nov 2026: 3 runs21 Nov 2026: 2 runs22 Nov 2026: 2 runs23 Nov 2026: 4 runs25 Nov 2026: 3 runs26 Nov 2026: 4 runs27 Nov 2026: 2 runs28 Nov 2026: 2 runs29 Nov 2026: 4 runs30 Nov 2026: 3 runs1 Dec 2026: 3 runs2 Dec 2026: 3 runs719 Nov2 DecBusiest workflowsruns, last 14 daysR-CMD-checkR-CMD-check: 30 runs30pages build and deploymentpages build and deployment: 8 runs8Deploy appDeploy app: 4 runs4Run time by repositorystart to end of the runs, last 14 daystidysurveytidysurvey: 2.7 h of runs2.7 hplotkitplotkit: 1.8 h of runs1.8 hshiny-weathershiny-weather: 16 min of runs16 minwebsitewebsite: 8 min of runs8 minRun time: from the start of each run to its end, not the minutes GitHub bills.rghcard · updated 3 Dec 2026

Another user’s cards

collect_stats() also reads the statistics of any other GitHub user:

octocat <- collect_stats(user = "octocat", dir = NULL)
plot_contributions_card(octocat, "octocat-contributions.svg")

GitHub shows the traffic of a repository only to its owner, so the cards of another user have no page views, clones or visitors, and the statistics card shows other figures and charts in their place. Without a token, GitHub answers 60 requests an hour, enough for the public statistics of a few repositories: each takes about four, and one with stars one more for every 30 weeks since it was created. A token of yours allows 5,000, and adds the contributions, which GitHub gives only to requests with a token.