├── top 2019 repos - by all users.sql ├── all_github_code_activity ├── LICENSE └── webrtc_repo_activity.sql /top 2019 repos - by all users.sql: -------------------------------------------------------------------------------- 1 | SELECT 2 | repoName, 3 | count (DISTINCT userId) AS all_users 4 | FROM 5 | `github_analysis_2019.webrtc_repos` 6 | WHERE 7 | year = '2019' 8 | GROUP BY 9 | repoName 10 | ORDER BY 11 | all_users Desc 12 | -------------------------------------------------------------------------------- /all_github_code_activity: -------------------------------------------------------------------------------- 1 | # Used to compare WebRTC against all of GitHub 2 | SELECT 3 | _TABLE_SUFFIX as period, 4 | SUBSTR(_TABLE_SUFFIX, 1, 4) as year, 5 | 6 | SUBSTR(_TABLE_SUFFIX, 5,2) as month, 7 | count(distinct repo.id) AS repos, 8 | count(distinct actor.id) as users, 9 | count(distinct org.id) as orgs 10 | FROM `githubarchive.month.201909` 11 | WHERE 12 | CAST('2019' as INT64) >= 2015 AND (type="PushEvent" OR type="PullRequestEvent" OR type="PullRequestReviewCommentEvent") 13 | GROUP BY period, year, month 14 | ORDER BY period asc 15 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 webrtcHacks 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /webrtc_repo_activity.sql: -------------------------------------------------------------------------------- 1 | # Used to build my master table 2 | SELECT 3 | SUBSTR(_TABLE_SUFFIX, 1, 4) as year, 4 | SUBSTR(_TABLE_SUFFIX, 5,2) as month, 5 | _TABLE_SUFFIX as period, 6 | repo.id AS repoId, 7 | repo.name AS repoName, 8 | actor.id as userId, 9 | actor.login AS user, 10 | org.id as orgId, 11 | org.login AS org, 12 | type as event, 13 | IF 14 | (type="PushEvent" 15 | OR type="PullRequestEvent" 16 | OR type="PullRequestReviewCommentEvent", 17 | TRUE, 18 | FALSE) AS codeEvent, 19 | IF 20 | (type="ForkEvent" 21 | OR type="WatchEvent" 22 | OR type="IssuesEvent" 23 | OR type="IssueCommentEvent", 24 | TRUE, 25 | FALSE) AS popularityEvent, 26 | IF 27 | (REGEXP_CONTAINS(repo.url, r'(?i)webrtc') 28 | OR REGEXP_CONTAINS(payload, r'(?i)webrtc') 29 | OR REGEXP_CONTAINS(other, r'(?i)webrtc'), 30 | TRUE, 31 | FALSE) AS keywordWebrtc, 32 | IF 33 | (REGEXP_CONTAINS(repo.url, r'(?i)getusermedia') 34 | OR REGEXP_CONTAINS(payload, r'(?i)getusermedia') 35 | OR REGEXP_CONTAINS(other, r'(?i)getusermedia'), 36 | TRUE, 37 | FALSE) AS keywordGum, 38 | IF 39 | (REGEXP_CONTAINS(repo.url, r'(?i)\b(stun|turn).?server') 40 | OR REGEXP_CONTAINS(payload, r'(?i)\b(stun|turn).?server') 41 | OR REGEXP_CONTAINS(other, r'(?i)\b(stun|turn).?server'), 42 | TRUE, 43 | FALSE) AS keywordStunTurn, 44 | IF 45 | (REGEXP_CONTAINS(repo.url, r'(?i)peerconnection') 46 | OR REGEXP_CONTAINS(payload, r'(?i)peerconnection') 47 | OR REGEXP_CONTAINS(other, r'(?i)peerconnection'), 48 | TRUE, 49 | FALSE) AS keywordPc, 50 | IF 51 | (REGEXP_CONTAINS(repo.url, r'(?i)rtpsender|rtpreceiver|rtptransceiver|rtcdtlstransport|icetransport|rtctrackevent') 52 | OR REGEXP_CONTAINS(payload, r'(?i)rtpsender|rtpreceiver|rtptransceiver|rtcdtlstransport|icetransport|rtctrackevent') 53 | OR REGEXP_CONTAINS(other, r'(?i)rtpsender|rtpreceiver|rtptransceiver|rtcdtlstransport|icetransport|rtctrackevent'), 54 | TRUE, 55 | FALSE) AS keywordPcExt 56 | FROM 57 | `githubarchive.month.*` 58 | WHERE 59 | REGEXP_CONTAINS(repo.url, r'(?i)webrtc|getusermedia|peerconnection|rtpsender|rtpreceiver|rtptransceiver|rtcdtlstransport|icetransport|rtctrackevent|\b(stun|turn).?server') 60 | OR REGEXP_CONTAINS(payload, r'(?i)webrtc|getusermedia|peerconnection|rtpsender|rtpreceiver|rtptransceiver|rtcdtlstransport|icetransport|rtctrackevent|\b(stun|turn).?server') 61 | OR REGEXP_CONTAINS(other, r'(?i)webrtc|getusermedia|peerconnection|rtpsender|rtpreceiver|rtptransceiver|rtcdtlstransport|icetransport|rtctrackevent|\b(stun|turn).?server') 62 | --------------------------------------------------------------------------------