For this analysis we’ll look at all the`PushEvents`published by GitHub during 2017\. For each GitHub user we’ll have to make our best guess to determine to which organization they belong. We’ll only look at repositories that have received at least 20 stars this year.
Here are the results I got, which you can[tinker with in my the interactive Data Studio report][1].
### Comparing the top cloud providers
Looking at GitHub during 2017:
* Microsoft appears to have ~1,300 employees actively pushing code to 825 top repositories on GitHub.
* Google displays ~900 employees active on GitHub, who are pushing code to ~1,100 top repositories.
* Amazon appears to have only 134 active employees on GitHub, pushing code to only 158 top projects.
* Not all projects are equal: While Googlers are contributing code to 25% more repositories than Microsoft, these repositories have collected way more stars (530,000 vs 260,000). Amazon repositories sum of 2017 stars? 27,000.
If Amazon seems so far behind Microsoft and Google—what are the companies in between? According to this ranking RedHat, Pivotal, and Intel are pushing great contributions to GitHub:
Note that the following table combines all of IBM regional domains—while the individual regions still show up in the subsequent tables.
Facebook and IBM (US) have a similar number of GitHub users than Amazon, but the projects they contribute to have collected more stars (especially Facebook):
Determining the organization to which each GitHub user belongs it’s not easy—but we can use the email domains that show up in each commit message contained on PushEvents:
* The same email can show up in more than one user, so I only considered GitHub users able to push code to GitHub projects with more than 20 stars during the period.
* I only counted GitHub users with more than 3 pushes during the period.
* Users pushing code to GitHub can display many different emails on their pushes—part of how Git works. To determine the organization for each user, I looked into the email their pushes shows up most frequently.
* Not everyone uses their organization email on GitHub. There are a lot of gmail.com, users.noreply.github.com, and other email hosting providers. Sometimes the reason for this is anonymity and protecting their corporate inboxes—but if I couldn’t see their email domain, I couldn’t count them. Sorry.
* Sometimes employees switch organizations. I assigned them to the one that got the more pushes according to these rules.
, (SELECT COUNT(DISTINCT repo) FROM UNNEST(repos) repo) repos_contributed_to
, ARRAY(
SELECT AS STRUCT JSON_EXTRACT_SCALAR(repo, '$.repo_name') repo_name
, CAST(JSON_EXTRACT_SCALAR(repo, '$.stars') AS INT64) stars
, COUNT(*) githubers_from_domain FROM UNNEST(repos) repo
GROUP BY 1, 2
HAVING githubers_from_domain>1
ORDER BY stars DESC LIMIT 3
) top
, (SELECT SUM(CAST(JSON_EXTRACT_SCALAR(repo, '$.stars') AS INT64)) FROM (SELECT DISTINCT repo FROM UNNEST(repos) repo)) sum_stars_projects_contributed_to
FROM (
SELECT domain, COUNT(*) githubers, ARRAY_CONCAT_AGG(ARRAY(SELECT * FROM UNNEST(repos) repo)) repos
FROM pushers_guess_emails_and_top_projects
#WHERE domain IN UNNEST(SPLIT('google.com|microsoft.com|amazon.com', '|'))
WHERE domain NOT IN UNNEST(SPLIT('gmail.com|users.noreply.github.com|qq.com|hotmail.com|163.com|me.com|googlemail.com|outlook.com|yahoo.com|web.de|iki.fi|foxmail.com|yandex.ru', '|')) # email hosters
GROUP BY 1
HAVING githubers > 30
)
WHERE (SELECT MAX(githubers_from_domain) FROM (SELECT repo, COUNT(*) githubers_from_domain FROM UNNEST(repos) repo GROUP BY repo))>4 # second filter email hosters
)
ORDER BY githubers DESC
```
### FAQ
#### If an organization has 1,500 repositories, why do you only count 200? If a repository has 7,000 stars, why do you only show1,500?
I’m filtering for relevancy. I’m only counting stars given during 2017\. For example, Apache has >1,500 repositories on GitHub, but only 205 have received more than 20 stars this year.
Note that analyzing GitHub doesn’t include top communities like Android, Chromium, GNU, Mozilla, nor the the Apache or Eclipse Foundation, and[other][2]projects that choose to run most of their activities outside of GitHub.
#### You were unfair to my organization.
I can only count what I can see. Please challenge my assumptions and tell me how you would measure things in a better way. Working queries would be the best way.
For example, see how their ranking changes when I combine IBM’s region-based domains into their top one with one SQL transformation:
IBM’s relative position moves significantly when you combine their regional emaildomains.
#### Reactions
[Some thoughts on "the top contributors to GitHub 2017".
Yesterday Felipe Hoffa from the Google Dev Rel team published some interesting research looking at corporate usage of…redmonk.com][3][][4]
### Next steps
I’ve been wrong before—and it will probably happen again. Please take a look at all the raw data available and question all my assumptions—it will be cool to see what results you get.
[Play with the interactive Data Studio report][5].
Thanks to[Ilya Grigorik][6]for keeping[GitHub Archive][7]well fed and full of GitHub data all these years!
Want more stories? Check my[Medium][8],[follow me on twitter][9], and subscribe to[reddit.com/r/bigquery][10]. And[try BigQuery][11]—every month you get a full terabyte of analysis for[free][12].