History of youtube_interactions
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 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/youtube_interactions/__init__.py b/entries/youtube_interactions/__init__.py
index df8fa7f..1231f95 100644
--- a/entries/youtube_interactions/__init__.py
+++ b/entries/youtube_interactions/__init__.py
@@ -35,7 +35,7 @@ tags = ['Social', 'Online', 'Weighted', 'Multilayer']
url = 'https://datasets.syr.edu/'
citation = [('L. Tang, X. Wang, H. Liu, "Uncovering groups via heterogeneous interaction analysis." Ninth IEEE International Conference on Data Mining (ICDM), 503-512 (2009)', 'https://doi.org/10.1109/ICDM.2009.20'),
('L. Tang, X. Wang, H. Liu, "Community detection via heterogeneous interaction analysis." Data Mining and Knowledge Discovery 25, 1-33 (2012)', 'https://doi.org/10.1007/s10618-011-0231-0')]
-icon_hash = '592de85667ec90f1500d4e45'
+date_added = '2026-10-25'
upstream_license = None
# The repository moved from Arizona State University to Syracuse University
upstream_prefix = 'https://datasets.syr.edu/uploads/1255069259'
[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/youtube_interactions/__init__.py b/entries/youtube_interactions/__init__.py
index 7e30919..df8fa7f 100644
--- a/entries/youtube_interactions/__init__.py
+++ b/entries/youtube_interactions/__init__.py
@@ -30,7 +30,7 @@ description = """Five networks of different kinds of interactions among the same
The networks have the following properties:
-- `weight`: the intensity of the interaction."""
+- (Edge) `weight`: the intensity of the interaction."""
tags = ['Social', 'Online', 'Weighted', 'Multilayer']
url = 'https://datasets.syr.edu/'
citation = [('L. Tang, X. Wang, H. Liu, "Uncovering groups via heterogeneous interaction analysis." Ninth IEEE International Conference on Data Mining (ICDM), 503-512 (2009)', 'https://doi.org/10.1109/ICDM.2009.20'),
[entries] Remove unneeded code from the entries 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/youtube_interactions/__init__.py b/entries/youtube_interactions/__init__.py
index 83b6d39..7e30919 100644
--- a/entries/youtube_interactions/__init__.py
+++ b/entries/youtube_interactions/__init__.py
@@ -53,7 +53,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] Use American spelling in the descriptions 802d564
British spellings in the titles and descriptions of 69 entries (e.g. labelled, organisation, millimetres, centres, anonymised, neighbours, analysed, modelled, colour, licence) are replaced by the American ones. Proper names keep their spelling (Otago Harbour, the Centre for Water Systems, the Centre jeunesse de Montréal, the Dutch Ministry of Defence), as do quoted upstream terms, citations, and property names.
diff --git a/entries/youtube_interactions/__init__.py b/entries/youtube_interactions/__init__.py
index 8759db4..83b6d39 100644
--- a/entries/youtube_interactions/__init__.py
+++ b/entries/youtube_interactions/__init__.py
@@ -20,13 +20,13 @@ from .. import *
import pandas
title = "YouTube user interactions, multi-dimensional (2008)"
-description = """Five networks of different kinds of interactions among the same set of YouTube users, crawled in December 2008 by L. Tang, X. Wang and H. Liu (Arizona State University), and distributed by the Social Computing Data Repository (originally at Arizona State University, now at Syracuse University). Starting from the authors of 100 recently uploaded videos, the crawl collected the contacts, subscriptions and favourite videos of 30,522 user profiles, reaching 848,003 users and 1,299,642 videos in total; the 15,088 users sharing all kinds of information were retained. In all networks, nodes are these 15,088 users (users without interactions of a given kind are isolated nodes), and an undirected edge connects two users that interact in the given way, with `weight` giving the intensity of the interaction:
+description = """Five networks of different kinds of interactions among the same set of YouTube users, crawled in December 2008 by L. Tang, X. Wang and H. Liu (Arizona State University), and distributed by the Social Computing Data Repository (originally at Arizona State University, now at Syracuse University). Starting from the authors of 100 recently uploaded videos, the crawl collected the contacts, subscriptions and favorite videos of 30,522 user profiles, reaching 848,003 users and 1,299,642 videos in total; the 15,088 users sharing all kinds of information were retained. In all networks, nodes are these 15,088 users (users without interactions of a given kind are isolated nodes), and an undirected edge connects two users that interact in the given way, with `weight` giving the intensity of the interaction:
- `contacts`: the two users are contacts of each other (weight 1).
- `shared_friends`: the two users have contacts in common, among the 848,003 users outside the set; weight is the number of shared contacts (at least 2).
- `shared_subscriptions`: the two users subscribe to the same users; weight is the number of shared subscriptions.
- `shared_subscribers`: the two users have subscribers in common; weight is the number of shared subscribers.
-- `shared_favorites`: the two users marked the same videos as favourites; weight is the number of shared favourite videos (at least 2).
+- `shared_favorites`: the two users marked the same videos as favorites; weight is the number of shared favorite videos (at least 2).
The networks have the following properties:
[entries] New entry: youtube_interactions 7439f18
diff --git a/entries/youtube_interactions/__init__.py b/entries/youtube_interactions/__init__.py
new file mode 100644
index 0000000..8759db4
--- /dev/null
+++ b/entries/youtube_interactions/__init__.py
@@ -0,0 +1,71 @@
+#! /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 *
+import pandas
+
+title = "YouTube user interactions, multi-dimensional (2008)"
+description = """Five networks of different kinds of interactions among the same set of YouTube users, crawled in December 2008 by L. Tang, X. Wang and H. Liu (Arizona State University), and distributed by the Social Computing Data Repository (originally at Arizona State University, now at Syracuse University). Starting from the authors of 100 recently uploaded videos, the crawl collected the contacts, subscriptions and favourite videos of 30,522 user profiles, reaching 848,003 users and 1,299,642 videos in total; the 15,088 users sharing all kinds of information were retained. In all networks, nodes are these 15,088 users (users without interactions of a given kind are isolated nodes), and an undirected edge connects two users that interact in the given way, with `weight` giving the intensity of the interaction:
+
+- `contacts`: the two users are contacts of each other (weight 1).
+- `shared_friends`: the two users have contacts in common, among the 848,003 users outside the set; weight is the number of shared contacts (at least 2).
+- `shared_subscriptions`: the two users subscribe to the same users; weight is the number of shared subscriptions.
+- `shared_subscribers`: the two users have subscribers in common; weight is the number of shared subscribers.
+- `shared_favorites`: the two users marked the same videos as favourites; weight is the number of shared favourite videos (at least 2).
+
+The networks have the following properties:
+
+- `weight`: the intensity of the interaction."""
+tags = ['Social', 'Online', 'Weighted', 'Multilayer']
+url = 'https://datasets.syr.edu/'
+citation = [('L. Tang, X. Wang, H. Liu, "Uncovering groups via heterogeneous interaction analysis." Ninth IEEE International Conference on Data Mining (ICDM), 503-512 (2009)', 'https://doi.org/10.1109/ICDM.2009.20'),
+ ('L. Tang, X. Wang, H. Liu, "Community detection via heterogeneous interaction analysis." Data Mining and Knowledge Discovery 25, 1-33 (2012)', 'https://doi.org/10.1007/s10618-011-0231-0')]
+icon_hash = '592de85667ec90f1500d4e45'
+upstream_license = None
+# The repository moved from Arizona State University to Syracuse University
+upstream_prefix = 'https://datasets.syr.edu/uploads/1255069259'
+layers = ['contacts', 'shared_friends', 'shared_subscriptions',
+ 'shared_subscribers', 'shared_favorites']
+files = [((f'YouTube-dataset.zip:YouTube-dataset/data/{i + 1}-edges.csv',
+ 'YouTube-dataset.zip:YouTube-dataset/data/nodes.csv'), alt, None)
+ for i, alt in enumerate(layers)]
+
+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
+ # Lines "i,j,intensity", each pair listed once; users numbered from 1
+ with open_upstream_file(name, fnames[0], "rb") as f:
+ E = pandas.read_csv(f, header=None, dtype="int64").values
+ with open_upstream_file(name, fnames[1], "rb") as f:
+ nodes = pandas.read_csv(f, header=None, dtype="int64").values.ravel()
+ g = Graph(directed=False)
+ g.add_vertex(int(max(nodes.max(), E[:, :2].max())))
+ g.ep.weight = g.new_ep("int")
+ E[:, :2] -= 1
+ g.add_edge_list(E, eprops=[g.ep.weight])
+ yield alt, g