logo Netzschleuder network catalog, repository, and centrifuge

History of newcomb_fraternity

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/newcomb_fraternity/__init__.py b/entries/newcomb_fraternity/__init__.py
index 58e6a34..82ff287 100644
--- a/entries/newcomb_fraternity/__init__.py
+++ b/entries/newcomb_fraternity/__init__.py
@@ -38,7 +38,7 @@ citation = [('T. M. Newcomb, "The Acquaintance Process." Holt, Rinehart and Wins
             ('H. C. White, S. A. Boorman, R. L. Breiger, "Social structure from multiple networks. I. Blockmodels of roles and positions." American Journal of Sociology 81(4), 730-780 (1976)', 'https://doi.org/10.1086/226141'),
             ('S. Aref and M. C. Wilson, "Measuring partial balance in signed networks." J. Complex Networks 6(4), 566–595 (2018)', 'https://doi.org/10.1093/comnet/cnx044'),
             ('S. Aref and M. C. Wilson, "Balance and frustration in signed networks." J. Complex Networks 7(2), 163–189 (2019)', 'https://doi.org/10.1093/comnet/cny015')]
-icon_hash = '58654459a411221d0e7c3f5f'
+date_added = '2026-10-25'
 upstream_license = None
 upstream_prefix = 'https://web.archive.org/web/20210115130726id_/http://moreno.ss.uci.edu'
 weeks = [w for w in range(16) if w != 9]
[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/newcomb_fraternity/__init__.py b/entries/newcomb_fraternity/__init__.py
index 2cd6b67..58e6a34 100644
--- a/entries/newcomb_fraternity/__init__.py
+++ b/entries/newcomb_fraternity/__init__.py
@@ -29,8 +29,8 @@ The network `signed_week15` is the undirected signed network that S. Aref and M.
 
 The networks have the following properties:
 
-- Edges (`week0` to `week15`): `rank`, the preference rank (1: first preference, ..., 16: last).
-- Edges (`signed_week15`): `sign`, $+1$ for a reciprocated positive choice and $-1$ for a reciprocated negative choice."""
+- (Edge) `rank` (`week0` to `week15`): the preference rank (1: first preference, ..., 16: last).
+- (Edge) `sign` (`signed_week15`): $+1$ for a reciprocated positive choice and $-1$ for a reciprocated negative choice."""
 tags = ['Social', 'Offline', 'Weighted', 'Signed', 'Temporal']
 url = 'https://web.archive.org/web/20210115130726/http://moreno.ss.uci.edu/data.html#newfrat'
 citation = [('T. M. Newcomb, "The Acquaintance Process." Holt, Rinehart and Winston (1961)', 'https://doi.org/10.1037/13156-000'),
[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/newcomb_fraternity/__init__.py b/entries/newcomb_fraternity/__init__.py
index 40ec4d1..2cd6b67 100644
--- a/entries/newcomb_fraternity/__init__.py
+++ b/entries/newcomb_fraternity/__init__.py
@@ -55,7 +55,6 @@ def fetch_upstream(force=False):
 @coerce_props(vforce={})
 @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] New entry: newcomb_fraternity by Tiago de Paula Peixoto 7cd3747
diff --git a/entries/newcomb_fraternity/__init__.py b/entries/newcomb_fraternity/__init__.py
new file mode 100644
index 0000000..40ec4d1
--- /dev/null
+++ b/entries/newcomb_fraternity/__init__.py
@@ -0,0 +1,92 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# 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
+# 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 Affero General Public License for more
+# details.
+#
+# 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 *
+
+
+title = "Newcomb fraternity preference rankings (1956)"
+description = """Weekly sociometric preference rankings among 17 men attending the University of Michigan in the fall of 1956, as part of the Michigan Group Study Project supervised by T. Newcomb (1953-1956). The men were incoming transfer students without prior acquaintance, recruited to live together in an off-campus (fraternity) house rented for them. Each week, each man ranked all the others by preference, without ties. The data from week 9 are missing. These data were analyzed among others by White, Boorman and Breiger (1976). 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.
+
+The networks `week0` to `week15` (except `week9`) contain one directed edge (i, j) for each pair of men, indicating the rank given by man i to man j.
+
+The network `signed_week15` is the undirected signed network that S. Aref and M. C. Wilson derived from the rankings of the last week (week 15) to study structural balance (Aref and Wilson, 2018 and 2019): ranks 1 to 5 are taken as positive choices and ranks 12 to 16 as negative choices, and two men are connected only if their choices of each other are reciprocated with the same sign (17 men, 40 edges, 17 of them negative). It is computed here from the week 15 rankings.
+
+The networks have the following properties:
+
+- Edges (`week0` to `week15`): `rank`, the preference rank (1: first preference, ..., 16: last).
+- Edges (`signed_week15`): `sign`, $+1$ for a reciprocated positive choice and $-1$ for a reciprocated negative choice."""
+tags = ['Social', 'Offline', 'Weighted', 'Signed', 'Temporal']
+url = 'https://web.archive.org/web/20210115130726/http://moreno.ss.uci.edu/data.html#newfrat'
+citation = [('T. M. Newcomb, "The Acquaintance Process." Holt, Rinehart and Winston (1961)', 'https://doi.org/10.1037/13156-000'),
+            ('P. G. Nordlie, "A longitudinal study of interpersonal attraction in a natural group setting." Doctoral dissertation, University of Michigan (1958)', 'https://scholar.google.com/scholar?q=Nordlie+%22A+longitudinal+study+of+interpersonal+attraction+in+a+natural+group+setting%22'),
+            ('H. C. White, S. A. Boorman, R. L. Breiger, "Social structure from multiple networks. I. Blockmodels of roles and positions." American Journal of Sociology 81(4), 730-780 (1976)', 'https://doi.org/10.1086/226141'),
+            ('S. Aref and M. C. Wilson, "Measuring partial balance in signed networks." J. Complex Networks 6(4), 566–595 (2018)', 'https://doi.org/10.1093/comnet/cnx044'),
+            ('S. Aref and M. C. Wilson, "Balance and frustration in signed networks." J. Complex Networks 7(2), 163–189 (2019)', 'https://doi.org/10.1093/comnet/cny015')]
+icon_hash = '58654459a411221d0e7c3f5f'
+upstream_license = None
+upstream_prefix = 'https://web.archive.org/web/20210115130726id_/http://moreno.ss.uci.edu'
+weeks = [w for w in range(16) if w != 9]
+files = [('newfrat.dat', f'week{w}', None) for w in weeks] + \
+        [('newfrat.dat', 'signed_week15', None)]
+
+def fetch_upstream(force=False):
+    # 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(vforce={})
+@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]
+            ds = [read_dl(f, pad=False) for f in fs]
+        d = ds[0]
+        signed = alt.startswith("signed_")
+        week = alt.removeprefix("signed_")
+        k = d["levels"].index("NEWC" + week[4:])
+        g = matrix_graph(d["data"][k:k+1], True)
+        g.ep.rank = g.ep.weight
+        del g.ep["weight"]
+        if signed:
+            # Aref & Wilson: ranks 1-5 are positive and 12-16 negative
+            # choices; keep the pairs whose choices are reciprocated with the
+            # same sign
+            choice = {}
+            for e in g.edges():
+                r = g.ep.rank[e]
+                if r <= 5 or r >= 12:
+                    choice[(int(e.source()), int(e.target()))] = 1 if r <= 5 else -1
+            u = Graph(directed=False)
+            u.add_vertex(g.num_vertices())
+            u.ep.sign = u.new_ep("int")
+            u.add_edge_list([(i, j, s) for (i, j), s in choice.items()
+                             if i < j and choice.get((j, i)) == s],
+                            eprops=[u.ep.sign])
+            g = u
+        yield alt, g