https://github.com/valcol/git-activity-stats
Grab a Github contributions calendar and extact stats from it.
https://github.com/valcol/git-activity-stats
activity commit contributions-calendar github statistics stats streak
Last synced: 5 days ago
JSON representation
Grab a Github contributions calendar and extact stats from it.
- Host: GitHub
- URL: https://github.com/valcol/git-activity-stats
- Owner: valcol
- License: mit
- Created: 2016-10-13T15:05:57.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-22T13:39:06.000Z (over 9 years ago)
- Last Synced: 2025-10-11T23:22:41.912Z (4 months ago)
- Topics: activity, commit, contributions-calendar, github, statistics, stats, streak
- Language: JavaScript
- Homepage:
- Size: 9.77 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# git-activity-stats
Grab a Github contributions calendar and extact stats from it.
Based on [GithubStats](https://github.com/akerl/githubstats)
## Features
Extract :
* Contributions calendar
* Max number of commit per day
* Mean
* All streaks
* Max streak(s)
* Current streak
* Quartiles boundaries
## Installation
`npm install git-activity-stats`
## Usage
```javascript
let gitactivitystats = require('git-activity-stats');
//Get contributions from the user
gitactivitystats.getContributions('valcol', function(error, contrib){
// Contributions array, day as index, number of commit as value
let contributions = contrib.contributions;
//First date of the contributions calendar
let startDate = contrib.startDate;
//Max. number of contributions per day
let max = gitactivitystats.getMax(contributions);
//Mean of the contributions
let mean = gitactivitystats.getMean(contributions);
//All streaks
let streaks = gitactivitystats.getStreaks(contributions, startDate);
for (let i=0;i