History of social_dimensions
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/social_dimensions/__init__.py b/entries/social_dimensions/__init__.py
index 7814dd4..7c01063 100644
--- a/entries/social_dimensions/__init__.py
+++ b/entries/social_dimensions/__init__.py
@@ -34,7 +34,7 @@ url = ['https://datasets.syr.edu/',
'https://web.archive.org/web/2014/http://www.public.asu.edu/~ltang9/social_dimension.html']
citation = [('L. Tang, H. Liu, "Relational learning via latent social dimensions." Proceedings of the 15th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 817-826 (2009)', 'https://doi.org/10.1145/1557019.1557109'),
('L. Tang, H. Liu, "Scalable learning of collective behavior based on sparse social dimensions." Proceedings of the 18th ACM Conference on Information and Knowledge Management (CIKM), 1107-1116 (2009)', 'https://doi.org/10.1145/1645953.1646094')]
-icon_hash = '592de74467ec90f1500d4e43'
+date_added = '2026-10-25'
upstream_license = None
upstream_prefix = 'https://datasets.syr.edu/uploads'
nets = {'blogcatalog': ('1283153973', 'BlogCatalog'),
[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/social_dimensions/__init__.py b/entries/social_dimensions/__init__.py
index 97eb481..7814dd4 100644
--- a/entries/social_dimensions/__init__.py
+++ b/entries/social_dimensions/__init__.py
@@ -28,7 +28,7 @@ description = """Friendship networks of three social media websites, with the gr
The networks have the following properties:
-- `groups`: the identifiers of the groups the user belongs to (the names of the groups are not given in the source data)."""
+- (Node) `groups`: the identifiers of the groups the user belongs to (the names of the groups are not given in the source data)."""
tags = ['Social', 'Online', 'Unweighted', 'Metadata']
url = ['https://datasets.syr.edu/',
'https://web.archive.org/web/2014/http://www.public.asu.edu/~ltang9/social_dimension.html']
[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/social_dimensions/__init__.py b/entries/social_dimensions/__init__.py
index 60740a4..97eb481 100644
--- a/entries/social_dimensions/__init__.py
+++ b/entries/social_dimensions/__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] New entry: social_dimensions 1066b7e
diff --git a/entries/social_dimensions/__init__.py b/entries/social_dimensions/__init__.py
new file mode 100644
index 0000000..60740a4
--- /dev/null
+++ b/entries/social_dimensions/__init__.py
@@ -0,0 +1,76 @@
+#! /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 = "BlogCatalog, Flickr and YouTube friendships with groups (2009)"
+description = """Friendship networks of three social media websites, with the group memberships of the users, collected by L. Tang and H. Liu (Arizona State University) to study collective behaviour and the prediction of user attributes ("social dimensions"), and distributed by the Social Computing Data Repository (originally at Arizona State University, now at Syracuse University). In all networks, nodes are users, and an undirected edge connects two users who are friends (contacts) on the website. The group memberships of the users (in groups of interest of the site, selected by the authors) are given as a node property, and serve as labels in classification tasks.
+
+- `blogcatalog`: bloggers of the blog directory BlogCatalog (10,312 users, 333,983 friendships, 39 groups).
+- `flickr`: users of the photo sharing site Flickr (80,513 users, 5,899,882 friendships, 195 groups).
+- `youtube`: users of the video sharing site YouTube (1,138,499 users, 2,990,443 friendships, 47 groups; only 31,703 users belong to some group).
+
+The networks have the following properties:
+
+- `groups`: the identifiers of the groups the user belongs to (the names of the groups are not given in the source data)."""
+tags = ['Social', 'Online', 'Unweighted', 'Metadata']
+url = ['https://datasets.syr.edu/',
+ 'https://web.archive.org/web/2014/http://www.public.asu.edu/~ltang9/social_dimension.html']
+citation = [('L. Tang, H. Liu, "Relational learning via latent social dimensions." Proceedings of the 15th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 817-826 (2009)', 'https://doi.org/10.1145/1557019.1557109'),
+ ('L. Tang, H. Liu, "Scalable learning of collective behavior based on sparse social dimensions." Proceedings of the 18th ACM Conference on Information and Knowledge Management (CIKM), 1107-1116 (2009)', 'https://doi.org/10.1145/1645953.1646094')]
+icon_hash = '592de74467ec90f1500d4e43'
+upstream_license = None
+upstream_prefix = 'https://datasets.syr.edu/uploads'
+nets = {'blogcatalog': ('1283153973', 'BlogCatalog'),
+ 'flickr': ('1283157931', 'Flickr'),
+ 'youtube': ('1283158247', 'YouTube')}
+files = [((f'{d}/{n}-dataset.zip:{n}-dataset/data/edges.csv',
+ f'{d}/{n}-dataset.zip:{n}-dataset/data/nodes.csv',
+ f'{d}/{n}-dataset.zip:{n}-dataset/data/group-edges.csv'), alt, None)
+ for alt, (d, n) in nets.items()]
+
+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
+ # Users are numbered from 1; each friendship is listed once
+ 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()
+ with open_upstream_file(name, fnames[2], "rb") as f:
+ G = pandas.read_csv(f, header=None, dtype="int64").values
+ N = int(max(nodes.max(), E.max()))
+ g = Graph(directed=False)
+ g.add_vertex(N)
+ g.add_edge_list(E - 1)
+ groups = [[] for i in range(N)]
+ for u, c in G:
+ groups[u - 1].append(int(c))
+ g.vp.groups = g.new_vp("vector<int>", vals=groups)
+ yield alt, g