Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rempsyc/githubcontributors

Helps obtain and order GitHub user contributions, which can be used for example to determine or inform authorship order for R packages.
https://github.com/rempsyc/githubcontributors

Last synced: 3 days ago
JSON representation

Helps obtain and order GitHub user contributions, which can be used for example to determine or inform authorship order for R packages.

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# githubContributors

The goal of githubContributors is to help obtain and order GitHub user contributions, which can be used for example to determine or inform authorship order for R packages.

## Installation

You can install the development version of githubContributors like so:

``` r
# If package `remotes` isn't already installed, install it with `install.packages("remotes")`
remotes::install_github("rempsyc/githubContributors")
```

## Example

Here are a few examples for easystats or other teams:

```{r example}
library(githubContributors)

report <- get_contributions("report", user = "easystats")
order_authors(report)

datawizard <- get_contributions("datawizard", user = "easystats")
order_authors(datawizard)

performance <- get_contributions("performance", user = "easystats")
order_authors(performance)

lavaan <- get_contributions("lavaan", user = "yrosseel")
order_authors(lavaan)

dplyr <- get_contributions("dplyr", user = "tidyverse")
order_authors(dplyr)

ggplot2 <- get_contributions("ggplot2", user = "tidyverse")
order_authors(ggplot2)

```

## Troubleshooting

If you get the following error:

```
Error in `resp_body_raw()`:
! Can not retrieve empty body
```

Please visit the GitHub page on a browser to manually update the data. Once the new data is loaded, try again, it should work.

## Credits

Most of the code for this package was contributed by [StackOverFlow user Chamkrai](https://stackoverflow.com/questions/75277192/how-can-i-web-scrape-github-project-contributor-information-in-r/75277425#75277425).