logo Netzschleuder network catalog, repository, and centrifuge

History of prison_gagnon

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] Remove superfluous details of the upstream distribution from the descriptions by Tiago de Paula Peixoto dc07aa0
The descriptions mentioned incidental details of how the upstream data
are made available: the file formats (CSV, JSON, XML, GEXF, SBML, HIF,
Pajek, UCINET, ...), file names, where the files were published or
obtained from (Zenodo, figshare, Kaggle, the Pajek datasets page, the
Internet Archive), and that some networks are only available in the gt
format. These are left out; caveats about the data themselves are kept,
referring to "the data" instead of "the file". The description of
sp_baboons now lists its properties instead of the upstream columns,
and says that events without a recipient are left out.
diff --git a/entries/prison_gagnon/__init__.py b/entries/prison_gagnon/__init__.py
index 1dcd048..3ccbae3 100644
--- a/entries/prison_gagnon/__init__.py
+++ b/entries/prison_gagnon/__init__.py
@@ -19,7 +19,7 @@
 from .. import *
 
 title = 'Prison inmate friendships (1960)'
-description = """Sociometric choices among 67 prison inmates, collected by J. Gagnon in the 1950s and analyzed by D. MacRae. All inmates were asked "What fellows on the tier are you closest friends with?", and each was free to choose as few or as many friends as he desired. A directed edge points from the inmate making the choice to the chosen one. MacRae characterized the network as "less clear cut" in its internal structure than similar data from schools or residential populations. The data were distributed in UCINET format (from the UCINET data collection of S. P. Borgatti, M. G. Everett and L. C. Freeman) on the Pajek datasets page of V. Batagelj and A. Mrvar, from which this version was obtained."""
+description = """Sociometric choices among 67 prison inmates, collected by J. Gagnon in the 1950s and analyzed by D. MacRae. All inmates were asked "What fellows on the tier are you closest friends with?", and each was free to choose as few or as many friends as he desired. A directed edge points from the inmate making the choice to the chosen one. MacRae characterized the network as "less clear cut" in its internal structure than similar data from schools or residential populations."""
 tags = ['Social', 'Offline', 'Unweighted']
 url = 'https://web.archive.org/web/20020312110633/http://vlado.fmf.uni-lj.si/pub/networks/data/UciNet/UciData.htm'
 citation = [('D. MacRae, "Direct Factor Analysis of Sociometric Data." Sociometry 23(4), 360-371 (1960)', 'https://doi.org/10.2307/2785690'),
[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/prison_gagnon/__init__.py b/entries/prison_gagnon/__init__.py
index 732c593..1dcd048 100644
--- a/entries/prison_gagnon/__init__.py
+++ b/entries/prison_gagnon/__init__.py
@@ -24,7 +24,7 @@ tags = ['Social', 'Offline', 'Unweighted']
 url = 'https://web.archive.org/web/20020312110633/http://vlado.fmf.uni-lj.si/pub/networks/data/UciNet/UciData.htm'
 citation = [('D. MacRae, "Direct Factor Analysis of Sociometric Data." Sociometry 23(4), 360-371 (1960)', 'https://doi.org/10.2307/2785690'),
             ('S. P. Borgatti, M. G. Everett, L. C. Freeman, "UCINET for Windows: Software for Social Network Analysis." Analytic Technologies, Harvard, MA (2002)', 'https://web.archive.org/web/20020312110633/http://vlado.fmf.uni-lj.si/pub/networks/data/UciNet/UciData.htm')]
-icon_hash = '590be7fe62da632511877edf'
+date_added = '2026-10-25'
 upstream_license = None
 # The Pajek data site (vlado.fmf.uni-lj.si) is no longer reachable, so the
 # files are obtained from the Internet Archive.
[entries] New entry: prison_gagnon by Tiago de Paula Peixoto cf225ac
diff --git a/entries/prison_gagnon/__init__.py b/entries/prison_gagnon/__init__.py
new file mode 100644
index 0000000..732c593
--- /dev/null
+++ b/entries/prison_gagnon/__init__.py
@@ -0,0 +1,45 @@
+#! /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 = 'Prison inmate friendships (1960)'
+description = """Sociometric choices among 67 prison inmates, collected by J. Gagnon in the 1950s and analyzed by D. MacRae. All inmates were asked "What fellows on the tier are you closest friends with?", and each was free to choose as few or as many friends as he desired. A directed edge points from the inmate making the choice to the chosen one. MacRae characterized the network as "less clear cut" in its internal structure than similar data from schools or residential populations. The data were distributed in UCINET format (from the UCINET data collection of S. P. Borgatti, M. G. Everett and L. C. Freeman) on the Pajek datasets page of V. Batagelj and A. Mrvar, from which this version was obtained."""
+tags = ['Social', 'Offline', 'Unweighted']
+url = 'https://web.archive.org/web/20020312110633/http://vlado.fmf.uni-lj.si/pub/networks/data/UciNet/UciData.htm'
+citation = [('D. MacRae, "Direct Factor Analysis of Sociometric Data." Sociometry 23(4), 360-371 (1960)', 'https://doi.org/10.2307/2785690'),
+            ('S. P. Borgatti, M. G. Everett, L. C. Freeman, "UCINET for Windows: Software for Social Network Analysis." Analytic Technologies, Harvard, MA (2002)', 'https://web.archive.org/web/20020312110633/http://vlado.fmf.uni-lj.si/pub/networks/data/UciNet/UciData.htm')]
+icon_hash = '590be7fe62da632511877edf'
+upstream_license = None
+# The Pajek data site (vlado.fmf.uni-lj.si) is no longer reachable, so the
+# files are obtained from the Internet Archive.
+upstream_prefix = 'https://web.archive.org/web/20070102222749id_/http://vlado.fmf.uni-lj.si/pub/networks/data/Ucinet'
+files = [('prison.dat', None, None)]
+
+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):
+    name = __name__.split(".")[-1]
+    with open_upstream_file(name, "prison.dat", "rb") as f:
+        Ms = read_dl(f)["data"]
+    yield None, adjacency_graph(Ms[0], directed=True)