Code Monkey home page Code Monkey logo

4r's Introduction

4r - exploring pull requests data with R

Explore pull requests data from GitHub repository and try to get some insights using R.

Some of the questions I was pondering about:

  • What's my cycle time? - How long it takes to the merge a pull request into master (start_date is the date of first commit)
  • Number of pull request per contributor
  • Mean/Median number of commits per PR
  • Mean/Median number of commits per contributor
  • Mean/Median number of comments per PR
  • Mean/Median number of comments per contributor
  • Number of changed files per PR
  • Number of changed files per contributor
  • Pull requests trend over a period of time
  • ...

How to use it

You need to set up .netrc file in your home directory:

machine api.github.com
  login ....
  password ....

and then:

  bundle install
  bundle exec import.rb "user/repo_name"

Depending on the amount of pull requests in the repository, it might take some time.

It might happen that your rate limit will exceed, in that case script will wait 1 hour, and resume the import.

Caching

All requests are cached, so even if we the script is started again it won't re-use the rate limit for already cached PRs.

(If you willing to add a new field to CSV, you just need to modify PullRequestRecord::ATTRIBUTES)

R - Analysis

To install rstudio and r on Mac:

  brew tap homebrew/science
  brew install r
  # install brew cask
  brew cask install rstudio

R scripts

...

4r's People

Contributors

sparrovv avatar

Stargazers

Artur Trzop avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.