Skip to content

Instantly share code, notes, and snippets.

@MartinRogalla
Last active February 16, 2016 22:26
Show Gist options
  • Select an option

  • Save MartinRogalla/30120193bd551e3a182b to your computer and use it in GitHub Desktop.

Select an option

Save MartinRogalla/30120193bd551e3a182b to your computer and use it in GitHub Desktop.
Monthly added GitHub repositories.

Monthly added GitHub repositories

Get access to the GitHub archive BigQuery dataset.

Run the following query, update the regex if needed.

SELECT STRFTIME_UTC_USEC(repository_created_at, '%Y-%m') as month,
COUNT(repository_url)
FROM
  (SELECT repository_created_at, repository_url
  FROM
  (TABLE_QUERY([githubarchive:month], 'REGEXP_MATCH(table_id, r"^(201([1-4]))")')))
,
  (SELECT STRING(created_at) as repository_created_at, repo_url as repository_url
  FROM 
  (TABLE_QUERY([githubarchive:month], 'REGEXP_MATCH(table_id, r"^(201(5|6))")')))

WHERE repository_created_at IS NOT NULL
GROUP BY month
LIMIT 100

You can find the results in the results.json file below.

Note, that the dataset does not contain all the repositories, but only the ones that had activity within the period of the specified dataset.

{
"results" : [
{"month":"2015-01","f0_":"13891373"},
{"month":"2009-04","f0_":"301518"},
{"month":"2008-10","f0_":"192674"},
{"month":"2014-11","f0_":"6341460"},
{"month":"2011-04","f0_":"2059583"},
{"month":"2014-07","f0_":"7217175"},
{"month":"2013-04","f0_":"6464890"},
{"month":"2014-08","f0_":"6399163"},
{"month":"2010-10","f0_":"1059448"},
{"month":"2010-04","f0_":"721388"},
{"month":"2009-01","f0_":"306439"},
{"month":"2011-09","f0_":"3028003"},
{"month":"2008-12","f0_":"195429"},
{"month":"2015-05","f0_":"17074520"},
{"month":"2015-02","f0_":"14168522"},
{"month":"2011-05","f0_":"2210294"},
{"month":"2010-11","f0_":"1227394"},
{"month":"2011-11","f0_":"3117004"},
{"month":"2010-12","f0_":"1300055"},
{"month":"2014-10","f0_":"7353122"},
{"month":"2016-02","f0_":"10458002"},
{"month":"2012-12","f0_":"4518471"},
{"month":"2012-07","f0_":"6898306"},
{"month":"2012-01","f0_":"3639384"},
{"month":"2010-02","f0_":"673737"},
{"month":"2015-04","f0_":"17185133"},
{"month":"2008-07","f0_":"115826"},
{"month":"2009-02","f0_":"294221"},
{"month":"2012-02","f0_":"4646396"},
{"month":"2011-08","f0_":"2328983"},
{"month":"2013-02","f0_":"5597608"},
{"month":"2013-09","f0_":"6220250"},
{"month":"2008-08","f0_":"107216"},
{"month":"2009-05","f0_":"729029"},
{"month":"2010-07","f0_":"1116880"},
{"month":"2014-12","f0_":"4240821"},
{"month":"2013-01","f0_":"6111243"},
{"month":"2010-01","f0_":"945569"},
{"month":"2014-03","f0_":"7953366"},
{"month":"2011-10","f0_":"4896052"},
{"month":"2015-03","f0_":"17422531"},
{"month":"2014-06","f0_":"6611089"},
{"month":"2011-12","f0_":"3171657"},
{"month":"2016-01","f0_":"22997868"},
{"month":"2014-01","f0_":"7338555"},
{"month":"2009-06","f0_":"360137"},
{"month":"2008-05","f0_":"106240"},
{"month":"2014-09","f0_":"7319753"},
{"month":"2010-06","f0_":"1065614"},
{"month":"2009-11","f0_":"411769"},
{"month":"2013-07","f0_":"6507561"},
{"month":"2013-11","f0_":"6762494"},
{"month":"2013-12","f0_":"6284845"},
{"month":"2015-07","f0_":"17151289"},
{"month":"2015-10","f0_":"20286339"},
{"month":"2014-05","f0_":"7294098"},
{"month":"2008-03","f0_":"145564"},
{"month":"2012-04","f0_":"7995545"},
{"month":"2010-03","f0_":"687402"},
{"month":"2012-11","f0_":"5163719"},
{"month":"2012-06","f0_":"6734807"},
{"month":"2008-02","f0_":"53694"},
{"month":"2008-04","f0_":"295788"},
{"month":"2009-10","f0_":"502214"},
{"month":"2009-03","f0_":"293549"},
{"month":"2011-02","f0_":"1974886"},
{"month":"2010-05","f0_":"840168"},
{"month":"2011-03","f0_":"1783243"},
{"month":"2011-07","f0_":"2373261"},
{"month":"2009-09","f0_":"474208"},
{"month":"2008-09","f0_":"94759"},
{"month":"2009-07","f0_":"393429"},
{"month":"2013-10","f0_":"6952619"},
{"month":"2009-12","f0_":"506626"},
{"month":"2012-08","f0_":"7422783"},
{"month":"2013-08","f0_":"6094422"},
{"month":"2009-08","f0_":"386482"},
{"month":"2011-06","f0_":"2241607"},
{"month":"2010-09","f0_":"1370202"},
{"month":"2007-10","f0_":"2466"},
{"month":"2008-01","f0_":"31206"},
{"month":"2014-02","f0_":"7275508"},
{"month":"2013-03","f0_":"6164972"},
{"month":"2012-03","f0_":"8176452"},
{"month":"2011-01","f0_":"1679235"},
{"month":"2012-09","f0_":"5041957"},
{"month":"2008-11","f0_":"110600"},
{"month":"2015-06","f0_":"16729185"},
{"month":"2015-08","f0_":"17145322"},
{"month":"2012-10","f0_":"5469445"},
{"month":"2013-06","f0_":"5881817"},
{"month":"2014-04","f0_":"7318294"},
{"month":"2013-05","f0_":"6163021"},
{"month":"2008-06","f0_":"116411"},
{"month":"2015-11","f0_":"20815943"},
{"month":"2012-05","f0_":"7678445"},
{"month":"2015-12","f0_":"20073319"},
{"month":"2015-09","f0_":"18600122"},
{"month":"2010-08","f0_":"948909"}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment