stMind

about Tech, Computer vision and Machine learning

Github Data Challenge

The GitHub Data Challenge

Github Public Timelineに流れるイベントのデータを使って遊ぼうよ!というコンテストがあるみたいです。

  • To Enter
    • data@github.comにgistへのリンクとグラフを説明を添えて送る
    • 期限は5/21
  • Prizes
    • Githubのスタッフによる投票で、トップ3に入ると素敵なプレゼントが!
      • Github Shopでのお買い物券$200, $100, $50

Github Public Timelineのデータは、Google bigqueryから分析できるようになっていて、データをアーカイブしているGithub Archiveによると、API Projectから

  1. Switch to project
  2. Display Project
  3. githubarchiveを追加

とすれば準備OKで、後はCompose Queryでクエリを発行すると結果を得ることが出来るようになってます。

f:id:satojkovic:20120509014544p:image:w640

いくつかクエリのサンプルを試してみました。

  • イベントの分布
    • PushEventが一番多くて、CreateとWatchがそれに続く
/* distribution of different events on GitHub */
SELECT type, count(type) as cnt
FROM [githubarchive:github.timeline]
GROUP BY type
ORDER BY cnt DESC

f:id:satojkovic:20120509014548p:image

  • rubyに絞った場合のイベントの分布
    • Pushは変わらず、CreateとIssueCommentがそれに続く
/* distribution of different events on GitHub for Ruby */
SELECT type, count(type) as cnt
FROM [githubarchive:github.timeline]
WHERE repository_language="Ruby"
GROUP BY type
ORDER BY cnt DESC

f:id:satojkovic:20120509014549p:image

簡単に遊べるので、色々試して何か送ってみるかな!