#! /usr/bin/env python ''' Adapted from here: https://raw.github.com/bigsnarfdude/github_team_calendars/master/data_geeks_team_calendar.ipynb Python program to scrape friends github to build team calendar for github Note, this only refers to public repos. ''' import json import requests import pandas as pd def line_draw_target(target): github_url = 'https://github.com/users/%s/contributions_calendar_data' r = requests.get(github_url % target) data = json.loads(r.text) dates, contributions = zip(*data) ts = pd.Series(contributions, index=dates) plt.plot(ts) print ts.describe() print "distribution of commit counts" print ts.value_counts().sort_index() target = "lexual" line_draw_target(target) target = "mafrosis" line_draw_target(target) target = "ajfisher" line_draw_target(target) target = "van-jba" line_draw_target(target) target = "wesm" # pandas dude line_draw_target(target) target = "thatch45" # salt dude. line_draw_target(target) target = "stephenmcd" # Mezzanine dude. line_draw_target(target)