logo Netzschleuder network catalog, repository, and centrifuge

History of blogcatalog_asu

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] Remove superfluous details of the upstream distribution from the descriptions by Tiago de Paula Peixoto dc07aa0
The descriptions mentioned incidental details of how the upstream data
are made available: the file formats (CSV, JSON, XML, GEXF, SBML, HIF,
Pajek, UCINET, ...), file names, where the files were published or
obtained from (Zenodo, figshare, Kaggle, the Pajek datasets page, the
Internet Archive), and that some networks are only available in the gt
format. These are left out; caveats about the data themselves are kept,
referring to "the data" instead of "the file". The description of
sp_baboons now lists its properties instead of the upstream columns,
and says that events without a recipient are left out.
diff --git a/entries/blogcatalog_asu/__init__.py b/entries/blogcatalog_asu/__init__.py
index 170e9b1..9fbc317 100644
--- a/entries/blogcatalog_asu/__init__.py
+++ b/entries/blogcatalog_asu/__init__.py
@@ -20,7 +20,7 @@ from .. import *
 import xml.etree.ElementTree as ET
 
 title = "BlogCatalog bloggers and friendships (2009, 2010)"
-description = """Networks of friendships among the bloggers of BlogCatalog, a social blog directory website, from two crawls distributed by the Social Computing Data Repository (originally at Arizona State University, now at Syracuse University; the versions used here, in XML format, are those of 2010, obtained from the Internet Archive, which include the metadata of the blogs). In BlogCatalog, users register their blogs under a hierarchy of predefined categories, tag them, and declare friendships with other users. In both networks, nodes are bloggers.
+description = """Networks of friendships among the bloggers of BlogCatalog, a social blog directory website, from two crawls distributed by the Social Computing Data Repository (originally at Arizona State University, now at Syracuse University; the versions used here are those of 2010, which include the metadata of the blogs). In BlogCatalog, users register their blogs under a hierarchy of predefined categories, tag them, and declare friendships with other users. In both networks, nodes are bloggers.
 
 - `july_2009`: crawled in July 2009 by N. Agarwal, X. Wang and H. Liu. An undirected edge connects two bloggers who are friends (the source lists each friendship under both users; 2,093,195 friendships among 88,784 bloggers). For the 80,950 bloggers whose blogs were also crawled, the nodes are annotated with the categories, languages and tags of their blogs.
 - `june_2010`: crawled in June 2010 by R. Zafarani and H. Liu. The friend lists of 10,152 bloggers were crawled; a directed edge $i \\to j$ indicates that blogger $j$ is listed as a friend of blogger $i$ (97,884 bloggers and 2,043,701 friend listings, of which 634,683 are reciprocated within the data; 55 are self-loops).
[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/blogcatalog_asu/__init__.py b/entries/blogcatalog_asu/__init__.py
index adca32e..170e9b1 100644
--- a/entries/blogcatalog_asu/__init__.py
+++ b/entries/blogcatalog_asu/__init__.py
@@ -39,7 +39,7 @@ url = ['https://web.archive.org/web/2010/http://socialcomputing.asu.edu/datasets
 citation = [('R. Zafarani, H. Liu, "Connecting corresponding identities across communities." Proceedings of the International AAAI Conference on Weblogs and Social Media 3(1), 354-357 (2009)', 'https://doi.org/10.1609/icwsm.v3i1.13993'),
             ('N. Agarwal, H. Liu, S. Murthy, A. Sen, X. Wang, "A social identity approach to identify familiar strangers in a social network." Proceedings of the International AAAI Conference on Weblogs and Social Media 3(1), 2-9 (2009)', 'https://doi.org/10.1609/icwsm.v3i1.13946'),
             ('R. Zafarani, H. Liu, "Social Computing Data Repository at ASU." Arizona State University, School of Computing, Informatics and Decision Systems Engineering (2009)', 'https://web.archive.org/web/2018/http://socialcomputing.asu.edu/')]
-icon_hash = '592de79c67ec90f1500d4e44'
+date_added = '2026-10-25'
 upstream_license = None
 # The ASU repository is offline; the file is obtained from the Internet
 # Archive.
[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/blogcatalog_asu/__init__.py b/entries/blogcatalog_asu/__init__.py
index 62599f9..adca32e 100644
--- a/entries/blogcatalog_asu/__init__.py
+++ b/entries/blogcatalog_asu/__init__.py
@@ -27,12 +27,12 @@ description = """Networks of friendships among the bloggers of BlogCatalog, a so
 
 The networks have the following properties:
 
-- `user_id`: the identifier of the blogger in the source data (the identifiers of the two crawls are not necessarily related).
-- `name`: the user name of the blogger.
-- `blogs` (`july_2009`): the number of blogs of the blogger in the data (0 if none were crawled).
-- `categories` (`july_2009`): the categories of the blogger's blogs (out of 344), e.g. "Personal" or "Green".
-- `languages` (`july_2009`): the languages of the blogger's blogs.
-- `tags` (`july_2009`): the tags of the blogger's blogs."""
+- (Node) `user_id`: the identifier of the blogger in the source data (the identifiers of the two crawls are not necessarily related).
+- (Node) `name`: the user name of the blogger.
+- (Node) `blogs` (`july_2009`): the number of blogs of the blogger in the data (0 if none were crawled).
+- (Node) `categories` (`july_2009`): the categories of the blogger's blogs (out of 344), e.g. "Personal" or "Green".
+- (Node) `languages` (`july_2009`): the languages of the blogger's blogs.
+- (Node) `tags` (`july_2009`): the tags of the blogger's blogs."""
 tags = ['Social', 'Online', 'Unweighted', 'Metadata']
 url = ['https://web.archive.org/web/2010/http://socialcomputing.asu.edu/datasets/BlogCatalog',
        'https://datasets.syr.edu/']
[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/blogcatalog_asu/__init__.py b/entries/blogcatalog_asu/__init__.py
index 3797a5d..62599f9 100644
--- a/entries/blogcatalog_asu/__init__.py
+++ b/entries/blogcatalog_asu/__init__.py
@@ -61,7 +61,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: blogcatalog_asu by Tiago de Paula Peixoto 349db35
diff --git a/entries/blogcatalog_asu/__init__.py b/entries/blogcatalog_asu/__init__.py
new file mode 100644
index 0000000..3797a5d
--- /dev/null
+++ b/entries/blogcatalog_asu/__init__.py
@@ -0,0 +1,130 @@
+#! /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 xml.etree.ElementTree as ET
+
+title = "BlogCatalog bloggers and friendships (2009, 2010)"
+description = """Networks of friendships among the bloggers of BlogCatalog, a social blog directory website, from two crawls distributed by the Social Computing Data Repository (originally at Arizona State University, now at Syracuse University; the versions used here, in XML format, are those of 2010, obtained from the Internet Archive, which include the metadata of the blogs). In BlogCatalog, users register their blogs under a hierarchy of predefined categories, tag them, and declare friendships with other users. In both networks, nodes are bloggers.
+
+- `july_2009`: crawled in July 2009 by N. Agarwal, X. Wang and H. Liu. An undirected edge connects two bloggers who are friends (the source lists each friendship under both users; 2,093,195 friendships among 88,784 bloggers). For the 80,950 bloggers whose blogs were also crawled, the nodes are annotated with the categories, languages and tags of their blogs.
+- `june_2010`: crawled in June 2010 by R. Zafarani and H. Liu. The friend lists of 10,152 bloggers were crawled; a directed edge $i \\to j$ indicates that blogger $j$ is listed as a friend of blogger $i$ (97,884 bloggers and 2,043,701 friend listings, of which 634,683 are reciprocated within the data; 55 are self-loops).
+
+The networks have the following properties:
+
+- `user_id`: the identifier of the blogger in the source data (the identifiers of the two crawls are not necessarily related).
+- `name`: the user name of the blogger.
+- `blogs` (`july_2009`): the number of blogs of the blogger in the data (0 if none were crawled).
+- `categories` (`july_2009`): the categories of the blogger's blogs (out of 344), e.g. "Personal" or "Green".
+- `languages` (`july_2009`): the languages of the blogger's blogs.
+- `tags` (`july_2009`): the tags of the blogger's blogs."""
+tags = ['Social', 'Online', 'Unweighted', 'Metadata']
+url = ['https://web.archive.org/web/2010/http://socialcomputing.asu.edu/datasets/BlogCatalog',
+       'https://datasets.syr.edu/']
+citation = [('R. Zafarani, H. Liu, "Connecting corresponding identities across communities." Proceedings of the International AAAI Conference on Weblogs and Social Media 3(1), 354-357 (2009)', 'https://doi.org/10.1609/icwsm.v3i1.13993'),
+            ('N. Agarwal, H. Liu, S. Murthy, A. Sen, X. Wang, "A social identity approach to identify familiar strangers in a social network." Proceedings of the International AAAI Conference on Weblogs and Social Media 3(1), 2-9 (2009)', 'https://doi.org/10.1609/icwsm.v3i1.13946'),
+            ('R. Zafarani, H. Liu, "Social Computing Data Repository at ASU." Arizona State University, School of Computing, Informatics and Decision Systems Engineering (2009)', 'https://web.archive.org/web/2018/http://socialcomputing.asu.edu/')]
+icon_hash = '592de79c67ec90f1500d4e44'
+upstream_license = None
+# The ASU repository is offline; the file is obtained from the Internet
+# Archive.
+upstream_prefix = 'https://web.archive.org/web/2010id_/http://socialcomputing.asu.edu/uploads'
+files = [(('BlogCatalog.zip:BlogCatalogdataset/data/BlogCatalog_Network.xml',
+           'BlogCatalog.zip:BlogCatalogdataset/data/BlogCatalog_Data.xml'),
+          'july_2009', None),
+         (('BlogCatalogDataset.zip:BlogCatalog_Network.xml',),
+          'june_2010', None)]
+archived_urls = {
+    'BlogCatalog.zip': 'https://web.archive.org/web/20100621094737id_/http://socialcomputing.asu.edu/uploads/1252092625/BlogCatalog.zip',
+    'BlogCatalogDataset.zip': 'https://web.archive.org/web/20100621092808id_/http://socialcomputing.asu.edu/uploads/1276800759/BlogCatalogDataset.zip'}
+
+def fetch_upstream(force=False):
+    return fetch_archived_files(__name__.split(".")[-1], archived_urls, force,
+                                tries=4)
+
+@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 alt == "june_2010":
+            names = {}
+            edges = []
+            with open_upstream_file(name, fnames[0], "rb") as f:
+                for ev, el in ET.iterparse(f):
+                    if el.tag in ("user", "friend"):
+                        names[int(el.get("id"))] = el.get("name")
+                    if el.tag == "user":
+                        u = int(el.get("id"))
+                        for fr in el.iter("friend"):
+                            edges.append((u, int(fr.get("id"))))
+                        el.clear()
+            g = Graph(directed=True)
+            g.vp.user_id = g.add_edge_list(numpy.array(edges, dtype="int64"),
+                                           hashed=True)
+            g.vp.name = g.new_vp("string", vals=[names[int(g.vp.user_id[v])]
+                                                  for v in g.vertices()])
+            yield alt, g
+            continue
+        names = {}
+        edges = []
+        with open_upstream_file(name, fnames[0], "rb") as f:
+            for ev, el in ET.iterparse(f):
+                if el.tag == "user":
+                    u = int(el.get("id"))
+                    names[u] = el.get("name")
+                    for fr in el.iter("friend"):
+                        v = int(fr.get("id"))
+                        if u < v:          # each friendship is listed twice
+                            edges.append((u, v))
+                    el.clear()
+        data = {}
+        with open_upstream_file(name, fnames[1], "rb") as f:
+            for ev, el in ET.iterparse(f):
+                if el.tag == "user":
+                    cats, langs, tags_ = set(), set(), set()
+                    blogs = el.findall("weblog")
+                    for w in blogs:
+                        if w.get("lan"):
+                            langs.add(w.get("lan"))
+                        cats.update(c.text for c in w.iter("category") if c.text)
+                        tags_.update(t.text for t in w.iter("tag") if t.text)
+                    data[int(el.get("id"))] = (len(blogs), sorted(cats),
+                                               sorted(langs), sorted(tags_))
+                    el.clear()
+        g = Graph(directed=False)
+        g.vp.user_id = g.add_edge_list(numpy.array(edges, dtype="int64"),
+                                       hashed=True)
+        ids = [int(g.vp.user_id[v]) for v in g.vertices()]
+        g.vp.name = g.new_vp("string", vals=[names[i] for i in ids])
+        g.vp.blogs = g.new_vp("int")
+        g.vp.categories = g.new_vp("vector<string>")
+        g.vp.languages = g.new_vp("vector<string>")
+        g.vp.tags = g.new_vp("vector<string>")
+        for v, i in zip(g.vertices(), ids):
+            if i in data:
+                n, c, l, t = data[i]
+                g.vp.blogs[v] = n
+                g.vp.categories[v] = c
+                g.vp.languages[v] = l
+                g.vp.tags[v] = t
+        yield alt, g