logo Netzschleuder network catalog, repository, and centrifuge

History of sp_hypertext

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] Fix parse bugs and improve descriptions and metadata by Tiago de Paula Peixoto 6bb6851
- parse fixes from the review of the descriptions, e.g. us_patents
  (directed), celegans_2019 (synapse direction), ecoli_transcription and
  yeast_transcription (regulator to target), bitcoin (direction, phantom
  node), ego_social (Google+ features and circles), scotus_majority,
  arxiv_authors and social_location (as in SNAP), caida_as, dnc, dom,
  mist, reuters and bibsonomy (names on the right nodes), uci_zoo
- every description now states explicitly what the nodes and edges
  represent; corrected titles, years, tags, citations and licences
- the "Hypergraph" tag is removed; very large entries are marked
  `huge = True` (see --skip-huge)
- ICON ids of partial duplicates added (hiv_transmission, congress_bills,
  openflights, dutch_school)
diff --git a/entries/sp_hypertext/__init__.py b/entries/sp_hypertext/__init__.py
index 0d80381..6ecb779 100644
--- a/entries/sp_hypertext/__init__.py
+++ b/entries/sp_hypertext/__init__.py
@@ -22,25 +22,25 @@ import csv
 import json
 
 title = "Hypertext 2009 dynamic contact network"
-description = """The temporal network of contacts among attendees of the ACM Hypertext 2009 conference, which spanned 2.5 days of time.[^icon]
+description = r"""Temporal network of face-to-face proximity contacts among about 110 attendees of the ACM Hypertext 2009 conference in Turin, Italy, over about 2.5 days (29 June to 1 July 2009). The data were collected by the SocioPatterns collaboration as part of the Live Social Semantics application: attendees volunteered to wear radio badges that detected face-to-face proximity. Nodes are attendees. No personal data or other metadata are included. The data are provided in two forms:
 
-This dataset was collected during the ACM Hypertext 2009 conference, where the SocioPatterns project deployed the Live Social Semantics application. Conference attendees volunteered to wear radio badges that monitored their face-to-face proximity. The dataset published here represents the dynamical network of face-to-face proximity of ~110 conference attendees over about 2.5 days. No personal data are released here, and no metadata collected by the Live Social Semantics application are exposed. We provide two data files, described below.
+- `contacts`: each edge is a contact between two attendees active during a 20-second interval of the data collection, so that a pair of attendees is connected by one edge per interval in which they were in contact.
+- `intervals`: each edge is a pair of attendees that were in contact at least once, annotated with the list of time intervals during which the contact was active.
 
-Contact List. This is a tab-separated list representing the active contacts during 20-second intervals of the data collection. Each line has the form “t i j“, where i and j are the anonymous IDs of the persons in contact, and the interval during which this contact was active is [ t – 20s, t ]. If multiple contacts are active in a given interval, you will see multiple lines starting with the same value of t. Time is measured in seconds since 8am on Jun 29th 2009 (UNIX ctime 1246255200).
+The networks have the following properties:
 
-Contact Intervals. This file is in JSON format and contains a dictionary. Each key is a person ID and the corresponding value is a dictionary of neighbors of that person in the contact network. This dictionary of neighbors has person IDs as keys and, for each key, the value gives the list of time intervals during which the corresponding contact was active. Time is measured as above.
-
-[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project.
-"""
+- `id`: the anonymous identifier of the attendee.
+- `time` (`contacts`): the end of the 20-second interval $[t - 20\,\text{s}, t]$ during which the contact was active, in seconds since 8:00 am of 29 June 2009 (UNIX time 1246255200).
+- `intervals` (`intervals`): the list of time intervals `[start, end]` of the contact, in the same units as `time`."""
 tags = ['Social', 'Offline', 'Unweighted', 'Temporal']
-url = 'http://www.sociopatterns.org/datasets/hypertext-2009-dynamic-contact-network/'
+url = 'https://sociopatterns.org/datasets/hypertext-2009-dynamic-contact-network/'
 citation = [('L. Isella et al., "What’s in a crowd? Analysis of face-to-face behavioral networks." J. Theor. Bio. 271, 166-180 (2011).', 'http://arxiv.org/abs/1006.1260')]
 icon_hash = '56a85c8e26855e083a2f78da'
-ustream_license = ("Creative Commons Attribution-NonCommercial-ShareAlike",
+upstream_license = ("Creative Commons Attribution-NonCommercial-ShareAlike",
                    "http://creativecommons.org/licenses/by-nc-sa/3.0/")
-upstream_prefix = 'http://www.sociopatterns.org/files/datasets/003'
-files = [('ht09_contact_list.dat.gz', 'contacts', None),
-         ('ht09_contact_intervals.json.gz', 'intervals', None)]
+upstream_prefix = 'https://sociopatterns.org/assets/data'
+files = [('ht2009_contact_list.dat.gz', 'contacts', None),
+         ('ht2009_contact_intervals.json.gz', 'intervals', None)]
 
 def fetch_upstream(force=False):
     return fetch_upstream_files(__name__.split(".")[-1], upstream_prefix, files,
@@ -77,7 +77,7 @@ def parse(alts=None):
                 def get_vertex(n):
                     if n not in vs:
                         vs[n] = v = g.add_vertex()
-                        g.vp.id[v] = node
+                        g.vp.id[v] = int(n)
                         return v
                     return vs[n]
 
Update copyright information by Tiago de Paula Peixoto 73a4f0d
diff --git a/entries/sp_hypertext/__init__.py b/entries/sp_hypertext/__init__.py
index cd2838c..0d80381 100644
--- a/entries/sp_hypertext/__init__.py
+++ b/entries/sp_hypertext/__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 by Tiago de Paula Peixoto 3d288ea
diff --git a/entries/sp_hypertext/__init__.py b/entries/sp_hypertext/__init__.py
index fa99798..cd2838c 100644
--- a/entries/sp_hypertext/__init__.py
+++ b/entries/sp_hypertext/__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 by Tiago de Paula Peixoto 8d005ae
diff --git a/entries/sp_hypertext/__init__.py b/entries/sp_hypertext/__init__.py
index be0fedc..fa99798 100644
--- a/entries/sp_hypertext/__init__.py
+++ b/entries/sp_hypertext/__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
sp_hypertext: add missing timestamps by Tiago de Paula Peixoto 95c21dc
diff --git a/entries/sp_hypertext/__init__.py b/entries/sp_hypertext/__init__.py
index 2b983c0..be0fedc 100644
--- a/entries/sp_hypertext/__init__.py
+++ b/entries/sp_hypertext/__init__.py
@@ -70,7 +70,7 @@ def parse(alts=None):
                         yield u, v, t
                 g.ep.time = g.new_ep("int")
                 g.vp.id = g.add_edge_list(get_edges(), hashed=True,
-                                          hash_type="int")
+                                          hash_type="int", eprops=[g.ep.time])
             else:
                 d = json.load(fs[0])
                 vs = {}
Update copyright info by Tiago de Paula Peixoto db2efcc
diff --git a/entries/sp_hypertext/__init__.py b/entries/sp_hypertext/__init__.py
index 9f77b56..2b983c0 100644
--- a/entries/sp_hypertext/__init__.py
+++ b/entries/sp_hypertext/__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
Change license from GPLv3 to AGPLv3 by Tiago de Paula Peixoto d754be5
diff --git a/entries/sp_hypertext/__init__.py b/entries/sp_hypertext/__init__.py
index bf3df57..9f77b56 100644
--- a/entries/sp_hypertext/__init__.py
+++ b/entries/sp_hypertext/__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 by Tiago de Paula Peixoto 1645314
diff --git a/entries/sp_hypertext/__init__.py b/entries/sp_hypertext/__init__.py
index e4987e5..bf3df57 100644
--- a/entries/sp_hypertext/__init__.py
+++ b/entries/sp_hypertext/__init__.py
@@ -22,7 +22,7 @@ import csv
 import json
 
 title = "Hypertext 2009 dynamic contact network"
-description = """The temporal network of contacts among attendees of the ACM Hypertext 2009 conference, which spanned 2.5 days of time.
+description = """The temporal network of contacts among attendees of the ACM Hypertext 2009 conference, which spanned 2.5 days of time.[^icon]
 
 This dataset was collected during the ACM Hypertext 2009 conference, where the SocioPatterns project deployed the Live Social Semantics application. Conference attendees volunteered to wear radio badges that monitored their face-to-face proximity. The dataset published here represents the dynamical network of face-to-face proximity of ~110 conference attendees over about 2.5 days. No personal data are released here, and no metadata collected by the Live Social Semantics application are exposed. We provide two data files, described below.
 
@@ -30,6 +30,7 @@ Contact List. This is a tab-separated list representing the active contacts duri
 
 Contact Intervals. This file is in JSON format and contains a dictionary. Each key is a person ID and the corresponding value is a dictionary of neighbors of that person in the contact network. This dictionary of neighbors has person IDs as keys and, for each key, the value gives the list of time intervals during which the corresponding contact was active. Time is measured as above.
 
+[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project.
 """
 tags = ['Social', 'Offline', 'Unweighted', 'Temporal']
 url = 'http://www.sociopatterns.org/datasets/hypertext-2009-dynamic-contact-network/'
Initial commit by Tiago de Paula Peixoto cc85872
diff --git a/entries/sp_hypertext/__init__.py b/entries/sp_hypertext/__init__.py
new file mode 100644
index 0000000..e4987e5
--- /dev/null
+++ b/entries/sp_hypertext/__init__.py
@@ -0,0 +1,92 @@
+#! /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 *
+
+import csv
+import json
+
+title = "Hypertext 2009 dynamic contact network"
+description = """The temporal network of contacts among attendees of the ACM Hypertext 2009 conference, which spanned 2.5 days of time.
+
+This dataset was collected during the ACM Hypertext 2009 conference, where the SocioPatterns project deployed the Live Social Semantics application. Conference attendees volunteered to wear radio badges that monitored their face-to-face proximity. The dataset published here represents the dynamical network of face-to-face proximity of ~110 conference attendees over about 2.5 days. No personal data are released here, and no metadata collected by the Live Social Semantics application are exposed. We provide two data files, described below.
+
+Contact List. This is a tab-separated list representing the active contacts during 20-second intervals of the data collection. Each line has the form “t i j“, where i and j are the anonymous IDs of the persons in contact, and the interval during which this contact was active is [ t – 20s, t ]. If multiple contacts are active in a given interval, you will see multiple lines starting with the same value of t. Time is measured in seconds since 8am on Jun 29th 2009 (UNIX ctime 1246255200).
+
+Contact Intervals. This file is in JSON format and contains a dictionary. Each key is a person ID and the corresponding value is a dictionary of neighbors of that person in the contact network. This dictionary of neighbors has person IDs as keys and, for each key, the value gives the list of time intervals during which the corresponding contact was active. Time is measured as above.
+
+"""
+tags = ['Social', 'Offline', 'Unweighted', 'Temporal']
+url = 'http://www.sociopatterns.org/datasets/hypertext-2009-dynamic-contact-network/'
+citation = [('L. Isella et al., "What’s in a crowd? Analysis of face-to-face behavioral networks." J. Theor. Bio. 271, 166-180 (2011).', 'http://arxiv.org/abs/1006.1260')]
+icon_hash = '56a85c8e26855e083a2f78da'
+ustream_license = ("Creative Commons Attribution-NonCommercial-ShareAlike",
+                   "http://creativecommons.org/licenses/by-nc-sa/3.0/")
+upstream_prefix = 'http://www.sociopatterns.org/files/datasets/003'
+files = [('ht09_contact_list.dat.gz', 'contacts', None),
+         ('ht09_contact_intervals.json.gz', 'intervals', 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):
+    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, "r")) for fn in fnames]
+
+            g = Graph(directed=False)
+
+            if alt == "contacts":
+                reader = csv.reader(fs[0], delimiter="\t")
+                def get_edges():
+                    for rows in reader:
+                        t, u, v = [int(x) for x in rows[:3]]
+                        yield u, v, t
+                g.ep.time = g.new_ep("int")
+                g.vp.id = g.add_edge_list(get_edges(), hashed=True,
+                                          hash_type="int")
+            else:
+                d = json.load(fs[0])
+                vs = {}
+                def get_vertex(n):
+                    if n not in vs:
+                        vs[n] = v = g.add_vertex()
+                        g.vp.id[v] = node
+                        return v
+                    return vs[n]
+
+                g.ep.intervals = g.new_ep("object")
+                g.vp.id = g.new_vp("int")
+                for node in d.keys():
+                    v = get_vertex(node)
+                    for neighbor, times in d[node].items():
+                        u = get_vertex(neighbor)
+                        e = g.add_edge(v, u)
+                        g.ep.intervals[e] = times
+            g = Graph(g, vorder=g.vp.id)
+        yield alt, g