History of college_freshmen
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 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/college_freshmen/__init__.py b/entries/college_freshmen/__init__.py
index 945b569..7f02ce4 100644
--- a/entries/college_freshmen/__init__.py
+++ b/entries/college_freshmen/__init__.py
@@ -35,8 +35,7 @@ tags = ['Social', 'Offline', 'Weighted', 'Temporal', 'Multigraph', 'Metadata']
url = 'https://web.archive.org/web/20210115130726/http://moreno.ss.uci.edu/data.html#vdb'
citation = [('G. Van de Bunt, M. Van Duijn, & T. Snijders, "Friendship networks through time: An actor-oriented dynamic statistical network model." Comp. & Math. Org. Theory 5(2), 167-192 (1999)', 'https://doi.org/10.1023/A:1009683123448'),
('G. G. van de Bunt, "Friends by Choice: An Actor-Oriented Statistical Network Model for Friendship Networks Through Time." Thesis Publishers, Amsterdam (1999)', 'https://scholar.google.com/scholar?q=van+de+Bunt+%22Friends+by+choice%22+1999')]
-icon_hash = ['57e18bf28cf714f319c38bdc',
- '595b22a9549f067e0263b53d']
+date_added = '2020-08-11'
upstream_license = None
upstream_prefix = 'https://web.archive.org/web/20210115130726id_/http://moreno.ss.uci.edu'
files = [(('vdb.dat', 'vdbatt.dat'), None, None)]
[entries] Prefix the properties in the descriptions with (Node), (Edge) or (Graph) 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/college_freshmen/__init__.py b/entries/college_freshmen/__init__.py
index 4c4ab5d..945b569 100644
--- a/entries/college_freshmen/__init__.py
+++ b/entries/college_freshmen/__init__.py
@@ -25,8 +25,12 @@ A directed edge $i \to j$ indicates that student $i$ rated their relationship wi
The network has the following properties:
-- Nodes: `male`, whether the student is male; `program`, the length of the education program (2, 3 or 4 years); `smoker`, whether the student smokes; `nonresponse`, the waves in which all the ratings of the student are coded as actor non-response.
-- Edges: `wave`, the wave of the rating (0 to 6); `rating`, the relationship code (1: best friendship, 2: friendship, 3: friendly relationship, 4: neutral relationship, 5: troubled relationship)."""
+- (Node) `male`: whether the student is male.
+- (Node) `program`: the length of the education program (2, 3 or 4 years).
+- (Node) `smoker`: whether the student smokes.
+- (Node) `nonresponse`: the waves in which all the ratings of the student are coded as actor non-response.
+- (Edge) `wave`: the wave of the rating (0 to 6).
+- (Edge) `rating`: the relationship code (1: best friendship, 2: friendship, 3: friendly relationship, 4: neutral relationship, 5: troubled relationship)."""
tags = ['Social', 'Offline', 'Weighted', 'Temporal', 'Multigraph', 'Metadata']
url = 'https://web.archive.org/web/20210115130726/http://moreno.ss.uci.edu/data.html#vdb'
citation = [('G. Van de Bunt, M. Van Duijn, & T. Snijders, "Friendship networks through time: An actor-oriented dynamic statistical network model." Comp. & Math. Org. Theory 5(2), 167-192 (1999)', 'https://doi.org/10.1023/A:1009683123448'),
[entries] Remove unneeded code from the entries 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/college_freshmen/__init__.py b/entries/college_freshmen/__init__.py
index 98dce0e..4c4ab5d 100644
--- a/entries/college_freshmen/__init__.py
+++ b/entries/college_freshmen/__init__.py
@@ -47,7 +47,6 @@ def fetch_upstream(force=False):
@coerce_props(vforce={"male": "bool", "smoker": "bool"})
@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 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/college_freshmen/__init__.py b/entries/college_freshmen/__init__.py
index 2ab60b9..98dce0e 100644
--- a/entries/college_freshmen/__init__.py
+++ b/entries/college_freshmen/__init__.py
@@ -19,21 +19,32 @@
from .. import *
title = "Dutch college freshman (1995)"
-description = """A small network of friendships among freshmen at Dutch College in 1994-1995. Friendship ties were surveyed at 7 different times over the year, and each edge is timestamped. The direction of an edge indicates that person i named person j, and the edge weight represents their level of friendship, ranging from -1 (risk of conflict) to +3 (best friend).[^icon]
-[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
-tags = ['Social', 'Offline', 'Weighted', 'Timestamps']
-url = 'http://konect.cc/networks/moreno_vdb'
-citation = [('G. Van de Bunt, M. Van Duijn, & T. Snijders, "Friendship networks through time: An actor-oriented dynamic statistical network model." Comp. & Math. Org. Theory 5(2), 167-192 (1999)', 'https://doi.org/10.1023/A:1009683123448')]
-icon_hash = '57e18bf28cf714f319c38bdc'
-upstream_prefix = 'http://konect.cc/files'
-files = [('download.tsv.moreno_vdb.tar.bz2', None, 'konect')]
+description = r"""Relationships among 32 university freshmen in the Netherlands, collected by G. G. van de Bunt in 1994–1995, and analyzed with an actor-oriented model of network dynamics by van de Bunt, van Duijn and Snijders (1999). Except for a few existing relationships (acquaintances from a former school), the students did not know each other at the first measurement. The data were collected at seven time points (waves 0 to 6); the first four are three weeks apart, and the last three are six weeks apart. The original group consisted of 49 students, but after removing university drop-outs and those who did not fill in the questionnaire four or more times, a group of 32 students with almost complete data was obtained. At each wave, the students rated their relationship with each of the others as: 1, best friendship (persons whom they would call their "real" friends); 2, friendship (a good relationship, but not (yet) a "real" friend); 3, friendly relationship (regular pleasant contact during classes, which could grow into a friendship); 4, neutral relationship (not much in common; the chance of a friendship is not large); 5, troubled relationship (a person with whom they cannot get on very well, with a certain risk of conflict); or 0, unknown person. The students followed three different education programs, which overlapped largely during the first months, but diverged afterwards. Smoking was only allowed in special areas, so smokers had to separate themselves from non-smokers when they wished to smoke. The data were distributed by L. C. Freeman on his network data page at the University of California, Irvine (no longer online), from which this version was obtained via the Internet Archive.
+
+A directed edge $i \to j$ indicates that student $i$ rated their relationship with student $j$ with a code from 1 to 5 in a given wave; there is one edge per wave in which a rating was given. Ratings coded as 0 (unknown person), 6 (item non-response) or 9 (actor non-response) are not represented as edges.
+
+The network has the following properties:
+
+- Nodes: `male`, whether the student is male; `program`, the length of the education program (2, 3 or 4 years); `smoker`, whether the student smokes; `nonresponse`, the waves in which all the ratings of the student are coded as actor non-response.
+- Edges: `wave`, the wave of the rating (0 to 6); `rating`, the relationship code (1: best friendship, 2: friendship, 3: friendly relationship, 4: neutral relationship, 5: troubled relationship)."""
+tags = ['Social', 'Offline', 'Weighted', 'Temporal', 'Multigraph', 'Metadata']
+url = 'https://web.archive.org/web/20210115130726/http://moreno.ss.uci.edu/data.html#vdb'
+citation = [('G. Van de Bunt, M. Van Duijn, & T. Snijders, "Friendship networks through time: An actor-oriented dynamic statistical network model." Comp. & Math. Org. Theory 5(2), 167-192 (1999)', 'https://doi.org/10.1023/A:1009683123448'),
+ ('G. G. van de Bunt, "Friends by Choice: An Actor-Oriented Statistical Network Model for Friendship Networks Through Time." Thesis Publishers, Amsterdam (1999)', 'https://scholar.google.com/scholar?q=van+de+Bunt+%22Friends+by+choice%22+1999')]
+icon_hash = ['57e18bf28cf714f319c38bdc',
+ '595b22a9549f067e0263b53d']
+upstream_license = None
+upstream_prefix = 'https://web.archive.org/web/20210115130726id_/http://moreno.ss.uci.edu'
+files = [(('vdb.dat', 'vdbatt.dat'), None, None)]
def fetch_upstream(force=False):
- return fetch_upstream_files(__name__.split(".")[-1], upstream_prefix, files,
- force)
+ # The Wayback Machine refuses connections or fails when rate-limited, so
+ # retry with increasing pauses (files already fetched are skipped)
+ return retry_download(fetch_upstream_files, __name__.split(".")[-1],
+ upstream_prefix, files, force)
@cache_network()
-@coerce_props()
+@coerce_props(vforce={"male": "bool", "smoker": "bool"})
@annotate()
def parse(alts=None):
global files
@@ -44,6 +55,29 @@ def parse(alts=None):
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=True)
+ fs = [stack.enter_context(open_upstream_file(name, fn, "rb"))
+ for fn in fnames]
+ ds = [read_dl(f, pad=False) for f in fs]
+ d, da = ds
+ assert d["levels"] == [f"TIME_{k}" for k in range(7)]
+ assert da["cols"] == ["GENDER", "PROGRAM", "SMOKING"]
+ N = d["nr"]
+ g = Graph(directed=True)
+ g.add_vertex(N)
+ g.ep.wave = g.new_ep("int")
+ g.ep.rating = g.new_ep("int")
+ nonresp = [[] for i in range(N)]
+ for k, A in enumerate(d["data"]):
+ A = A.astype("int")
+ i, j = numpy.nonzero((A >= 1) & (A <= 5))
+ g.add_edge_list(numpy.array([i, j, numpy.full(len(i), k), A[i, j]]).T,
+ eprops=[g.ep.wave, g.ep.rating])
+ for i in range(N):
+ if all(A[i, j] == 9 for j in range(N) if j != i):
+ nonresp[i].append(k)
+ X = da["data"][0].astype("int")
+ g.vp.male = g.new_vp("bool", vals=X[:, 0] == 2)
+ g.vp.program = g.new_vp("int", vals=X[:, 1])
+ g.vp.smoker = g.new_vp("bool", vals=X[:, 2] == 1)
+ g.vp.nonresponse = g.new_vp("vector<int>", vals=nonresp)
yield alt, g
Update copyright information 73a4f0d
diff --git a/entries/college_freshmen/__init__.py b/entries/college_freshmen/__init__.py
index bd841bc..2ab60b9 100644
--- a/entries/college_freshmen/__init__.py
+++ b/entries/college_freshmen/__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 3d288ea
diff --git a/entries/college_freshmen/__init__.py b/entries/college_freshmen/__init__.py
index 04f4671..bd841bc 100644
--- a/entries/college_freshmen/__init__.py
+++ b/entries/college_freshmen/__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 8d005ae
diff --git a/entries/college_freshmen/__init__.py b/entries/college_freshmen/__init__.py
index 14e9357..04f4671 100644
--- a/entries/college_freshmen/__init__.py
+++ b/entries/college_freshmen/__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 db2efcc
diff --git a/entries/college_freshmen/__init__.py b/entries/college_freshmen/__init__.py
index d19c0ee..14e9357 100644
--- a/entries/college_freshmen/__init__.py
+++ b/entries/college_freshmen/__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 894eba5
KONECT has been brought back from the dead for the time being.
diff --git a/entries/college_freshmen/__init__.py b/entries/college_freshmen/__init__.py
index 21a9b44..d19c0ee 100644
--- a/entries/college_freshmen/__init__.py
+++ b/entries/college_freshmen/__init__.py
@@ -26,7 +26,6 @@ url = 'http://konect.cc/networks/moreno_vdb'
citation = [('G. Van de Bunt, M. Van Duijn, & T. Snijders, "Friendship networks through time: An actor-oriented dynamic statistical network model." Comp. & Math. Org. Theory 5(2), 167-192 (1999)', 'https://doi.org/10.1023/A:1009683123448')]
icon_hash = '57e18bf28cf714f319c38bdc'
upstream_prefix = 'http://konect.cc/files'
-orphan = True
files = [('download.tsv.moreno_vdb.tar.bz2', None, 'konect')]
def fetch_upstream(force=False):
Update citations to use DOIs e878874
diff --git a/entries/college_freshmen/__init__.py b/entries/college_freshmen/__init__.py
index bfae93f..21a9b44 100644
--- a/entries/college_freshmen/__init__.py
+++ b/entries/college_freshmen/__init__.py
@@ -23,7 +23,7 @@ description = """A small network of friendships among freshmen at Dutch College
[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
tags = ['Social', 'Offline', 'Weighted', 'Timestamps']
url = 'http://konect.cc/networks/moreno_vdb'
-citation = [('G. Van de Bunt, M. Van Duijn, & T. Snijders, "Friendship networks through time: An actor-oriented dynamic statistical network model." Comp. & Math. Org. Theory 5(2), 167-192 (1999)', 'http://link.springer.com/article/10.1023/A:1009683123448')]
+citation = [('G. Van de Bunt, M. Van Duijn, & T. Snijders, "Friendship networks through time: An actor-oriented dynamic statistical network model." Comp. & Math. Org. Theory 5(2), 167-192 (1999)', 'https://doi.org/10.1023/A:1009683123448')]
icon_hash = '57e18bf28cf714f319c38bdc'
upstream_prefix = 'http://konect.cc/files'
orphan = True
Add support for 'orphan' datasets and tag konect entries e330b80
diff --git a/entries/college_freshmen/__init__.py b/entries/college_freshmen/__init__.py
index 2fe75b6..bfae93f 100644
--- a/entries/college_freshmen/__init__.py
+++ b/entries/college_freshmen/__init__.py
@@ -26,6 +26,7 @@ url = 'http://konect.cc/networks/moreno_vdb'
citation = [('G. Van de Bunt, M. Van Duijn, & T. Snijders, "Friendship networks through time: An actor-oriented dynamic statistical network model." Comp. & Math. Org. Theory 5(2), 167-192 (1999)', 'http://link.springer.com/article/10.1023/A:1009683123448')]
icon_hash = '57e18bf28cf714f319c38bdc'
upstream_prefix = 'http://konect.cc/files'
+orphan = True
files = [('download.tsv.moreno_vdb.tar.bz2', None, 'konect')]
def fetch_upstream(force=False):
Change license from GPLv3 to AGPLv3 d754be5
diff --git a/entries/college_freshmen/__init__.py b/entries/college_freshmen/__init__.py
index 1413fa5..2fe75b6 100644
--- a/entries/college_freshmen/__init__.py
+++ b/entries/college_freshmen/__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 1645314
diff --git a/entries/college_freshmen/__init__.py b/entries/college_freshmen/__init__.py
index 5d4e463..1413fa5 100644
--- a/entries/college_freshmen/__init__.py
+++ b/entries/college_freshmen/__init__.py
@@ -19,7 +19,8 @@
from .. import *
title = "Dutch college freshman (1995)"
-description = "A small network of friendships among freshmen at Dutch College in 1994-1995. Friendship ties were surveyed at 7 different times over the year, and each edge is timestamped. The direction of an edge indicates that person i named person j, and the edge weight represents their level of friendship, ranging from -1 (risk of conflict) to +3 (best friend)."
+description = """A small network of friendships among freshmen at Dutch College in 1994-1995. Friendship ties were surveyed at 7 different times over the year, and each edge is timestamped. The direction of an edge indicates that person i named person j, and the edge weight represents their level of friendship, ranging from -1 (risk of conflict) to +3 (best friend).[^icon]
+[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
tags = ['Social', 'Offline', 'Weighted', 'Timestamps']
url = 'http://konect.cc/networks/moreno_vdb'
citation = [('G. Van de Bunt, M. Van Duijn, & T. Snijders, "Friendship networks through time: An actor-oriented dynamic statistical network model." Comp. & Math. Org. Theory 5(2), 167-192 (1999)', 'http://link.springer.com/article/10.1023/A:1009683123448')]
Initial commit cc85872
diff --git a/entries/college_freshmen/__init__.py b/entries/college_freshmen/__init__.py
new file mode 100644
index 0000000..5d4e463
--- /dev/null
+++ b/entries/college_freshmen/__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 = "Dutch college freshman (1995)"
+description = "A small network of friendships among freshmen at Dutch College in 1994-1995. Friendship ties were surveyed at 7 different times over the year, and each edge is timestamped. The direction of an edge indicates that person i named person j, and the edge weight represents their level of friendship, ranging from -1 (risk of conflict) to +3 (best friend)."
+tags = ['Social', 'Offline', 'Weighted', 'Timestamps']
+url = 'http://konect.cc/networks/moreno_vdb'
+citation = [('G. Van de Bunt, M. Van Duijn, & T. Snijders, "Friendship networks through time: An actor-oriented dynamic statistical network model." Comp. & Math. Org. Theory 5(2), 167-192 (1999)', 'http://link.springer.com/article/10.1023/A:1009683123448')]
+icon_hash = '57e18bf28cf714f319c38bdc'
+upstream_prefix = 'http://konect.cc/files'
+files = [('download.tsv.moreno_vdb.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=True)
+ yield alt, g