logo Netzschleuder network catalog, repository, and centrifuge

History of bluesky_failla

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/bluesky_failla/__init__.py b/entries/bluesky_failla/__init__.py
index 156bdc1..b274617 100644
--- a/entries/bluesky_failla/__init__.py
+++ b/entries/bluesky_failla/__init__.py
@@ -41,7 +41,7 @@ The networks have the following properties:
 tags = ['Social', 'Online', 'Communication', 'Unweighted', 'Multigraph', 'Timestamps']
 url = 'https://doi.org/10.5281/zenodo.14669616'
 citation = [('A. Failla, G. Rossetti, "I\'m in the Bluesky Tonight: Insights from a year worth of social data." PLOS ONE 19(11), e0310330 (2024)', 'https://doi.org/10.1371/journal.pone.0310330')]
-icon_hash = None
+date_added = '2026-10-27'
 upstream_license = None
 restricted = True
 
[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/bluesky_failla/__init__.py b/entries/bluesky_failla/__init__.py
index adc58bc..156bdc1 100644
--- a/entries/bluesky_failla/__init__.py
+++ b/entries/bluesky_failla/__init__.py
@@ -33,8 +33,11 @@ In the interaction networks, users can interact with their own posts, which appe
 
 The networks have the following properties:
 
-- Nodes: `user_id`, the pseudonymized id of the user (-1 for threads); in `threads`, also `is_thread`, whether the node is a thread (otherwise a user), `thread_id`, the id of the thread (-1 for users), and `time`, the time of the thread (Unix time, to the minute; -1 for users).
-- Edges (`reposts`, `replies` and `quotes`): `time`, the day of the interaction (Unix time, at midnight UTC)."""
+- (Node) `user_id`: the pseudonymized id of the user (-1 for threads).
+- (Node) `is_thread` (`threads`): whether the node is a thread (otherwise a user).
+- (Node) `thread_id` (`threads`): the id of the thread (-1 for users).
+- (Node) `time` (`threads`): the time of the thread (Unix time, to the minute; -1 for users).
+- (Edge) `time` (`reposts`, `replies` and `quotes`): the day of the interaction (Unix time, at midnight UTC)."""
 tags = ['Social', 'Online', 'Communication', 'Unweighted', 'Multigraph', 'Timestamps']
 url = 'https://doi.org/10.5281/zenodo.14669616'
 citation = [('A. Failla, G. Rossetti, "I\'m in the Bluesky Tonight: Insights from a year worth of social data." PLOS ONE 19(11), e0310330 (2024)', 'https://doi.org/10.1371/journal.pone.0310330')]
[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/bluesky_failla/__init__.py b/entries/bluesky_failla/__init__.py
index 85ed5f8..adc58bc 100644
--- a/entries/bluesky_failla/__init__.py
+++ b/entries/bluesky_failla/__init__.py
@@ -94,7 +94,6 @@ def ymd_to_unix(d, hm=None):
 @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:
@@ -102,7 +101,6 @@ def parse(alts=None):
         # First pass: the ids of the users that appear, which are mapped to
         # consecutive vertices (in the order of the ids)
         present = numpy.zeros(0, dtype="bool")
-        nthreads = 0
         with open_upstream_file(name, fname, "rb") as f:
             if alt == "threads":
                 chunks = (p[:, 1] for p, t in read_threads(f))
[entries] Remove the remarks on the distribution of the data from the descriptions of beer_reviews, bluesky_failla, citibike, divvy, facebook100, goodreads, hiv_transmission, hollywood_actors, mind_news, movielens_10m_tags, movielens_32m, movielens_ratings, netflix_prize, opensky_flights, opensky_flights_full, regulondb, statsbomb, yelp_restaurants and yelp_reviews by Tiago de Paula Peixoto 8be09c8
The descriptions said whether the data may be distributed (access
tokens, restrictions, redistribution bans, take-downs); the site shows
restricted entries itself, and the descriptions now only describe the
data.
diff --git a/entries/bluesky_failla/__init__.py b/entries/bluesky_failla/__init__.py
index 50986d1..85ed5f8 100644
--- a/entries/bluesky_failla/__init__.py
+++ b/entries/bluesky_failla/__init__.py
@@ -31,8 +31,6 @@ description = """Networks of the users of the microblogging platform Bluesky Soc
 
 In the interaction networks, users can interact with their own posts, which appear as self-loops, and repeated interactions between the same users appear as multiple edges. Only users with at least one edge appear in each network. Left out are the contents of the posts, the posts of 11 thematic feeds with their likes and bookmarks, and the file of interactions that combines the repost, reply and quote networks.
 
-The authors process the users' requests to have their data removed (per the GDPR's right to erasure) and restrict the access to the previous versions of the dataset; this is the version of 16 January 2025. The files of this entry are available only with an access token, because of these erasure requests (the data are personal data, and earlier versions were withdrawn after such requests).
-
 The networks have the following properties:
 
 - Nodes: `user_id`, the pseudonymized id of the user (-1 for threads); in `threads`, also `is_thread`, whether the node is a thread (otherwise a user), `thread_id`, the id of the thread (-1 for users), and `time`, the time of the thread (Unix time, to the minute; -1 for users).
[entries] New entry: bluesky_failla by Tiago de Paula Peixoto 5e62f13
diff --git a/entries/bluesky_failla/__init__.py b/entries/bluesky_failla/__init__.py
new file mode 100644
index 0000000..50986d1
--- /dev/null
+++ b/entries/bluesky_failla/__init__.py
@@ -0,0 +1,176 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 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 = "Bluesky social network (2023-2024)"
+description = """Networks of the users of the microblogging platform Bluesky Social, from the dataset of Failla and Rossetti, who crawled the platform through its public API in early 2024, collecting the complete post history (from February 2023 to March 2024) of over 4 million users, about 81% of the accounts registered at the time, and their follow relations. The data were pseudonymized by the authors: users are identified only by integer ids (consistent across the networks), and times are coarsened to the day (to the minute for threads). The dataset contains five networks:
+
+- `followers`: the follower network, where a directed edge from user u to user v means that u follows v (4,099,699 users, 144,581,603 follow relations).
+- `reposts`: a directed edge from a user to the author of a post that the user reposted, for each repost (63,438,069 reposts by 1,405,567 users).
+- `replies`: a directed edge from a user to the author of a post that the user replied to, for each reply (87,550,414 replies by 1,518,191 users).
+- `quotes`: a directed edge from a user to the author of a post that the user quoted, for each quote (12,085,583 quotes by 631,347 users).
+- `threads`: a bipartite network of the users and the discussion threads in which they participated (19,486,141 threads with 1,507,198 users, and 59,475,386 participations).
+
+In the interaction networks, users can interact with their own posts, which appear as self-loops, and repeated interactions between the same users appear as multiple edges. Only users with at least one edge appear in each network. Left out are the contents of the posts, the posts of 11 thematic feeds with their likes and bookmarks, and the file of interactions that combines the repost, reply and quote networks.
+
+The authors process the users' requests to have their data removed (per the GDPR's right to erasure) and restrict the access to the previous versions of the dataset; this is the version of 16 January 2025. The files of this entry are available only with an access token, because of these erasure requests (the data are personal data, and earlier versions were withdrawn after such requests).
+
+The networks have the following properties:
+
+- Nodes: `user_id`, the pseudonymized id of the user (-1 for threads); in `threads`, also `is_thread`, whether the node is a thread (otherwise a user), `thread_id`, the id of the thread (-1 for users), and `time`, the time of the thread (Unix time, to the minute; -1 for users).
+- Edges (`reposts`, `replies` and `quotes`): `time`, the day of the interaction (Unix time, at midnight UTC)."""
+tags = ['Social', 'Online', 'Communication', 'Unweighted', 'Multigraph', 'Timestamps']
+url = 'https://doi.org/10.5281/zenodo.14669616'
+citation = [('A. Failla, G. Rossetti, "I\'m in the Bluesky Tonight: Insights from a year worth of social data." PLOS ONE 19(11), e0310330 (2024)', 'https://doi.org/10.1371/journal.pone.0310330')]
+icon_hash = None
+upstream_license = None
+restricted = True
+
+# Zenodo record (version of 16 January 2025)
+upstream_prefix = 'https://zenodo.org/records/14669616/files'
+files = [('followers.csv.gz', 'followers', None),
+         ('graphs.tar.gz:graphs/reposts.csv', 'reposts', None),
+         ('graphs.tar.gz:graphs/replies.csv', 'replies', None),
+         ('graphs.tar.gz:graphs/quotes.csv', 'quotes', None),
+         ('graphs.tar.gz:graphs/threads.txt.gz', 'threads', None)]
+
+CHUNK = 1 << 24
+
+def fetch_upstream(force=False):
+    return fetch_upstream_files(__name__.split(".")[-1], upstream_prefix, files,
+                                force)
+
+def read_chunks(f, ncols):
+    "The rows of the CSV file `f` (integers, no header), in chunks."
+    for df in pandas.read_csv(f, header=None, dtype="int64", chunksize=CHUNK,
+                              names=list(range(ncols))):
+        yield df.values
+
+def read_threads(f):
+    """The threads in the file `f` (lines with the thread id, its time as
+    YYYYMMDDHHMM, and the comma-separated ids of its participants), in chunks
+    of (thread, user) pairs and of (thread, time) pairs."""
+    pairs, times = [], []
+    for line in io.TextIOWrapper(gzip.open(f), "utf8"):
+        tid, t, users = line.rstrip("\n").split("\t")
+        tid = int(tid)
+        times.append((tid, int(t)))
+        for u in users.split(","):
+            if u:
+                pairs.append((tid, int(u)))
+        if len(pairs) >= CHUNK:
+            yield numpy.array(pairs, dtype="int64"), numpy.array(times, dtype="int64")
+            pairs, times = [], []
+    yield (numpy.array(pairs, dtype="int64").reshape(-1, 2),
+           numpy.array(times, dtype="int64").reshape(-1, 2))
+
+def ymd_to_unix(d, hm=None):
+    "Unix time of dates given as integers YYYYMMDD (and times HHMM), in UTC."
+    y, m, dd = d // 10000, d // 100 % 100, d % 100
+    t = (y - 1970).astype("datetime64[Y]").astype("datetime64[M]") + (m - 1)
+    t = t.astype("datetime64[D]") + (dd - 1)
+    t = t.astype("datetime64[s]").astype("int64")
+    if hm is not None:
+        t += (hm // 100) * 3600 + (hm % 100) * 60
+    return t
+
+@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
+        # First pass: the ids of the users that appear, which are mapped to
+        # consecutive vertices (in the order of the ids)
+        present = numpy.zeros(0, dtype="bool")
+        nthreads = 0
+        with open_upstream_file(name, fname, "rb") as f:
+            if alt == "threads":
+                chunks = (p[:, 1] for p, t in read_threads(f))
+            else:
+                chunks = (c[:, :2].ravel() for c in read_chunks(f, 2 if alt == "followers" else 3))
+            for ids in chunks:
+                m = ids.max(initial=-1) + 1
+                if m > len(present):
+                    present = numpy.concatenate((present, numpy.zeros(m - len(present), dtype="bool")))
+                present[ids] = True
+        uids = numpy.flatnonzero(present)
+        idx = numpy.cumsum(present) - 1
+        del present
+
+        g = Graph(directed=(alt != "threads"))
+        g.add_vertex(len(uids))
+        g.vp.user_id = g.new_vp("int64_t")
+        g.vp.user_id.a = uids
+        del uids
+        if alt != "threads":
+            if alt != "followers":
+                g.ep.time = g.new_ep("int64_t")
+            with open_upstream_file(name, fname, "rb") as f:
+                for c in read_chunks(f, 2 if alt == "followers" else 3):
+                    e = numpy.empty((len(c), 2 if alt == "followers" else 3),
+                                    dtype="int64")
+                    e[:, 0] = idx[c[:, 0]]
+                    e[:, 1] = idx[c[:, 1]]
+                    if alt != "followers":
+                        e[:, 2] = ymd_to_unix(c[:, 2])
+                        g.add_edge_list(e, eprops=[g.ep.time])
+                    else:
+                        g.add_edge_list(e)
+                    del c, e
+        else:
+            # thread vertices follow the user vertices, in the order of the
+            # thread ids
+            g.vp.is_thread = g.new_vp("bool")
+            g.vp.thread_id = g.new_vp("int64_t", val=-1)
+            g.vp.time = g.new_vp("int64_t", val=-1)
+            nu = g.num_vertices()
+            tids = []
+            ttimes = []
+            with open_upstream_file(name, fname, "rb") as f:
+                for p, t in read_threads(f):
+                    tids.append(t[:, 0])
+                    ttimes.append(t[:, 1])
+            tids = numpy.concatenate(tids)
+            ttimes = numpy.concatenate(ttimes)
+            order = numpy.argsort(tids, kind="stable")
+            tids, ttimes = tids[order], ttimes[order]
+            del order
+            if len(numpy.unique(tids)) != len(tids):
+                raise ValueError("repeated thread ids")
+            g.add_vertex(len(tids))
+            g.vp.is_thread.a[nu:] = True
+            g.vp.user_id.a[nu:] = -1
+            g.vp.thread_id.a[nu:] = tids
+            g.vp.time.a[nu:] = ymd_to_unix(ttimes // 10000, ttimes % 10000)
+            del ttimes
+            with open_upstream_file(name, fname, "rb") as f:
+                for p, t in read_threads(f):
+                    e = numpy.empty((len(p), 2), dtype="int64")
+                    e[:, 0] = nu + numpy.searchsorted(tids, p[:, 0])
+                    e[:, 1] = idx[p[:, 1]]
+                    g.add_edge_list(e)
+                    del p, e
+        del idx
+        yield alt, g