logo Netzschleuder network catalog, repository, and centrifuge

History of contact

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/contact/__init__.py b/entries/contact/__init__.py
index ce1cf69..9d9b760 100644
--- a/entries/contact/__init__.py
+++ b/entries/contact/__init__.py
@@ -37,7 +37,7 @@ url = ['https://ieee-dataport.org/open-access/crawdad-cambridgehaggle-v-2009-05-
 citation = [('A. Chaintreau, P. Hui, J. Crowcroft, C. Diot, R. Gass, J. Scott, "Impact of Human Mobility on Opportunistic Forwarding Algorithms." IEEE Transactions on Mobile Computing 6(6), 606-620 (2007)', 'https://doi.org/10.1109/tmc.2007.1060'),
             ('P. Hui, J. Crowcroft, E. Yoneki, "BUBBLE Rap: Social-based Forwarding in Delay Tolerant Networks." Proceedings of the 9th ACM International Symposium on Mobile Ad Hoc Networking and Computing (MobiHoc), 241-250 (2008)', 'https://doi.org/10.1145/1374618.1374652'),
             ('J. Scott, R. Gass, J. Crowcroft, P. Hui, C. Diot, A. Chaintreau, "CRAWDAD dataset cambridge/haggle (v. 2009-05-29)." CRAWDAD (2009)', 'https://doi.org/10.15783/C70011')]
-icon_hash = '57cf1f0b67351c5e0ccd7a0d'
+date_added = '2020-08-11'
 upstream_license = None
 upstream_prefix = 'https://raw.githubusercontent.com/kunegis/konect-extr/4886bc43365080787c9cdc6852f4d7e5635097cb/extr/contact'
 files = [('contacts.Exp3.dat', None, None)]
[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/contact/__init__.py b/entries/contact/__init__.py
index bc664b2..ce1cf69 100644
--- a/entries/contact/__init__.py
+++ b/entries/contact/__init__.py
@@ -25,8 +25,12 @@ Each node is a device: nodes 1 to 41 are the iMotes, and nodes 42 to 274 are the
 
 The network has the following properties:
 
-- Nodes: `is_imote`, whether the device is one of the iMotes (otherwise an external device).
-- Edges: `time`, the first time at which the iMote recorded the device in the contact, in seconds from the beginning of the trace; `end_time`, the last time at which it recorded it (equal to `time` for contacts seen in a single scan); `duration`, the difference of these two times, in seconds; `contact_number`, the number of the contact among those of the same pair of devices (1, 2, ...); `gap`, the time between the beginning of the contact and the end of the previous contact of the same pair, in seconds (0 for the first contact of a pair)."""
+- (Node) `is_imote`: whether the device is one of the iMotes (otherwise an external device).
+- (Edge) `time`: the first time at which the iMote recorded the device in the contact, in seconds from the beginning of the trace.
+- (Edge) `end_time`: the last time at which it recorded it (equal to `time` for contacts seen in a single scan).
+- (Edge) `duration`: the difference of these two times, in seconds.
+- (Edge) `contact_number`: the number of the contact among those of the same pair of devices (1, 2, ...).
+- (Edge) `gap`: the time between the beginning of the contact and the end of the previous contact of the same pair, in seconds (0 for the first contact of a pair)."""
 tags = ['Social', 'Offline', 'Unweighted', 'Multigraph', 'Timestamps', 'Metadata']
 url = ['https://ieee-dataport.org/open-access/crawdad-cambridgehaggle-v-2009-05-29',
        'https://github.com/kunegis/konect-extr/tree/4886bc43365080787c9cdc6852f4d7e5635097cb/extr/contact']
[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/contact/__init__.py b/entries/contact/__init__.py
index 5feb785..bc664b2 100644
--- a/entries/contact/__init__.py
+++ b/entries/contact/__init__.py
@@ -52,7 +52,6 @@ def fetch_upstream(force=False):
 @coerce_props()
 @annotate()
 def parse(alts=None):
-    global files
     name = __name__.split(".")[-1]
     for fname, alt, fmt in files:
         if alts is not None and alt not in alts:
[entries] Move contact, convote_mentions, douban, email_company, epinions, flixster, football_league_results, hyves, lastfm, libimseti, livemocha, reuters, sa_companies, sister_cities, tripadvisor_ratings, wikilens_ratings and wikipedia_discussions_de to their original sources by Tiago de Paula Peixoto 8f097de
These entries downloaded KONECT's copies of the data. They now download
the original data (live, from pinned Wayback Machine snapshots, or by
re-extracting from public dumps), gaining the metadata KONECT dropped
(names, identifiers, timestamps, attributes), with descriptions and
citations rewritten from the original sources and factual errors fixed
(years and periods of contact, email_company, douban, flixster,
libimseti, sa_companies; the rated objects of epinions; the sign of
convote_mentions; songs merged by title alone in lastfm).

New networks: the trust network of epinions, the links of
wikilens_ratings, the JSON crawl of tripadvisor_ratings, and current
versions of sister_cities and wikipedia_discussions_de next to the ones
KONECT used. asu_social_networks only loses its mention of KONECT.

Changed: upstream contact convote_mentions douban email_company epinions flixster football_league_results hyves lastfm libimseti livemocha reuters sa_companies sister_cities tripadvisor_ratings wikilens_ratings wikipedia_discussions_de
diff --git a/entries/contact/__init__.py b/entries/contact/__init__.py
index 1279ac0..5feb785 100644
--- a/entries/contact/__init__.py
+++ b/entries/contact/__init__.py
@@ -18,15 +18,31 @@
 
 from .. import *
 
-title = "Haggle human proximity network (2006)"
-description = """A network of human proximities, as measured by carried wireless devices. Each node represents a person, and an edge denotes when two people were within a certain proximity of each other, as measured by a wireless protocol (Bluetooth or Wifi). The edges are timestamped.[^icon]
-[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
-tags = ['Social', 'Offline', 'Unweighted', 'Timestamps']
-url = 'http://konect.cc/networks/contact'
-citation = [('A. Chaintreau et al. "Impact of human mobility on opportunistic forwarding algorithms." IEEE Trans. on Mobile Computing 6(6), 606-620 (2007).', 'https://doi.org/10.1109/tmc.2007.1060')]
+title = "Haggle human proximity network (2005)"
+description = """A network of the contacts between Bluetooth devices carried by attendees of the IEEE Infocom 2005 conference in Miami, recorded by the Haggle project (University of Cambridge and Intel Research Cambridge). Small Bluetooth devices (iMotes) were distributed to about 50 students attending a workshop of the conference on 7 March 2005, between lunch time and 5 pm, and collected on 10 March 2005 in the afternoon; each iMote scanned periodically for the other Bluetooth devices in its range, i.e. the other iMotes and any other device with Bluetooth (phones, laptops, ...), and recorded these sightings. Of the 54 iMotes distributed, 41 yielded useful data: two were lost, and the others did not record data because of failures with the batteries and packaging, or accidental resets; the contacts with these were removed from the traces of the other iMotes. The first six hours, when the participants were attending the same workshop, were also discarded. This is the experiment 3 of the Haggle traces (`imote-trace3`), as sent by the authors and distributed in a GitHub repository.
+
+Each node is a device: nodes 1 to 41 are the iMotes, and nodes 42 to 274 are the other devices they recorded (each identified by its Bluetooth address, which is not given). A directed edge from device A to device B is a contact, i.e. an interval of time during which the iMote A recorded the device B in successive scans, so that pairs of devices are connected by several edges, one per contact (a multigraph). Only iMotes record contacts, and the contacts between two iMotes need not be mutual, since the scans of the iMotes were not synchronized and the sightings need not be symmetric. The times are given in seconds from the beginning of the trace, whose exact date and time is not given.
+
+The network has the following properties:
+
+- Nodes: `is_imote`, whether the device is one of the iMotes (otherwise an external device).
+- Edges: `time`, the first time at which the iMote recorded the device in the contact, in seconds from the beginning of the trace; `end_time`, the last time at which it recorded it (equal to `time` for contacts seen in a single scan); `duration`, the difference of these two times, in seconds; `contact_number`, the number of the contact among those of the same pair of devices (1, 2, ...); `gap`, the time between the beginning of the contact and the end of the previous contact of the same pair, in seconds (0 for the first contact of a pair)."""
+tags = ['Social', 'Offline', 'Unweighted', 'Multigraph', 'Timestamps', 'Metadata']
+url = ['https://ieee-dataport.org/open-access/crawdad-cambridgehaggle-v-2009-05-29',
+       'https://github.com/kunegis/konect-extr/tree/4886bc43365080787c9cdc6852f4d7e5635097cb/extr/contact']
+citation = [('A. Chaintreau, P. Hui, J. Crowcroft, C. Diot, R. Gass, J. Scott, "Impact of Human Mobility on Opportunistic Forwarding Algorithms." IEEE Transactions on Mobile Computing 6(6), 606-620 (2007)', 'https://doi.org/10.1109/tmc.2007.1060'),
+            ('P. Hui, J. Crowcroft, E. Yoneki, "BUBBLE Rap: Social-based Forwarding in Delay Tolerant Networks." Proceedings of the 9th ACM International Symposium on Mobile Ad Hoc Networking and Computing (MobiHoc), 241-250 (2008)', 'https://doi.org/10.1145/1374618.1374652'),
+            ('J. Scott, R. Gass, J. Crowcroft, P. Hui, C. Diot, A. Chaintreau, "CRAWDAD dataset cambridge/haggle (v. 2009-05-29)." CRAWDAD (2009)', 'https://doi.org/10.15783/C70011')]
 icon_hash = '57cf1f0b67351c5e0ccd7a0d'
-upstream_prefix = 'http://konect.cc/files'
-files = [('download.tsv.contact.tar.bz2', None, 'konect')]
+upstream_license = None
+upstream_prefix = 'https://raw.githubusercontent.com/kunegis/konect-extr/4886bc43365080787c9cdc6852f4d7e5635097cb/extr/contact'
+files = [('contacts.Exp3.dat', None, None)]
+
+# Number of iMotes (ids 1 to N_IMOTES); the other ids are external devices
+N_IMOTES = 41
+
+# Limit of contacts to read, for quick checks
+_check_rows = None
 
 def fetch_upstream(force=False):
     return fetch_upstream_files(__name__.split(".")[-1], upstream_prefix, files,
@@ -38,12 +54,33 @@ def fetch_upstream(force=False):
 def parse(alts=None):
     global files
     name = __name__.split(".")[-1]
-    for fnames, alt, fmt in files:
+    for fname, 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]
-            g = parse_graph(fs, fmt, directed=False)
+        # Tab-separated columns: recording iMote, recorded device, first and
+        # last time of the contact, number of the contact of the pair, time
+        # since the end of the previous contact of the pair
+        rows = []
+        with open_upstream_file(name, fname, "r") as f:
+            for n, line in enumerate(f):
+                if _check_rows is not None and n >= _check_rows:
+                    break
+                if not line.strip():
+                    continue
+                rows.append([int(x) for x in line.split()])
+        rows = numpy.array(rows, dtype="int64")
+        assert rows.shape[1] == 6
+        assert rows[:, 0].max() <= N_IMOTES
+        g = Graph(directed=True)
+        g.add_vertex(max(rows[:, :2].max(), N_IMOTES))
+        g.vp.is_imote = g.new_vp("bool")
+        g.vp.is_imote.a[:N_IMOTES] = True
+        edges = numpy.column_stack((rows[:, 0] - 1, rows[:, 1] - 1, rows[:, 2],
+                                    rows[:, 3], rows[:, 3] - rows[:, 2],
+                                    rows[:, 4], rows[:, 5]))
+        eprops = [g.new_ep("int64_t") for i in range(5)]
+        g.add_edge_list(edges, eprops=eprops)
+        for k, p in zip(["time", "end_time", "duration", "contact_number",
+                         "gap"], eprops):
+            g.ep[k] = p
         yield alt, g
Update copyright information by Tiago de Paula Peixoto 73a4f0d
diff --git a/entries/contact/__init__.py b/entries/contact/__init__.py
index 55b2dcd..1279ac0 100644
--- a/entries/contact/__init__.py
+++ b/entries/contact/__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/contact/__init__.py b/entries/contact/__init__.py
index 1412132..55b2dcd 100644
--- a/entries/contact/__init__.py
+++ b/entries/contact/__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/contact/__init__.py b/entries/contact/__init__.py
index 7d8221b..1412132 100644
--- a/entries/contact/__init__.py
+++ b/entries/contact/__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
Update copyright info by Tiago de Paula Peixoto db2efcc
diff --git a/entries/contact/__init__.py b/entries/contact/__init__.py
index eee4cf6..7d8221b 100644
--- a/entries/contact/__init__.py
+++ b/entries/contact/__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
Un-orphan KONECT datasets by Tiago de Paula Peixoto 894eba5
KONECT has been brought back from the dead for the time being.
diff --git a/entries/contact/__init__.py b/entries/contact/__init__.py
index a15a8f7..eee4cf6 100644
--- a/entries/contact/__init__.py
+++ b/entries/contact/__init__.py
@@ -26,7 +26,6 @@ url = 'http://konect.cc/networks/contact'
 citation = [('A. Chaintreau et al. "Impact of human mobility on opportunistic forwarding algorithms." IEEE Trans. on Mobile Computing 6(6), 606-620 (2007).', 'https://doi.org/10.1109/tmc.2007.1060')]
 icon_hash = '57cf1f0b67351c5e0ccd7a0d'
 upstream_prefix = 'http://konect.cc/files'
-orphan = True
 files = [('download.tsv.contact.tar.bz2', None, 'konect')]
 
 def fetch_upstream(force=False):
Update citations to use DOIs by Tiago de Paula Peixoto e878874
diff --git a/entries/contact/__init__.py b/entries/contact/__init__.py
index b77dbad..a15a8f7 100644
--- a/entries/contact/__init__.py
+++ b/entries/contact/__init__.py
@@ -23,7 +23,7 @@ description = """A network of human proximities, as measured by carried wireless
 [^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
 tags = ['Social', 'Offline', 'Unweighted', 'Timestamps']
 url = 'http://konect.cc/networks/contact'
-citation = [('A. Chaintreau et al. “Impact of human mobility on opportunistic forwarding algorithms.” IEEE Trans. on Mobile Computing 6(6), 606-620 (2007).', 'http://ieeexplore.ieee.org/document/4161914/')]
+citation = [('A. Chaintreau et al. "Impact of human mobility on opportunistic forwarding algorithms." IEEE Trans. on Mobile Computing 6(6), 606-620 (2007).', 'https://doi.org/10.1109/tmc.2007.1060')]
 icon_hash = '57cf1f0b67351c5e0ccd7a0d'
 upstream_prefix = 'http://konect.cc/files'
 orphan = True
Add support for 'orphan' datasets and tag konect entries by Tiago de Paula Peixoto e330b80
diff --git a/entries/contact/__init__.py b/entries/contact/__init__.py
index ca5b55f..b77dbad 100644
--- a/entries/contact/__init__.py
+++ b/entries/contact/__init__.py
@@ -26,6 +26,7 @@ url = 'http://konect.cc/networks/contact'
 citation = [('A. Chaintreau et al. “Impact of human mobility on opportunistic forwarding algorithms.” IEEE Trans. on Mobile Computing 6(6), 606-620 (2007).', 'http://ieeexplore.ieee.org/document/4161914/')]
 icon_hash = '57cf1f0b67351c5e0ccd7a0d'
 upstream_prefix = 'http://konect.cc/files'
+orphan = True
 files = [('download.tsv.contact.tar.bz2', None, 'konect')]
 
 def fetch_upstream(force=False):
Change license from GPLv3 to AGPLv3 by Tiago de Paula Peixoto d754be5
diff --git a/entries/contact/__init__.py b/entries/contact/__init__.py
index cfb6bcb..ca5b55f 100644
--- a/entries/contact/__init__.py
+++ b/entries/contact/__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/contact/__init__.py b/entries/contact/__init__.py
index cb7fedb..cfb6bcb 100644
--- a/entries/contact/__init__.py
+++ b/entries/contact/__init__.py
@@ -19,7 +19,8 @@
 from .. import *
 
 title = "Haggle human proximity network (2006)"
-description = "A network of human proximities, as measured by carried wireless devices. Each node represents a person, and an edge denotes when two people were within a certain proximity of each other, as measured by a wireless protocol (Bluetooth or Wifi). The edges are timestamped."
+description = """A network of human proximities, as measured by carried wireless devices. Each node represents a person, and an edge denotes when two people were within a certain proximity of each other, as measured by a wireless protocol (Bluetooth or Wifi). The edges are timestamped.[^icon]
+[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
 tags = ['Social', 'Offline', 'Unweighted', 'Timestamps']
 url = 'http://konect.cc/networks/contact'
 citation = [('A. Chaintreau et al. “Impact of human mobility on opportunistic forwarding algorithms.” IEEE Trans. on Mobile Computing 6(6), 606-620 (2007).', 'http://ieeexplore.ieee.org/document/4161914/')]
Initial commit by Tiago de Paula Peixoto cc85872
diff --git a/entries/contact/__init__.py b/entries/contact/__init__.py
new file mode 100644
index 0000000..cb7fedb
--- /dev/null
+++ b/entries/contact/__init__.py
@@ -0,0 +1,48 @@
+#! /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 *
+
+title = "Haggle human proximity network (2006)"
+description = "A network of human proximities, as measured by carried wireless devices. Each node represents a person, and an edge denotes when two people were within a certain proximity of each other, as measured by a wireless protocol (Bluetooth or Wifi). The edges are timestamped."
+tags = ['Social', 'Offline', 'Unweighted', 'Timestamps']
+url = 'http://konect.cc/networks/contact'
+citation = [('A. Chaintreau et al. “Impact of human mobility on opportunistic forwarding algorithms.” IEEE Trans. on Mobile Computing 6(6), 606-620 (2007).', 'http://ieeexplore.ieee.org/document/4161914/')]
+icon_hash = '57cf1f0b67351c5e0ccd7a0d'
+upstream_prefix = 'http://konect.cc/files'
+files = [('download.tsv.contact.tar.bz2', None, 'konect')]
+
+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, "rb")) for fn in fnames]
+            g = parse_graph(fs, fmt, directed=False)
+        yield alt, g