Skip to content

Commit

Permalink
Add graph
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuel-keller committed Nov 11, 2016
1 parent 892c57d commit 6002755
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Number of active repositories
# Number of active repositories in GitHub

This little GO program requests the
[GitHub API](https://developer.github.com/v3/search/#search-repositories)
to extract the **per language ** and **per month** number of active repositories.
to extract the **per language** and **per month** number of active repositories.

Here are the current results for 2015 and 2016 (until october).
Here are the current results from 2014 to 2016 (until october).

![Statistiques](stats.png)

## 2014 statistics

Expand Down
7 changes: 1 addition & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ func MainHandler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/csv")
w.WriteHeader(http.StatusOK)

var results = map[string]int{}

for _, language := range languages {
fmt.Fprint(w, language)
for month := 1; month <= 12; month++ {
Expand All @@ -76,10 +74,7 @@ func MainHandler(w http.ResponseWriter, r *http.Request) {
log.Printf("%04d-%02d\t%s\t%d", year, month, language, count)
fmt.Fprintf(w, "\t%d", count)
}
}

if err := json.NewEncoder(w).Encode(results); err != nil {
panic(err)
fmt.Fprintln(w)
}
}

Expand Down
Binary file added stats.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added stats.xlsx
Binary file not shown.

0 comments on commit 6002755

Please sign in to comment.