History of signed_social_media
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/signed_social_media/__init__.py b/entries/signed_social_media/__init__.py
index 6f370c6..8574e17 100644
--- a/entries/signed_social_media/__init__.py
+++ b/entries/signed_social_media/__init__.py
@@ -36,7 +36,7 @@ url = ['https://snap.stanford.edu/data/soc-sign-epinions.html',
'https://snap.stanford.edu/data/soc-sign-Slashdot090221.html']
citation = [('J. Leskovec, D. Huttenlocher, J. Kleinberg, "Signed networks in social media." Proceedings of the SIGCHI Conference on Human Factors in Computing Systems (CHI), 1361-1370 (2010)', 'https://doi.org/10.1145/1753326.1753532'),
('J. Leskovec, D. Huttenlocher, J. Kleinberg, "Predicting positive and negative links in online social networks." Proceedings of the 19th International Conference on World Wide Web (WWW), 641-650 (2010)', 'https://doi.org/10.1145/1772690.1772756')]
-icon_hash = '56a85c8e26855e083a2f78bf'
+date_added = '2026-10-25'
upstream_license = None
upstream_prefix = 'https://snap.stanford.edu/data'
files = [('soc-sign-epinions.txt.gz', 'epinions', None),
[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/signed_social_media/__init__.py b/entries/signed_social_media/__init__.py
index 1310456..6f370c6 100644
--- a/entries/signed_social_media/__init__.py
+++ b/entries/signed_social_media/__init__.py
@@ -28,7 +28,7 @@ A third network of the same study, the votes in Wikipedia adminship elections, i
The networks have the following properties:
-- Edges: `sign`, the sign of the relationship, +1 (trust, friend) or -1 (distrust, foe)."""
+- (Edge) `sign`: the sign of the relationship, +1 (trust, friend) or -1 (distrust, foe)."""
tags = ['Social', 'Online', 'Signed']
url = ['https://snap.stanford.edu/data/soc-sign-epinions.html',
'https://snap.stanford.edu/data/soc-sign-Slashdot081106.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/signed_social_media/__init__.py b/entries/signed_social_media/__init__.py
index 1518dec..1310456 100644
--- a/entries/signed_social_media/__init__.py
+++ b/entries/signed_social_media/__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] New entry: signed_social_media 0010f75
diff --git a/entries/signed_social_media/__init__.py b/entries/signed_social_media/__init__.py
new file mode 100644
index 0000000..1518dec
--- /dev/null
+++ b/entries/signed_social_media/__init__.py
@@ -0,0 +1,65 @@
+#! /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 = "Epinions and Slashdot signed social networks (2008-2009)"
+description = """Directed signed social networks of users of two websites, collected by Leskovec, Huttenlocher and Kleinberg to study positive and negative relationships in online social media. Nodes are users, and a directed edge $(i,j)$ means that user $i$ declared a positive or negative relationship (trust or distrust, friend or foe) towards user $j$.
+
+- `epinions`: the who-trusts-whom network of the consumer review site Epinions.com, where members can declare that they trust (positive edge) or distrust (negative edge) other members. These relationships determine, together with the review ratings, which reviews are shown to the users.
+- `slashdot081106`, `slashdot090216`, `slashdot090221`: the "Slashdot Zoo" of the technology news site Slashdot.org, in which users tag each other as friends (positive edge) or foes (negative edge), as obtained on November 6 2008, February 16 2009 and February 21 2009. The node numbers are not necessarily consistent across the snapshots. Unsigned versions of the Slashdot Zoo distributed by SNAP are in the entry `slashdot_zoo_snap`; its network `0811` is from the same date as `slashdot081106` and has nearly the same number of nodes, but a different edge set (about 905,000 instead of 517,000 edges).
+
+A third network of the same study, the votes in Wikipedia adminship elections, is available separately (see the `elec` entry).
+
+The networks have the following properties:
+
+- Edges: `sign`, the sign of the relationship, +1 (trust, friend) or -1 (distrust, foe)."""
+tags = ['Social', 'Online', 'Signed']
+url = ['https://snap.stanford.edu/data/soc-sign-epinions.html',
+ 'https://snap.stanford.edu/data/soc-sign-Slashdot081106.html',
+ 'https://snap.stanford.edu/data/soc-sign-Slashdot090216.html',
+ 'https://snap.stanford.edu/data/soc-sign-Slashdot090221.html']
+citation = [('J. Leskovec, D. Huttenlocher, J. Kleinberg, "Signed networks in social media." Proceedings of the SIGCHI Conference on Human Factors in Computing Systems (CHI), 1361-1370 (2010)', 'https://doi.org/10.1145/1753326.1753532'),
+ ('J. Leskovec, D. Huttenlocher, J. Kleinberg, "Predicting positive and negative links in online social networks." Proceedings of the 19th International Conference on World Wide Web (WWW), 641-650 (2010)', 'https://doi.org/10.1145/1772690.1772756')]
+icon_hash = '56a85c8e26855e083a2f78bf'
+upstream_license = None
+upstream_prefix = 'https://snap.stanford.edu/data'
+files = [('soc-sign-epinions.txt.gz', 'epinions', None),
+ ('soc-sign-Slashdot081106.txt.gz', 'slashdot081106', None),
+ ('soc-sign-Slashdot090216.txt.gz', 'slashdot090216', None),
+ ('soc-sign-Slashdot090221.txt.gz', 'slashdot090221', 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 fname, alt, fmt in files:
+ if alts is not None and alt not in alts:
+ continue
+ with open_upstream_file(name, fname, "r") as f:
+ edges = numpy.loadtxt(f, dtype="int64", comments="#")
+ g = Graph(directed=True)
+ g.ep.sign = g.new_ep("int")
+ g.add_edge_list(edges, eprops=[g.ep.sign])
+ yield alt, g