logo Netzschleuder network catalog, repository, and centrifuge

History of cross_parker

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/cross_parker/__init__.py b/entries/cross_parker/__init__.py
index bd41f92..4f4a41b 100644
--- a/entries/cross_parker/__init__.py
+++ b/entries/cross_parker/__init__.py
@@ -45,7 +45,7 @@ The networks have the following properties:
 tags = ['Social', 'Offline', 'Multilayer', 'Weighted', 'Metadata']
 url = 'https://toreopsahl.com/datasets/#Cross_Parker'
 citation = [('R. Cross, A. Parker, "The Hidden Power of Social Networks: Understanding How Work Really Gets Done in Organizations." Harvard Business School Press (2004)', 'https://scholar.google.com/scholar?q=%22The+Hidden+Power+of+Social+Networks%22+Cross+Parker')]
-icon_hash = '56a85c8e26855e083a2f78e8'
+date_added = '2026-10-25'
 upstream_license = None
 upstream_prefix = 'http://opsahl.co.uk/tnet/datasets'
 
[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/cross_parker/__init__.py b/entries/cross_parker/__init__.py
index ccba94f..bd41f92 100644
--- a/entries/cross_parker/__init__.py
+++ b/entries/cross_parker/__init__.py
@@ -33,9 +33,15 @@ In all cases, the value 0 ("I do not know this person" / "I have never met this
 
 The networks have the following properties:
 
-- `consulting`: Nodes: `orglevel`, the organizational level (1: research assistant, 2: junior consultant, 3: senior consultant, 4: managing consultant, 5: partner); `gender` (1: male, 2: female); `region` (1: Europe, 2: USA); `location` (1: Boston, 2: London, 3: Paris, 4: Rome, 5: Madrid, 6: Oslo, 7: Copenhagen).
-- `manufacturing`: Nodes: `location` (1: Paris, 2: Frankfurt, 3: Warsaw, 4: Geneva); `tenure` (1: 1-12 months, 2: 13-36 months, 3: 37-60 months, 4: 61+ months); `orglevel`, the organizational level (1: global department manager, 2: local department manager, 3: project leader, 4: researcher).
-- Edges: `layer`, the relation (see above); `weight`, the answer in the scale of the relation."""
+- (Node) `orglevel` (`consulting`): the organizational level (1: research assistant, 2: junior consultant, 3: senior consultant, 4: managing consultant, 5: partner).
+- (Node) `gender` (`consulting`): 1: male, 2: female.
+- (Node) `region` (`consulting`): 1: Europe, 2: USA.
+- (Node) `location` (`consulting`): 1: Boston, 2: London, 3: Paris, 4: Rome, 5: Madrid, 6: Oslo, 7: Copenhagen.
+- (Node) `location` (`manufacturing`): 1: Paris, 2: Frankfurt, 3: Warsaw, 4: Geneva.
+- (Node) `tenure` (`manufacturing`): 1: 1-12 months, 2: 13-36 months, 3: 37-60 months, 4: 61+ months.
+- (Node) `orglevel` (`manufacturing`): the organizational level (1: global department manager, 2: local department manager, 3: project leader, 4: researcher).
+- (Edge) `layer`: the relation (see above).
+- (Edge) `weight`: the answer in the scale of the relation."""
 tags = ['Social', 'Offline', 'Multilayer', 'Weighted', 'Metadata']
 url = 'https://toreopsahl.com/datasets/#Cross_Parker'
 citation = [('R. Cross, A. Parker, "The Hidden Power of Social Networks: Understanding How Work Really Gets Done in Organizations." Harvard Business School Press (2004)', 'https://scholar.google.com/scholar?q=%22The+Hidden+Power+of+Social+Networks%22+Cross+Parker')]
[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/cross_parker/__init__.py b/entries/cross_parker/__init__.py
index 51f5c42..ccba94f 100644
--- a/entries/cross_parker/__init__.py
+++ b/entries/cross_parker/__init__.py
@@ -59,7 +59,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] New entry: cross_parker by Tiago de Paula Peixoto dd5d7b9
diff --git a/entries/cross_parker/__init__.py b/entries/cross_parker/__init__.py
new file mode 100644
index 0000000..51f5c42
--- /dev/null
+++ b/entries/cross_parker/__init__.py
@@ -0,0 +1,86 @@
+#! /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 = "Cross and Parker intra-organizational networks (2004)"
+description = """Advice and knowledge networks among the employees of two organizations, collected by surveys and used by R. Cross and A. Parker in their book on informal networks in organizations. The data were distributed by T. Opsahl.
+
+- `consulting`: 46 employees of a consulting company, with two relations (layers):
+  - `advice`: frequency of information or advice requests ("Please indicate how often you have turned to this person for information or advice on work-related topics in the past three months"), from 1 to 5 (1: never, 2: seldom, 3: sometimes, 4: often, 5: very often).
+  - `value`: the value placed on the information or advice received ("For each person in the list below, please show how strongly you agree or disagree with the following statement: In general, this person has expertise in areas that are important in the kind of work I do"), from 1 (strongly disagree) to 5 (strongly agree).
+- `manufacturing`: 77 employees of the research team of a manufacturing company, with two relations (layers):
+  - `advice`: extent to which the person provides information used to accomplish one's work ("Please indicate the extent to which the people listed below provide you with information you use to accomplish your work"), from 1 (very infrequently) to 6 (very frequently).
+  - `awareness`: awareness of the person's knowledge and skills ("I understand this person's knowledge and skills. This does not necessarily mean that I have these skills or am knowledgeable in these domains but that I understand what skills this person has and domains they are knowledgeable in"), from 1 (strongly disagree) to 6 (strongly agree).
+
+In all cases, the value 0 ("I do not know this person" / "I have never met this person") corresponds to the absence of an edge. A directed edge (i, j) corresponds to the answer of employee i about employee j. A few self-loops are present in the source data.
+
+The networks have the following properties:
+
+- `consulting`: Nodes: `orglevel`, the organizational level (1: research assistant, 2: junior consultant, 3: senior consultant, 4: managing consultant, 5: partner); `gender` (1: male, 2: female); `region` (1: Europe, 2: USA); `location` (1: Boston, 2: London, 3: Paris, 4: Rome, 5: Madrid, 6: Oslo, 7: Copenhagen).
+- `manufacturing`: Nodes: `location` (1: Paris, 2: Frankfurt, 3: Warsaw, 4: Geneva); `tenure` (1: 1-12 months, 2: 13-36 months, 3: 37-60 months, 4: 61+ months); `orglevel`, the organizational level (1: global department manager, 2: local department manager, 3: project leader, 4: researcher).
+- Edges: `layer`, the relation (see above); `weight`, the answer in the scale of the relation."""
+tags = ['Social', 'Offline', 'Multilayer', 'Weighted', 'Metadata']
+url = 'https://toreopsahl.com/datasets/#Cross_Parker'
+citation = [('R. Cross, A. Parker, "The Hidden Power of Social Networks: Understanding How Work Really Gets Done in Organizations." Harvard Business School Press (2004)', 'https://scholar.google.com/scholar?q=%22The+Hidden+Power+of+Social+Networks%22+Cross+Parker')]
+icon_hash = '56a85c8e26855e083a2f78e8'
+upstream_license = None
+upstream_prefix = 'http://opsahl.co.uk/tnet/datasets'
+
+layers = {"consulting": [("advice", "Consulting_info"), ("value", "Consulting_value")],
+          "manufacturing": [("advice", "Manufacturing_info"), ("awareness", "Manufacturing_aware")]}
+vprops = {"consulting": ["orglevel", "gender", "region", "location"],
+          "manufacturing": ["location", "tenure", "orglevel"]}
+files = [(tuple([f"Cross_Parker-{f}.txt" for l, f in layers[org]] +
+                [f"Cross_Parker-{org.capitalize()}-{p}.txt" for p in vprops[org]]),
+          org, None) for org in ["consulting", "manufacturing"]]
+
+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
+        with ExitStack() as stack:
+            fs = [stack.enter_context(open_upstream_file(name, fn, "r"))
+                  for fn in fnames]
+            nl = len(layers[alt])
+            vals = [[int(x) for x in f.read().split()] for f in fs[nl:]]
+            g = Graph(directed=True)
+            g.add_vertex(len(vals[0]))
+            for p, v in zip(vprops[alt], vals):
+                g.vp[p] = g.new_vp("int", vals=v)
+            g.ep.layer = g.new_ep("string")
+            g.ep.weight = g.new_ep("int")
+            for (layer, _), f in zip(layers[alt], fs[:nl]):
+                edges = numpy.loadtxt(f, dtype="int")
+                edges[:, :2] -= 1
+                ne = g.num_edges()
+                g.add_edge_list(edges, eprops=[g.ep.weight])
+                for e in g.edges():
+                    if g.edge_index[e] >= ne:
+                        g.ep.layer[e] = layer
+        yield alt, g