Libraries.io Open Dataから もっとも利用されているgem の上位20位を取得し、その中で日本在住のコントリビューターが何人いるか調べてみた。
もっとも利用されているgemの上位20位までは下記の通り。
+------------------+--------------------------+------------------------+-------------------------------+----------------------------------------+-----------------------------------------------+
| left(`Name`, 50) | Dependent Projects Count | Repository Stars Count | Repository Contributors Count | left(`Repository Name with Owner`, 50) | left(`Repository URL`, 50) |
+------------------+--------------------------+------------------------+-------------------------------+----------------------------------------+-----------------------------------------------+
| rake | 74892 | 1627 | 164 | ruby/rake | https://github.com/ruby/rake |
| bundler | 67413 | 4762 | 628 | bundler/bundler | https://github.com/bundler/bundler |
| rspec | 55095 | 2559 | 21 | rspec/rspec | https://github.com/rspec/rspec |
| pry | 12848 | 5426 | 157 | pry/pry | https://github.com/pry/pry |
| rails | 12290 | 44743 | 2647 | rails/rails | https://github.com/rails/rails |
| activesupport | 11998 | 44743 | 2647 | rails/rails | https://github.com/rails/rails |
| minitest | 11740 | 2703 | 2 | seattlerb/minitest | https://github.com/seattlerb/minitest |
| simplecov | 10864 | 3883 | 162 | colszowka/simplecov | https://github.com/colszowka/simplecov |
| sqlite3 | 8694 | 526 | 55 | sparklemotion/sqlite3-ruby | https://github.com/sparklemotion/sqlite3-ruby |
| rubocop | 8480 | 10493 | 601 | rubocop-hq/rubocop | https://github.com/rubocop-hq/rubocop |
| json | 7829 | 548 | 65 | flori/json | https://github.com/flori/json |
| nokogiri | 7452 | 5328 | 168 | sparklemotion/nokogiri | https://github.com/sparklemotion/nokogiri |
| webmock | 7166 | 3238 | 196 | bblimke/webmock | https://github.com/bblimke/webmock |
| yard | 6601 | 1542 | 117 | lsegal/yard | https://github.com/lsegal/yard |
| jeweler | 6501 | 1482 | 73 | technicalpickles/jeweler | https://github.com/technicalpickles/jeweler |
| thor | 5845 | 4434 | 173 | erikhuda/thor | https://github.com/erikhuda/thor |
| activerecord | 5503 | 44743 | 2647 | rails/rails | https://github.com/rails/rails |
| rdoc | 4971 | 568 | 78 | ruby/rdoc | https://github.com/ruby/rdoc |
| rspec-rails | 4499 | 4152 | 284 | rspec/rspec-rails | https://github.com/rspec/rspec-rails |
| guard-rspec | 4428 | 1171 | 91 | guard/guard-rspec | https://github.com/guard/guard-rspec |
+------------------+--------------------------+------------------------+-------------------------------+----------------------------------------+-----------------------------------------------+
注意点
GitHub APIの仕様上、コントリビューターの人数がとても多いリポジトリについては全員分は取得できないようです。ただし、コントリビューター数の降順でソートされているため、上位の貢献者は正しく集計できています。
rake
rubygemsに含まれており、正確なコントリビューター数が分からないためスキップ。
bundler
rubygemsに含まれており、正確なコントリビューター数が分からないためスキップ。
rspec (rspec/rspec-core)
※rspecはさらに分割されているため、代表してrspec-coreを集計しました。
rspec-coreのコントリビューター 274人のうち、日本在住の方は16名でした。そのうち上位5名は下記の通りです。
yujinakayama (Yuji Nakayama) 55 contributions
moro (MOROHASHI Kyosuke) 5 contributions
JuanitoFatas (Juanito Fatas) 2 contributions
walf443 (Keiji, Yoshimi) 2 contributions
yui-knk (Yuichiro Kaneko) 2 contributions
pry (pry/pry)
pryのコントリビューター 158人のうち、日本在住の方は8名でした。そのうち上位5名は下記の通りです。
yui-knk (Yuichiro Kaneko) 62 contributions
amatsuda (Akira Matsuda) 3 contributions
tricknotes (Ryunosuke Sato) 2 contributions
mtsmfm (Fumiaki MATSUSHIMA) 1 contributions
eagletmt (Kohei Suzuki) 1 contributions
rails
多すぎて時間がかかるためスキップ。
activesupport
多すぎて時間がかかるためスキップ。
minitest (seattlerb/minitest)
メインコミッタがコードを書き直してコミットしており、正確なコントリビューター数が分からないためスキップ。
simplecov (colszowka/simplecov)
simplecovのコントリビューター 167人のうち、日本在住の方は18名でした。そのうち上位5名は下記の通りです。
amatsuda (Akira Matsuda) 46 contributions
yui-knk (Yuichiro Kaneko) 4 contributions
ryu39 (ryu39) 3 contributions
hanazuki (Kasumi Hanazuki) 2 contributions
yujinakayama (Yuji Nakayama) 2 contributions
sqlite3 (sparklemotion/sqlite3-ruby)
sqlite3のコントリビューター 54人のうち、日本在住の方は4名でした。
gazayas (Gabriel Zayas) 14 contributions
nobu (Nobuyoshi Nakada) 4 contributions
yahonda (Yasuo Honda) 2 contributions
kamipo (Ryuta Kamizono) 1 contributions
rubocop (rubocop-hq/rubocop)
rubocopのコントリビューター 416人のうち、日本在住の方は30名でした。そのうち上位5名は下記の通りです。
koic (Koichi ITO) 693 contributions
yujinakayama (Yuji Nakayama) 363 contributions
pocke (Masataka Pocke Kuwabara) 271 contributions
hoshinotsuyoshi (hoshino tsuyoshi) 39 contributions
wata727 (Kazuma Watanabe) 28 contributions
json
rubygemsに含まれており、正確なコントリビューター数が分からないためスキップ。
nokogiri (sparklemotion/nokogiri)
nokogiriのコントリビューター 167人のうち、日本在住の方は16名でした。そのうち上位5名は下記の通りです。
knu (Akinori MUSHA) 253 contributions
nobu (Nobuyoshi Nakada) 25 contributions
kou (Sutou Kouhei) 4 contributions
iwadon (IWATSUKI Hiroyuki) 3 contributions
eitoball (Eito Katagiri) 2 contributions
webmock (bblimke/webmock)
webmockのコントリビューター 189人のうち、日本在住の方は9名でした。そのうち上位5名は下記の通りです。
koic (Koichi ITO) 7 contributions
hsbt (Hiroshi SHIBATA) 4 contributions
uiur (Kazato Sugimoto) 3 contributions
taiki45 (Taiki Ono) 3 contributions
rochefort (rochefort) 3 contributions
yard (lsegal/yard)
yardのコントリビューター 112人のうち、日本在住の方は13名でした。そのうち上位5名は下記の通りです。
kou (Sutou Kouhei) 40 contributions
amatsuda (Akira Matsuda) 12 contributions
koic (Koichi ITO) 2 contributions
tomoasleep (Tomoya Chiba) 2 contributions
toshimaru (Toshimaru) 2 contributions
jeweler (technicalpickles/jeweler)
jewelerのコントリビューター 67人のうち、日本在住の方は2名でした。
muratayusuke (Yusuke Murata) 35 contributions
amatsuda (Akira Matsuda) 1 contributions
thor (erikhuda/thor)
thorのコントリビューター 165人のうち、日本在住の方は14名でした。そのうち上位5名は下記の通りです。
takkanm (Mitsutaka Mimura) 4 contributions
akm (Takeshi Akima) 4 contributions
koic (Koichi ITO) 2 contributions
hsbt (Hiroshi SHIBATA) 2 contributions
amatsuda (Akira Matsuda) 1 contributions
activerecord
多すぎて時間がかかるためスキップ。
rdoc
rubygemsに含まれており、正確なコントリビューター数が分からないためスキップ。
rspec-rails (rspec/rspec-rails)
rspec-railsのコントリビューター 290人のうち、日本在住の方は20名でした。そのうち上位5名は下記の通りです。
yujinakayama (Yuji Nakayama) 25 contributions
takashi (Takashi Nakagawa) 4 contributions
okuramasafumi (OKURA Masafumi) 3 contributions
hasimo (Tohru Hashimoto ) 2 contributions
ta1kt0me () 2 contributions
guard-rspec (guard/guard-rspec)
guard-rspecのコントリビューター 83人のうち、日本在住の方は7名でした。そのうち上位5名は下記の通りです。
yujinakayama (Yuji Nakayama) 3 contributions
chocoby (Kenta Okamoto) 2 contributions
pocke (Masataka Pocke Kuwabara) 1 contributions
odaillyjp (Suguru Odai) 1 contributions
y310 (Yusuke Mito) 1 contributions
付録
もっとも使われているgemの集計に使ったSQL
select left(`Name`, 50), `Dependent Projects Count`, `Repository Stars Count`, `Repository Contributors Count`, left(`Repository Name with Owner`, 50), left(`Repository URL`, 50)
from projects
order by cast(`Dependent Projects Count` as unsigned) desc
limit 20;
集計に使ったRubyコード
require 'octokit'
regexp = /日本|japan|北海道|hokkaido|青森|aomori|岩手|iwate|宮城|miyagi|秋田|akita|山形|yamagata|福島|fukushima|茨城|ibaraki|栃木|tochigi|群馬|gunma|埼玉|saitama|千葉|chiba|東京|tokyo|神奈川|kanagawa|新潟|niigata|富山|toyama|石川|ishikawa|福井|fukui|山梨|yamanashi|長野|nagano|岐阜|gifu|静岡|shizuoka|愛知|aichi|三重|mie|滋賀|shiga|京都|kyoto|大阪|osaka|兵庫|hyogo|奈良|nara|和歌山|wakayama|鳥取|tottori|島根|shimane|岡山|okayama|広島|hiroshima|山口|yamaguchi|徳島|tokushima|香川|kagawa|愛媛|ehime|高知|kochi|福岡|fukuoka|佐賀|saga|長崎|nagasaki|熊本|kumamoto|大分|oita|宮崎|miyazaki|鹿児島|kagoshima|沖縄|okinawa/
client = Octokit::Client.new(access_token: 'TOKEN')
repo = 'pry/pry'
members = client.contributors(repo); members.size
users = members.map { |member| client.user member.login }; users.size
japanese = users.select do |user|
user.location.to_s.downcase.match? regexp
end; japanese.size
japanese.take(5).map do |user|
member = members.find { |member| member.login == user.login }
<<~MD
**#{user.login} (#{user.name})** #{member.contributions} contributions
<img src="#{user.avatar_url}" width="50">
MD
end.each { |str| puts str };