logo Netzschleuder network catalog, repository, and centrifuge

History of github

The changes to the source code of this entry in the repository, newest first, each with the differences it made to the entry's files. They are also listed on GitLab.

[entries] Add the date when each entry was added, and remove icon_hash by Tiago de Paula Peixoto beff7c9
The dates are those of the commits that first added the entries' files
(2020-08-11 for the entries of the initial commit); renamed entries keep
the date of their first name.

Changed: none
diff --git a/entries/github/__init__.py b/entries/github/__init__.py
index 3bb9606..9f717b5 100644
--- a/entries/github/__init__.py
+++ b/entries/github/__init__.py
@@ -32,7 +32,7 @@ The network has the following properties:
 tags = ['Economic', 'Preferences', 'Unweighted', 'Metadata']
 url = 'https://github.blog/news-insights/the-library/the-2009-github-contest/'
 citation = [('S. Chacon, "The 2009 GitHub Contest." The GitHub Blog (2009)', 'https://github.blog/news-insights/the-library/the-2009-github-contest/')]
-icon_hash = '5751a3edbd3e93b53c6954c8'
+date_added = '2020-08-11'
 upstream_license = ("Public domain (as stated in the readme file of the data)",
                     "https://web.archive.org/web/20220413012321/https://github.s3.amazonaws.com/data/download.zip")
 # The contest data are no longer available from GitHub, so they are obtained
[entries] Prefix the properties in the descriptions with (Node), (Edge) or (Graph) by Tiago de Paula Peixoto bc3dbbd
The lists of properties at the end of the descriptions marked edge
properties with "Edge" but left node properties unmarked, or grouped
them in "Nodes: `a`, ...; `b`, ..." items, so the kind of a property
was often unclear. Every item now starts with (Node), (Edge) or (Graph),
followed by the property names, a colon and the explanation, one item
per property or group of properties; qualifications (kinds of nodes,
networks) follow the names in parentheses. Properties that were only
named got a short explanation, and a few items that named the wrong
kind of property were corrected.
diff --git a/entries/github/__init__.py b/entries/github/__init__.py
index 878c137..3bb9606 100644
--- a/entries/github/__init__.py
+++ b/entries/github/__init__.py
@@ -23,8 +23,12 @@ description = """A bipartite network of users of the software hosting site GitHu
 
 The network has the following properties:
 
-- Nodes: `is_user`, whether the node is a user (otherwise it is a repository); `id`, the numerical id of the user or repository in the source data.
-- Repositories: `name`, the repository name ("owner/repository"); `created`, its creation date; `fork_of`, the name of the repository it was forked from (empty if none); `languages` and `lines`, the programming languages identified in the repository and the number of lines of code in each (empty for the 47,371 repositories without language data)."""
+- (Node) `is_user`: whether the node is a user (otherwise it is a repository).
+- (Node) `id`: the numerical id of the user or repository in the source data.
+- (Node) `name` (repositories): the repository name ("owner/repository").
+- (Node) `created` (repositories): its creation date.
+- (Node) `fork_of` (repositories): the name of the repository it was forked from (empty if none).
+- (Node) `languages`, `lines` (repositories): the programming languages identified in the repository and the number of lines of code in each (empty for the 47,371 repositories without language data)."""
 tags = ['Economic', 'Preferences', 'Unweighted', 'Metadata']
 url = 'https://github.blog/news-insights/the-library/the-2009-github-contest/'
 citation = [('S. Chacon, "The 2009 GitHub Contest." The GitHub Blog (2009)', 'https://github.blog/news-insights/the-library/the-2009-github-contest/')]
[entries] Remove unneeded code from the entries by Tiago de Paula Peixoto 2c69f19
Unneeded "global files" statements, unused imports and variables,
f-strings without placeholders, duplicate keys in foodweb_little_rock
(keeping the order and the values used), and the second definition of
get_lines() in twitter_higgs. Nothing changes in the networks or
descriptions.

Changed: none
diff --git a/entries/github/__init__.py b/entries/github/__init__.py
index 90dce2b..878c137 100644
--- a/entries/github/__init__.py
+++ b/entries/github/__init__.py
@@ -45,7 +45,6 @@ def fetch_upstream(force=False):
 @coerce_props()
 @annotate()
 def parse(alts=None):
-    global files
     name = __name__.split(".")[-1]
     for fnames, alt, fmt in files:
         if alts is not None and alt not in alts:
[entries] Move more KONECT-derived entries to their original sources by Tiago de Paula Peixoto bf9dc0e
The entries now download the data from where KONECT obtained them (live,
or via the Wayback Machine), using the same release as KONECT where it is
still available, and gain the metadata KONECT dropped; descriptions and
citations are rewritten from the original sources:

- Linton Freeman's UCINET data page: bible_nouns, bison, cattle, hens,
  highschool, kangaroo, macaques, moreno_sheep, physician_trust (the three
  relations and the physicians' attributes), rhesus_monkey,
  train_terrorists, windsurfers (now the networks `interaction` and
  `closeness`), college_freshmen, crime, interactome_yeast (from the
  primary source), moreno_taro (undirected), residence_hall, zebras
- other pages, archived: contiguous_usa, advogato, google, github,
  digg_reply, twitter, bookcrossing, dbtropes_feature (without KONECT's
  spurious "ItemName" tropes)
- movielens_100k (in fact the MovieLens 10M tag assignments)
- dblp release 2017-05-02: dblp_author_paper, dblp_cite, dblp_coauthor
- DBpedia 3.9: dbpedia_country, dbpedia_genre, dbpedia_location,
  dbpedia_occupation, dbpedia_producer, dbpedia_recordlabel,
  dbpedia_starring, dbpedia_team, dbpedia_writer, dbpedia_all, dbpedia_link
- Discogs releases dump of October 2015: discogs_affiliation,
  discogs_genre and discogs_label (now with genre and style networks)
diff --git a/entries/github/__init__.py b/entries/github/__init__.py
index f829f6a..90dce2b 100644
--- a/entries/github/__init__.py
+++ b/entries/github/__init__.py
@@ -19,18 +19,27 @@
 from .. import *
 
 title = "GitHub contest (2009)"
-description = """The bipartite project-user membership network of the software development hosting site GitHub. A user connects to a project if that user is a member of that project.[^icon]
-[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
-tags = ['Economic', 'Production', 'Unweighted']
-url = 'http://konect.cc/networks/github'
-citation = [('S. Chacon. "The 2009 GitHub contest."', 'https://doi.org/10.1007/978-1-4842-0076-6_6')]
+description = """A bipartite network of users of the software hosting site GitHub and the repositories they watch (i.e. subscribe to), released by GitHub (S. Chacon) for the 2009 GitHub Contest, in which participants had to recommend repositories to users based on the repositories they already watched. The data are an extract of the repository watches in GitHub's database in June 2009, from which a sample of the watches of 4,788 test users was withheld (and is not included). Nodes are users and repositories, and an edge connects a user to a repository that the user watches. Users and repositories are anonymized by numerical ids, but the repositories come with their names, creation dates, fork origin and language composition.
+
+The network has the following properties:
+
+- Nodes: `is_user`, whether the node is a user (otherwise it is a repository); `id`, the numerical id of the user or repository in the source data.
+- Repositories: `name`, the repository name ("owner/repository"); `created`, its creation date; `fork_of`, the name of the repository it was forked from (empty if none); `languages` and `lines`, the programming languages identified in the repository and the number of lines of code in each (empty for the 47,371 repositories without language data)."""
+tags = ['Economic', 'Preferences', 'Unweighted', 'Metadata']
+url = 'https://github.blog/news-insights/the-library/the-2009-github-contest/'
+citation = [('S. Chacon, "The 2009 GitHub Contest." The GitHub Blog (2009)', 'https://github.blog/news-insights/the-library/the-2009-github-contest/')]
 icon_hash = '5751a3edbd3e93b53c6954c8'
-upstream_prefix = 'http://konect.cc/files'
-files = [('download.tsv.github.tar.bz2', None, 'konect')]
+upstream_license = ("Public domain (as stated in the readme file of the data)",
+                    "https://web.archive.org/web/20220413012321/https://github.s3.amazonaws.com/data/download.zip")
+# The contest data are no longer available from GitHub, so they are obtained
+# from the Internet Archive.
+upstream_prefix = 'https://web.archive.org/web/20220413012321id_/https://github.s3.amazonaws.com/data'
+files = [(('download.zip:download/data.txt', 'download.zip:download/repos.txt',
+           'download.zip:download/lang.txt'), None, None)]
 
 def fetch_upstream(force=False):
-    return fetch_upstream_files(__name__.split(".")[-1], upstream_prefix, files,
-                                force)
+    return retry_download(fetch_upstream_files, __name__.split(".")[-1],
+                          upstream_prefix, files, force)
 
 @cache_network()
 @coerce_props()
@@ -41,9 +50,49 @@ def parse(alts=None):
     for fnames, alt, fmt in files:
         if alts is not None and alt not in alts:
             continue
-        if isinstance(fnames, str):
-            fnames = [fnames]
         with ExitStack() as stack:
-            fs = [stack.enter_context(open_upstream_file(name, fn, "rb")) for fn in fnames]
-            g = parse_graph(fs, fmt, directed=False)
+            fs = [stack.enter_context(open_upstream_file(name, fn, "r")) for fn in fnames]
+            # Watches: "<user_id>:<repo_id>"
+            edges = numpy.array([line.strip().split(":") for line in fs[0]
+                                 if line.strip()], dtype="int64")
+            # Repositories: "<repo_id>:<owner/name>,<date>[,<parent_id>]"
+            repos = {}
+            for line in fs[1]:
+                rid, rest = line.rstrip("\r\n").split(":", 1)
+                repos[int(rid)] = rest.split(",")
+            # Languages: "<repo_id>:<lang>;<lines>,<lang>;<lines>,..."
+            langs = {}
+            for line in fs[2]:
+                rid, rest = line.rstrip("\r\n").split(":", 1)
+                langs[int(rid)] = [x.rsplit(";", 1) for x in rest.split(",")]
+
+        users = numpy.unique(edges[:, 0])
+        rids = numpy.unique(numpy.concatenate((edges[:, 1],
+                                               list(repos.keys()))))
+        NU = len(users)
+        g = Graph(directed=False)
+        g.add_vertex(NU + len(rids))
+        g.add_edge_list(numpy.column_stack((numpy.searchsorted(users, edges[:, 0]),
+                                            NU + numpy.searchsorted(rids, edges[:, 1]))))
+        g.vp.is_user = g.new_vp("bool")
+        g.vp.is_user.a[:NU] = 1
+        g.vp.id = g.new_vp("int")
+        g.vp.id.a[:NU] = users
+        g.vp.id.a[NU:] = rids
+        g.vp.name = g.new_vp("string")
+        g.vp.created = g.new_vp("string")
+        g.vp.fork_of = g.new_vp("string")
+        g.vp.languages = g.new_vp("vector<string>")
+        g.vp.lines = g.new_vp("vector<int>")
+        for i, rid in enumerate(rids):
+            v = g.vertex(NU + i)
+            r = repos.get(int(rid))
+            if r is not None:
+                g.vp.name[v] = r[0]
+                g.vp.created[v] = r[1]
+                if len(r) > 2:
+                    g.vp.fork_of[v] = repos[int(r[2])][0]
+            for lang, n in langs.get(int(rid), []):
+                g.vp.languages[v].append(lang)
+                g.vp.lines[v].append(int(n))
         yield alt, g
Update copyright information by Tiago de Paula Peixoto 73a4f0d
diff --git a/entries/github/__init__.py b/entries/github/__init__.py
index 39e488c..f829f6a 100644
--- a/entries/github/__init__.py
+++ b/entries/github/__init__.py
@@ -1,7 +1,7 @@
 #! /usr/bin/env python
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2020-2024 Tiago de Paula Peixoto <tiago@skewed.de>
+# Copyright (C) 2020-2026 Tiago de Paula Peixoto <tiago@skewed.de>
 #
 # This program is free software: you can redistribute it and/or modify it under
 # the terms of the GNU Affero General Public License as published by the Free
Update copyright information by Tiago de Paula Peixoto 3d288ea
diff --git a/entries/github/__init__.py b/entries/github/__init__.py
index 4a5a4e6..39e488c 100644
--- a/entries/github/__init__.py
+++ b/entries/github/__init__.py
@@ -1,7 +1,7 @@
 #! /usr/bin/env python
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2020-2023 Tiago de Paula Peixoto <tiago@skewed.de>
+# Copyright (C) 2020-2024 Tiago de Paula Peixoto <tiago@skewed.de>
 #
 # This program is free software: you can redistribute it and/or modify it under
 # the terms of the GNU Affero General Public License as published by the Free
Update copyright information by Tiago de Paula Peixoto 8d005ae
diff --git a/entries/github/__init__.py b/entries/github/__init__.py
index 55b894a..4a5a4e6 100644
--- a/entries/github/__init__.py
+++ b/entries/github/__init__.py
@@ -1,7 +1,7 @@
 #! /usr/bin/env python
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2021 Tiago de Paula Peixoto <tiago@skewed.de>
+# Copyright (C) 2020-2023 Tiago de Paula Peixoto <tiago@skewed.de>
 #
 # This program is free software: you can redistribute it and/or modify it under
 # the terms of the GNU Affero General Public License as published by the Free
Update copyright info by Tiago de Paula Peixoto db2efcc
diff --git a/entries/github/__init__.py b/entries/github/__init__.py
index f01c5b4..55b894a 100644
--- a/entries/github/__init__.py
+++ b/entries/github/__init__.py
@@ -1,7 +1,7 @@
 #! /usr/bin/env python
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2020 Tiago de Paula Peixoto <tiago@skewed.de>
+# Copyright (C) 2021 Tiago de Paula Peixoto <tiago@skewed.de>
 #
 # This program is free software: you can redistribute it and/or modify it under
 # the terms of the GNU Affero General Public License as published by the Free
Un-orphan KONECT datasets by Tiago de Paula Peixoto 894eba5
KONECT has been brought back from the dead for the time being.
diff --git a/entries/github/__init__.py b/entries/github/__init__.py
index c34d4eb..f01c5b4 100644
--- a/entries/github/__init__.py
+++ b/entries/github/__init__.py
@@ -26,7 +26,6 @@ url = 'http://konect.cc/networks/github'
 citation = [('S. Chacon. "The 2009 GitHub contest."', 'https://doi.org/10.1007/978-1-4842-0076-6_6')]
 icon_hash = '5751a3edbd3e93b53c6954c8'
 upstream_prefix = 'http://konect.cc/files'
-orphan = True
 files = [('download.tsv.github.tar.bz2', None, 'konect')]
 
 def fetch_upstream(force=False):
Update citations to use DOIs by Tiago de Paula Peixoto e878874
diff --git a/entries/github/__init__.py b/entries/github/__init__.py
index ea47fa2..c34d4eb 100644
--- a/entries/github/__init__.py
+++ b/entries/github/__init__.py
@@ -23,7 +23,7 @@ description = """The bipartite project-user membership network of the software d
 [^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
 tags = ['Economic', 'Production', 'Unweighted']
 url = 'http://konect.cc/networks/github'
-citation = [('S. Chacon. "The 2009 GitHub contest." https://github.com/blog/466-the-2009-github-contest (2009).', 'https://github.com/blog/466-the-2009-github-contest')]
+citation = [('S. Chacon. "The 2009 GitHub contest."', 'https://doi.org/10.1007/978-1-4842-0076-6_6')]
 icon_hash = '5751a3edbd3e93b53c6954c8'
 upstream_prefix = 'http://konect.cc/files'
 orphan = True
Add support for 'orphan' datasets and tag konect entries by Tiago de Paula Peixoto e330b80
diff --git a/entries/github/__init__.py b/entries/github/__init__.py
index 4b499a7..ea47fa2 100644
--- a/entries/github/__init__.py
+++ b/entries/github/__init__.py
@@ -26,6 +26,7 @@ url = 'http://konect.cc/networks/github'
 citation = [('S. Chacon. "The 2009 GitHub contest." https://github.com/blog/466-the-2009-github-contest (2009).', 'https://github.com/blog/466-the-2009-github-contest')]
 icon_hash = '5751a3edbd3e93b53c6954c8'
 upstream_prefix = 'http://konect.cc/files'
+orphan = True
 files = [('download.tsv.github.tar.bz2', None, 'konect')]
 
 def fetch_upstream(force=False):
Change license from GPLv3 to AGPLv3 by Tiago de Paula Peixoto d754be5
diff --git a/entries/github/__init__.py b/entries/github/__init__.py
index 91afffc..4b499a7 100644
--- a/entries/github/__init__.py
+++ b/entries/github/__init__.py
@@ -3,18 +3,18 @@
 #
 # Copyright (C) 2020 Tiago de Paula Peixoto <tiago@skewed.de>
 #
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
+# This program is free software: you can redistribute it and/or modify it under
+# the terms of the GNU Affero General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
 #
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
+# details.
 #
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU Affero General Public License along
+# with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 from .. import *
 
Add explicit attribution to descriptions obtained from ICON by Tiago de Paula Peixoto 1645314
diff --git a/entries/github/__init__.py b/entries/github/__init__.py
index 7bb3e67..91afffc 100644
--- a/entries/github/__init__.py
+++ b/entries/github/__init__.py
@@ -19,7 +19,8 @@
 from .. import *
 
 title = "GitHub contest (2009)"
-description = "The bipartite project-user membership network of the software development hosting site GitHub. A user connects to a project if that user is a member of that project."
+description = """The bipartite project-user membership network of the software development hosting site GitHub. A user connects to a project if that user is a member of that project.[^icon]
+[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
 tags = ['Economic', 'Production', 'Unweighted']
 url = 'http://konect.cc/networks/github'
 citation = [('S. Chacon. "The 2009 GitHub contest." https://github.com/blog/466-the-2009-github-contest (2009).', 'https://github.com/blog/466-the-2009-github-contest')]
Initial commit by Tiago de Paula Peixoto cc85872
diff --git a/entries/github/__init__.py b/entries/github/__init__.py
new file mode 100644
index 0000000..7bb3e67
--- /dev/null
+++ b/entries/github/__init__.py
@@ -0,0 +1,48 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2020 Tiago de Paula Peixoto <tiago@skewed.de>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+from .. import *
+
+title = "GitHub contest (2009)"
+description = "The bipartite project-user membership network of the software development hosting site GitHub. A user connects to a project if that user is a member of that project."
+tags = ['Economic', 'Production', 'Unweighted']
+url = 'http://konect.cc/networks/github'
+citation = [('S. Chacon. "The 2009 GitHub contest." https://github.com/blog/466-the-2009-github-contest (2009).', 'https://github.com/blog/466-the-2009-github-contest')]
+icon_hash = '5751a3edbd3e93b53c6954c8'
+upstream_prefix = 'http://konect.cc/files'
+files = [('download.tsv.github.tar.bz2', None, 'konect')]
+
+def fetch_upstream(force=False):
+    return fetch_upstream_files(__name__.split(".")[-1], upstream_prefix, files,
+                                force)
+
+@cache_network()
+@coerce_props()
+@annotate()
+def parse(alts=None):
+    global files
+    name = __name__.split(".")[-1]
+    for fnames, alt, fmt in files:
+        if alts is not None and alt not in alts:
+            continue
+        if isinstance(fnames, str):
+            fnames = [fnames]
+        with ExitStack() as stack:
+            fs = [stack.enter_context(open_upstream_file(name, fn, "rb")) for fn in fnames]
+            g = parse_graph(fs, fmt, directed=False)
+        yield alt, g