├── .gitignore ├── LICENSE ├── README.md ├── main.go ├── new_lang_2014-01_2016-10.png ├── stats-2016-10.png ├── stats.xlsx └── stats_2014-01_2016-10.png /.gitignore: -------------------------------------------------------------------------------- 1 | # Idea 2 | *.iml 3 | .idea 4 | 5 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 6 | *.o 7 | *.a 8 | *.so 9 | 10 | # Folders 11 | _obj 12 | _test 13 | 14 | # Architecture specific extensions/prefixes 15 | *.[568vq] 16 | [568vq].out 17 | 18 | *.cgo1.go 19 | *.cgo2.c 20 | _cgo_defun.c 21 | _cgo_gotypes.go 22 | _cgo_export.* 23 | 24 | _testmain.go 25 | 26 | *.exe 27 | *.test 28 | *.prof 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | 179 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Number of active repositories in GitHub 2 | 3 | **Per language** and **per month** 4 | 5 | An active repository should meet this requirements: 6 | - created or updated during the evaluated period, 7 | - at least one star, 8 | - at least one fork, 9 | - a size larger than 10 Kb. 10 | 11 | ## October 2016 12 | 13 | ![Statistiques](stats-2016-10.png) 14 | 15 | ## Emerging languages 16 | 17 | ![Statistiques](new_lang_2014-01_2016-10.png) 18 | 19 | ## All languages 20 | 21 | ![Statistiques](stats_2014-01_2016-10.png) 22 | 23 | ### 2014 data 24 | 25 | | Language | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec | 26 | | :--- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | 27 | | C | 806 | 718 | 865 | 811 | 867 | 768 | 760 | 812 | 781 | 888 | 855 | 876 | 28 | | C++ | 666 | 654 | 701 | 751 | 807 | 738 | 783 | 775 | 825 | 836 | 791 | 917 | 29 | | C# | 453 | 423 | 470 | 501 | 536 | 471 | 517 | 557 | 490 | 565 | 645 | 560 | 30 | | Clojure | 87 | 93 | 82 | 68 | 75 | 75 | 66 | 85 | 63 | 78 | 76 | 82 | 31 | | Go | 202 | 210 | 227 | 217 | 258 | 248 | 284 | 295 | 301 | 304 | 295 | 362 | 32 | | Haskell | 64 | 68 | 63 | 60 | 73 | 73 | 62 | 86 | 72 | 95 | 69 | 84 | 33 | | Java | 1631 | 1498 | 1785 | 1789 | 1828 | 1741 | 1893 | 1795 | 1812 | 2018 | 2101 | 2174 | 34 | | Javascript | 2716 | 2664 | 2963 | 2925 | 3190 | 2890 | 3121 | 3272 | 3290 | 3420 | 3506 | 3452 | 35 | | Objective C | 611 | 578 | 659 | 686 | 664 | 535 | 580 | 588 | 533 | 600 | 533 | 543 | 36 | | Perl | 145 | 141 | 149 | 141 | 139 | 149 | 145 | 208 | 153 | 176 | 149 | 142 | 37 | | PHP | 1176 | 1153 | 1205 | 1130 | 1129 | 1048 | 1144 | 1174 | 1155 | 1290 | 1266 | 1197 | 38 | | Python | 1535 | 1428 | 1715 | 1648 | 1773 | 1682 | 1649 | 1804 | 1738 | 1822 | 1790 | 1894 | 39 | | Ruby | 923 | 951 | 991 | 970 | 1026 | 862 | 908 | 920 | 875 | 1010 | 949 | 924 | 40 | | Rust | 14 | 9 | 7 | 17 | 20 | 18 | 16 | 23 | 22 | 29 | 31 | 38 | 41 | | Scala | 110 | 85 | 99 | 116 | 113 | 117 | 103 | 123 | 117 | 113 | 137 | 131 | 42 | | Swift | 0 | 0 | 0 | 0 | 0 | 131 | 107 | 111 | 155 | 145 | 155 | 143 | 43 | 44 | ### 2015 data 45 | 46 | | Language | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec | 47 | | :--- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | 48 | | C | 895 | 829 | 1158 | 1137 | 1023 | 1011 | 979 | 1102 | 1044 | 1050 | 999 | 1118 | 49 | | C++ | 883 | 793 | 1234 | 1139 | 1187 | 1128 | 1091 | 1159 | 1224 | 1174 | 1080 | 1177 | 50 | | C# | 703 | 650 | 931 | 887 | 878 | 873 | 842 | 929 | 927 | 950 | 913 | 962 | 51 | | Clojure | 65 | 98 | 96 | 87 | 89 | 100 | 112 | 102 | 118 | 115 | 90 | 119 | 52 | | Go | 432 | 356 | 463 | 427 | 438 | 439 | 479 | 520 | 527 | 567 | 432 | 385 | 53 | | Haskell | 88 | 81 | 90 | 121 | 108 | 124 | 106 | 137 | 135 | 129 | 132 | 112 | 54 | | Java | 2227 | 1939 | 2754 | 2762 | 2674 | 2608 | 2629 | 2679 | 2734 | 2856 | 2629 | 2988 | 55 | | Javascript | 3651 | 3668 | 4334 | 4456 | 4463 | 4618 | 4718 | 4792 | 5048 | 5588 | 4680 | 4842 | 56 | | Objective C | 586 | 523 | 706 | 734 | 727 | 702 | 805 | 899 | 812 | 883 | 762 | 904 | 57 | | Perl | 190 | 149 | 210 | 173 | 206 | 197 | 161 | 179 | 176 | 255 | 197 | 176 | 58 | | PHP | 1355 | 1284 | 1575 | 1580 | 1654 | 1590 | 1713 | 1685 | 1686 | 1836 | 1671 | 1675 | 59 | | Python | 2081 | 1809 | 2378 | 2399 | 2460 | 2420 | 2460 | 2596 | 2664 | 2903 | 2496 | 2536 | 60 | | Ruby | 1030 | 1020 | 1142 | 1229 | 1205 | 1120 | 1173 | 1126 | 1208 | 1313 | 1110 | 1061 | 61 | | Rust | 39 | 25 | 49 | 49 | 76 | 65 | 58 | 56 | 63 | 62 | 57 | 49 | 62 | | Scala | 151 | 151 | 196 | 184 | 163 | 165 | 186 | 198 | 182 | 205 | 134 | 188 | 63 | | Swift | 129 | 131 | 161 | 242 | 240 | 253 | 233 | 264 | 322 | 431 | 343 | 341 | 64 | 65 | ### 2016 data 66 | 67 | | Language | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec | 68 | | :--- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | 69 | | C | 1166 | 1121 | 1349 | 1395 | 1448 | 1517 | 1547 | 1874 | 2292 | 4098 | | | 70 | | C++ | 1260 | 1206 | 1417 | 1473 | 1748 | 1663 | 1749 | 2139 | 2714 | 4614 | | | 71 | | C# | 980 | 1066 | 1103 | 1231 | 1386 | 1433 | 1477 | 1745 | 2015 | 3339 | | | 72 | | Clojure | 135 | 111 | 117 | 112 | 133 | 165 | 150 | 200 | 223 | 387 | | | 73 | | Go | 511 | 511 | 701 | 633 | 693 | 715 | 767 | 1086 | 1341 | 2189 | | | 74 | | Haskell | 133 | 118 | 138 | 114 | 253 | 259 | 223 | 284 | 333 | 597 | | | 75 | | Java | 3132 | 3011 | 4033 | 3923 | 4137 | 4231 | 4483 | 5340 | 6055 | 9617 | | | 76 | | Javascript | 5399 | 6278 | 6357 | 6804 | 6965 | 7348 | 7736 | 9364 | 11769 | 18837 | | | 77 | | Objective C | 1010 | 1155 | 1127 | 1070 | 1100 | 1103 | 1131 | 1283 | 1564 | 1966 | | | 78 | | Perl | 219 | 253 | 250 | 278 | 298 | 338 | 332 | 441 | 490 | 868 | | | 79 | | PHP | 1904 | 2181 | 2326 | 2324 | 2547 | 2727 | 2892 | 3702 | 4404 | 7343 | | | 80 | | Python | 2643 | 2862 | 3309 | 3417 | 3741 | 3988 | 4243 | 5146 | 6510 | 10944 | | | 81 | | Ruby | 1268 | 1342 | 1455 | 1453 | 1595 | 1566 | 1783 | 2263 | 2730 | 4285 | | | 82 | | Rust | 114 | 74 | 120 | 123 | 128 | 160 | 188 | 206 | 271 | 502 | | | 83 | | Scala | 184 | 214 | 255 | 247 | 280 | 272 | 241 | 306 | 429 | 776 | | | 84 | | Swift | 354 | 415 | 459 | 478 | 451 | 471 | 470 | 556 | 1352 | 1826 | | | 85 | 86 | ## The Go program 87 | 88 | If you want to fork or reuse this program, here are some useful informations. 89 | 90 | This little GO program requests the 91 | [GitHub API](https://developer.github.com/v3/search/#search-repositories) 92 | 93 | A typical request for one language for one month is: 94 | https://api.github.com/search/repositories?q=stars:>0+forks:>0+size:>10+language:%22Swift%22+pushed:2016-11-01..2016-11-30 95 | 96 | The program exposes the following resource: 97 | 98 | http://localhost:8000/ 99 | 100 | A CSV file is returned. 101 | 102 | The program wait 7 seconds between each request to not exceed the current [GitHub rate limit](https://developer.github.com/v3/search/#rate-limit) (10 requests/minute) 103 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2016 Emmanuel Keller 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | package main 17 | 18 | import ( 19 | "log" 20 | "net/http" 21 | "net/url" 22 | "github.com/gorilla/mux" 23 | "encoding/json" 24 | "strconv" 25 | "fmt" 26 | "io/ioutil" 27 | "time" 28 | ) 29 | 30 | var languages = []string{"C", "C++", "C#", "Clojure", "Go", "Haskell", "Java", "Javascript", "Objective C", "Perl", "Php", "Python", "Ruby", "Rust", "Scala", "Swift"} 31 | 32 | func CountProjects(language string, year int, month int) (int, error) { 33 | 34 | // The public GH API rate is 10r eq/minutes 35 | time.Sleep(7 * time.Second) 36 | 37 | const GhEndPoint = "https://api.github.com/search/repositories?q=stars:>0+forks:>0+size:>10+" 38 | 39 | u := GhEndPoint + "language:" + url.QueryEscape("\"" + language + "\"") 40 | 41 | startMonth := time.Date(year, time.Month(month), 1, 0, 0, 0, 0, time.UTC) 42 | endMonth := startMonth.AddDate(0, 1, -1) 43 | endMonth = time.Date(endMonth.Year(), endMonth.Month(), endMonth.Day(), 23, 59, 59, 0, time.UTC) 44 | 45 | u += "+pushed:" + fmt.Sprintf("%04d-%02d-01", year, month) 46 | u += ".." + fmt.Sprintf("%04d-%02d-%02d", year, month, endMonth.Day()) 47 | log.Println(u) 48 | resp, err := http.Get(u) 49 | if err != nil { 50 | return 0, err 51 | } 52 | defer resp.Body.Close() 53 | 54 | if (resp.StatusCode != 200) { 55 | return 0, fmt.Errorf("Wrong GH API status code: %d", resp.StatusCode) 56 | } 57 | 58 | bytes, err := ioutil.ReadAll(resp.Body) 59 | if err != nil { 60 | return 0, err 61 | } 62 | 63 | type GHSearchResult struct { 64 | TotalCount int `json:"total_count"` 65 | } 66 | 67 | var result GHSearchResult 68 | err = json.Unmarshal(bytes, &result) 69 | if err != nil { 70 | return 0, err 71 | } 72 | 73 | return result.TotalCount, nil 74 | } 75 | 76 | func MainHandler(w http.ResponseWriter, r *http.Request) { 77 | 78 | w.Header().Set("Content-Type", "text/csv") 79 | w.WriteHeader(http.StatusOK) 80 | 81 | for _, language := range languages { 82 | var md string = language + " |" 83 | fmt.Fprint(w, language) 84 | for year := 2014; year <= 2016; year++ { 85 | for month := 1; month <= 12; month++ { 86 | count, err := CountProjects(language, year, month) 87 | if err != nil { 88 | http.Error(w, "Error on language " + language + " " + err.Error(), http.StatusNotAcceptable) 89 | return 90 | } 91 | log.Printf("%04d-%02d\t%s\t%d", year, month, language, count) 92 | md += " " + fmt.Sprintf("%6s", strconv.Itoa(count)) + " |" 93 | fmt.Fprintf(w, "\t%d", count) 94 | } 95 | } 96 | log.Printf(md) 97 | fmt.Fprintln(w) 98 | } 99 | } 100 | 101 | func main() { 102 | r := mux.NewRouter() 103 | r.HandleFunc("/", MainHandler) 104 | log.Fatal(http.ListenAndServe(":8000", r)) 105 | } -------------------------------------------------------------------------------- /new_lang_2014-01_2016-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emmanuel-keller/github-language-statistics/00159eac54a54a25bc3923f373e7e8fa43c1c6c5/new_lang_2014-01_2016-10.png -------------------------------------------------------------------------------- /stats-2016-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emmanuel-keller/github-language-statistics/00159eac54a54a25bc3923f373e7e8fa43c1c6c5/stats-2016-10.png -------------------------------------------------------------------------------- /stats.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emmanuel-keller/github-language-statistics/00159eac54a54a25bc3923f373e7e8fa43c1c6c5/stats.xlsx -------------------------------------------------------------------------------- /stats_2014-01_2016-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emmanuel-keller/github-language-statistics/00159eac54a54a25bc3923f373e7e8fa43c1c6c5/stats_2014-01_2016-10.png --------------------------------------------------------------------------------