History of gelada_baboons
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 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/gelada_baboons/__init__.py b/entries/gelada_baboons/__init__.py
index 585bde0..debacce 100644
--- a/entries/gelada_baboons/__init__.py
+++ b/entries/gelada_baboons/__init__.py
@@ -19,7 +19,7 @@
from .. import *
title = 'Gelada baboon grooming (1975)'
-description = """Grooming relations in a colony of gelada baboons (unit H22), from the field study of R. Dunbar and P. Dunbar in Ethiopia, as analyzed by K. Stephenson and M. Zelen. The network was observed at two time points: at the first there were 12 baboons (seven females and five males), and before the second two more baboons (a female and a male) were introduced to the group and accepted. Nodes are baboons, and an undirected edge connects two baboons that were observed grooming each other, weighted by the frequency of grooming. The data were distributed on the Pajek datasets page of the book *Generalized Blockmodeling* (Doreian, Batagelj and Ferligoj), from which this version was obtained. The binarized versions of the networks also distributed there are not included.
+description = """Grooming relations in a colony of gelada baboons (unit H22), from the field study of R. Dunbar and P. Dunbar in Ethiopia, as analyzed by K. Stephenson and M. Zelen. The network was observed at two time points: at the first there were 12 baboons (seven females and five males), and before the second two more baboons (a female and a male) were introduced to the group and accepted. Nodes are baboons, and an undirected edge connects two baboons that were observed grooming each other, weighted by the frequency of grooming. The binarized versions of the networks used in the book *Generalized Blockmodeling* (Doreian, Batagelj and Ferligoj) are not included.
- `t1`: the 12 baboons at the first time point (H22A).
- `t2`: the 14 baboons at the second time point (H22B).
[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/gelada_baboons/__init__.py b/entries/gelada_baboons/__init__.py
index 971e722..585bde0 100644
--- a/entries/gelada_baboons/__init__.py
+++ b/entries/gelada_baboons/__init__.py
@@ -35,7 +35,7 @@ url = 'https://web.archive.org/web/20130507093317/http://vlado.fmf.uni-lj.si/pub
citation = [('R. Dunbar, P. Dunbar, "Social Dynamics of Gelada Baboons." Contributions to Primatology 6, 1-157 (1975)', 'https://web.archive.org/web/20130507093317/http://vlado.fmf.uni-lj.si/pub/networks/data/GBM/baboons.htm'),
('K. Stephenson, M. Zelen, "Rethinking centrality: Methods and examples." Social Networks 11(1), 1-37 (1989)', 'https://doi.org/10.1016/0378-8733(89)90016-6'),
('P. Doreian, V. Batagelj, A. Ferligoj, "Generalized Blockmodeling." Cambridge University Press (2004)', 'https://doi.org/10.1017/CBO9780511584176')]
-icon_hash = '5901f6b362da632511870fea'
+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] 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/gelada_baboons/__init__.py b/entries/gelada_baboons/__init__.py
index 78cc82d..971e722 100644
--- a/entries/gelada_baboons/__init__.py
+++ b/entries/gelada_baboons/__init__.py
@@ -26,8 +26,10 @@ description = """Grooming relations in a colony of gelada baboons (unit H22), fr
The networks have the following properties:
-- Nodes: `name`, a label encoding the sex (F: female, M: male), age class ("adult", or the age in years) and role (D: dominant, L: leader, F: follower, N: newcomer) of the baboon; `code`, a short identifier (f1 to f8 for females, m1 to m6 for males) used in the book *Generalized Blockmodeling*; `female`, whether the baboon is female.
-- Edges: `weight`, the frequency of grooming."""
+- (Node) `name`: a label encoding the sex (F: female, M: male), age class ("adult", or the age in years) and role (D: dominant, L: leader, F: follower, N: newcomer) of the baboon.
+- (Node) `code`: a short identifier (f1 to f8 for females, m1 to m6 for males) used in the book *Generalized Blockmodeling*.
+- (Node) `female`: whether the baboon is female.
+- (Edge) `weight`: the frequency of grooming."""
tags = ['Social', 'Animal', 'Weighted', 'Metadata']
url = 'https://web.archive.org/web/20130507093317/http://vlado.fmf.uni-lj.si/pub/networks/data/GBM/baboons.htm'
citation = [('R. Dunbar, P. Dunbar, "Social Dynamics of Gelada Baboons." Contributions to Primatology 6, 1-157 (1975)', 'https://web.archive.org/web/20130507093317/http://vlado.fmf.uni-lj.si/pub/networks/data/GBM/baboons.htm'),
[entries] New entry: gelada_baboons fcb1157
diff --git a/entries/gelada_baboons/__init__.py b/entries/gelada_baboons/__init__.py
new file mode 100644
index 0000000..78cc82d
--- /dev/null
+++ b/entries/gelada_baboons/__init__.py
@@ -0,0 +1,63 @@
+#! /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 = 'Gelada baboon grooming (1975)'
+description = """Grooming relations in a colony of gelada baboons (unit H22), from the field study of R. Dunbar and P. Dunbar in Ethiopia, as analyzed by K. Stephenson and M. Zelen. The network was observed at two time points: at the first there were 12 baboons (seven females and five males), and before the second two more baboons (a female and a male) were introduced to the group and accepted. Nodes are baboons, and an undirected edge connects two baboons that were observed grooming each other, weighted by the frequency of grooming. The data were distributed on the Pajek datasets page of the book *Generalized Blockmodeling* (Doreian, Batagelj and Ferligoj), from which this version was obtained. The binarized versions of the networks also distributed there are not included.
+
+- `t1`: the 12 baboons at the first time point (H22A).
+- `t2`: the 14 baboons at the second time point (H22B).
+
+The networks have the following properties:
+
+- Nodes: `name`, a label encoding the sex (F: female, M: male), age class ("adult", or the age in years) and role (D: dominant, L: leader, F: follower, N: newcomer) of the baboon; `code`, a short identifier (f1 to f8 for females, m1 to m6 for males) used in the book *Generalized Blockmodeling*; `female`, whether the baboon is female.
+- Edges: `weight`, the frequency of grooming."""
+tags = ['Social', 'Animal', 'Weighted', 'Metadata']
+url = 'https://web.archive.org/web/20130507093317/http://vlado.fmf.uni-lj.si/pub/networks/data/GBM/baboons.htm'
+citation = [('R. Dunbar, P. Dunbar, "Social Dynamics of Gelada Baboons." Contributions to Primatology 6, 1-157 (1975)', 'https://web.archive.org/web/20130507093317/http://vlado.fmf.uni-lj.si/pub/networks/data/GBM/baboons.htm'),
+ ('K. Stephenson, M. Zelen, "Rethinking centrality: Methods and examples." Social Networks 11(1), 1-37 (1989)', 'https://doi.org/10.1016/0378-8733(89)90016-6'),
+ ('P. Doreian, V. Batagelj, A. Ferligoj, "Generalized Blockmodeling." Cambridge University Press (2004)', 'https://doi.org/10.1017/CBO9780511584176')]
+icon_hash = '5901f6b362da632511870fea'
+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/20130523151335id_/http://vlado.fmf.uni-lj.si/pub/networks/data/GBM/baboons'
+files = [('baboons.paj', 't1', None),
+ ('baboons.paj', 't2', 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]
+ items = load_pajek(name, "baboons.paj")
+ nets = [it for it in items if it["kind"] == "network"]
+ for alt, net, bnet, clu in [("t1", nets[0], nets[1], "H22Agender"),
+ ("t2", nets[2], nets[3], "H22Bgender")]:
+ if alts is not None and alt not in alts:
+ continue
+ g = pajek_graph(net, symmetrize=True)
+ g.vp.code = g.new_vp("string", vals=bnet["labels"])
+ set_pajek_partition(g, get_pajek_item(items, "partition", clu), "female", "bool",
+ transform=lambda x: x == 1)
+ yield alt, g