logo Netzschleuder network catalog, repository, and centrifuge

History of twitter

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/twitter/__init__.py b/entries/twitter/__init__.py
index ec66a54..f5f36db 100644
--- a/entries/twitter/__init__.py
+++ b/entries/twitter/__init__.py
@@ -29,7 +29,7 @@ The network has the following properties:
 tags = ['Social', 'Online', 'Unweighted', 'Metadata']
 url = 'https://web.archive.org/web/20101201040745/http://www.public.asu.edu/~mdechoud/datasets.html'
 citation = [('M. De Choudhury, Y.-R. Lin, H. Sundaram, K. S. Candan, L. Xie, A. Kelliher, "How does the data sampling strategy impact the discovery of information diffusion in social media?" Proceedings of the International AAAI Conference on Web and Social Media 4(1), 34-41 (2010)', 'https://doi.org/10.1609/icwsm.v4i1.14024')]
-icon_hash = '583229668cf714f319c427aa'
+date_added = '2020-08-11'
 upstream_license = ("Creative Commons Attribution-NonCommercial 3.0 United States (CC BY-NC 3.0 US)",
                     "https://creativecommons.org/licenses/by-nc/3.0/us/")
 # The ASU page is no longer publicly available, so the file is obtained from
[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/twitter/__init__.py b/entries/twitter/__init__.py
index 8ef11d6..ec66a54 100644
--- a/entries/twitter/__init__.py
+++ b/entries/twitter/__init__.py
@@ -23,7 +23,9 @@ description = """A directed network of following relationships on Twitter, colle
 
 The network has the following properties:
 
-- Nodes: `name`, the Twitter user name; `time_zone`, the time zone set in the user's profile (empty if none); `statuses`, `followers`, `friends` and `favourites`, counts from the user's profile (-1 for the 9,205 users without profile data). The columns of the profile file are not documented; this assignment is inferred from the attributes listed in the source page and from the values (the `friends` count, i.e. the number of users followed, usually matches the number of out-edges of the crawled users)."""
+- (Node) `name`: the Twitter user name.
+- (Node) `time_zone`: the time zone set in the user's profile (empty if none).
+- (Node) `statuses`, `followers`, `friends`, `favourites`: counts from the user's profile (-1 for the 9,205 users without profile data). The columns of the profile file are not documented; this assignment is inferred from the attributes listed in the source page and from the values (the `friends` count, i.e. the number of users followed, usually matches the number of out-edges of the crawled users)."""
 tags = ['Social', 'Online', 'Unweighted', 'Metadata']
 url = 'https://web.archive.org/web/20101201040745/http://www.public.asu.edu/~mdechoud/datasets.html'
 citation = [('M. De Choudhury, Y.-R. Lin, H. Sundaram, K. S. Candan, L. Xie, A. Kelliher, "How does the data sampling strategy impact the discovery of information diffusion in social media?" Proceedings of the International AAAI Conference on Web and Social Media 4(1), 34-41 (2010)', 'https://doi.org/10.1609/icwsm.v4i1.14024')]
[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/twitter/__init__.py b/entries/twitter/__init__.py
index c3c7297..8ef11d6 100644
--- a/entries/twitter/__init__.py
+++ b/entries/twitter/__init__.py
@@ -44,7 +44,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] Move more KONECT-derived entries to their original sources by Tiago de Paula Peixoto bf9dc0e
The entries now download the data from where KONECT obtained them (live,
or via the Wayback Machine), using the same release as KONECT where it is
still available, and gain the metadata KONECT dropped; descriptions and
citations are rewritten from the original sources:

- Linton Freeman's UCINET data page: bible_nouns, bison, cattle, hens,
  highschool, kangaroo, macaques, moreno_sheep, physician_trust (the three
  relations and the physicians' attributes), rhesus_monkey,
  train_terrorists, windsurfers (now the networks `interaction` and
  `closeness`), college_freshmen, crime, interactome_yeast (from the
  primary source), moreno_taro (undirected), residence_hall, zebras
- other pages, archived: contiguous_usa, advogato, google, github,
  digg_reply, twitter, bookcrossing, dbtropes_feature (without KONECT's
  spurious "ItemName" tropes)
- movielens_100k (in fact the MovieLens 10M tag assignments)
- dblp release 2017-05-02: dblp_author_paper, dblp_cite, dblp_coauthor
- DBpedia 3.9: dbpedia_country, dbpedia_genre, dbpedia_location,
  dbpedia_occupation, dbpedia_producer, dbpedia_recordlabel,
  dbpedia_starring, dbpedia_team, dbpedia_writer, dbpedia_all, dbpedia_link
- Discogs releases dump of October 2015: discogs_affiliation,
  discogs_genre and discogs_label (now with genre and style networks)
diff --git a/entries/twitter/__init__.py b/entries/twitter/__init__.py
index 3bd9bd7..c3c7297 100644
--- a/entries/twitter/__init__.py
+++ b/entries/twitter/__init__.py
@@ -18,19 +18,27 @@
 
 from .. import *
 
-title = "Twitter followers (2010)"
-description = """A directed network of following relationships from Twitter, from a snowball sample crawl across \"quality\" users in 2009. A directed edge (i, j) indicates that user i follows user j.[^icon]
-[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
-tags = ['Social', 'Online', 'Unweighted']
-url = 'http://konect.cc/networks/munmun_twitter_social'
-citation = [('M. De Choudhury, et al. "How does the data sampling strategy impact the discovery of information diffusion in social media?" Proc. Internat. Conf. on the Web and Social Media (ICWSM 2010).', 'https://doi.org/10.1145/1810617.1810674')]
+title = "Twitter followers (2009)"
+description = """A directed network of following relationships on Twitter, collected by M. De Choudhury and collaborators with crawlers based on the Twitter API, as part of a data set of about 10.5 million tweets (from 2006 to 2009) of about 200,000 users. The social graph lists, for 2,502 crawled users, up to about 500 of the users they follow, so that almost all nodes have only incoming edges. A directed edge from $i$ to $j$ means that user $i$ follows user $j$ (the direction is not documented in the source, but is consistent with the users' profile counts). Repeated lines and 117 lines with an empty user name in the source file are left out.
+
+The network has the following properties:
+
+- Nodes: `name`, the Twitter user name; `time_zone`, the time zone set in the user's profile (empty if none); `statuses`, `followers`, `friends` and `favourites`, counts from the user's profile (-1 for the 9,205 users without profile data). The columns of the profile file are not documented; this assignment is inferred from the attributes listed in the source page and from the values (the `friends` count, i.e. the number of users followed, usually matches the number of out-edges of the crawled users)."""
+tags = ['Social', 'Online', 'Unweighted', 'Metadata']
+url = 'https://web.archive.org/web/20101201040745/http://www.public.asu.edu/~mdechoud/datasets.html'
+citation = [('M. De Choudhury, Y.-R. Lin, H. Sundaram, K. S. Candan, L. Xie, A. Kelliher, "How does the data sampling strategy impact the discovery of information diffusion in social media?" Proceedings of the International AAAI Conference on Web and Social Media 4(1), 34-41 (2010)', 'https://doi.org/10.1609/icwsm.v4i1.14024')]
 icon_hash = '583229668cf714f319c427aa'
-upstream_prefix = 'http://konect.cc/files'
-files = [('download.tsv.munmun_twitter_social.tar.bz2', None, 'konect')]
+upstream_license = ("Creative Commons Attribution-NonCommercial 3.0 United States (CC BY-NC 3.0 US)",
+                    "https://creativecommons.org/licenses/by-nc/3.0/us/")
+# The ASU page is no longer publicly available, so the file is obtained from
+# the Internet Archive.
+upstream_prefix = 'https://web.archive.org/web/20101201120443id_/http://www.public.asu.edu/~mdechoud/data'
+files = [(('twitter_data.zip:twitter_data/socialgraph.data',
+           'twitter_data.zip:twitter_data/userinfo.data'), None, None)]
 
 def fetch_upstream(force=False):
-    return fetch_upstream_files(__name__.split(".")[-1], upstream_prefix, files,
-                                force)
+    return retry_download(fetch_upstream_files, __name__.split(".")[-1],
+                          upstream_prefix, files, force)
 
 @cache_network()
 @coerce_props()
@@ -41,9 +49,34 @@ def parse(alts=None):
     for fnames, alt, fmt in files:
         if alts is not None and alt not in alts:
             continue
-        if isinstance(fnames, str):
-            fnames = [fnames]
         with ExitStack() as stack:
-            fs = [stack.enter_context(open_upstream_file(name, fn, "rb")) for fn in fnames]
-            g = parse_graph(fs, fmt, directed=True)
+            fs = [stack.enter_context(open_upstream_file(name, fn, "r")) for fn in fnames]
+            # Follows: "<user>\t<user>"
+            edges = []
+            seen = set()
+            for line in fs[0]:
+                e = tuple(line.rstrip("\r\n").split("\t"))
+                if "" in e or e in seen:
+                    continue
+                seen.add(e)
+                edges.append(e)
+            # Profiles: "<user>\t<time zone>\t<statuses>\t<followers>\t<friends>\t<favourites>"
+            info = {}
+            for line in fs[1]:
+                x = line.rstrip("\r\n").split("\t")
+                info[x[0]] = x[1:]
+        g = Graph(directed=True)
+        g.vp.name = g.add_edge_list(edges, hashed=True, hash_type="string")
+        g.vp.time_zone = g.new_vp("string")
+        pnames = ["statuses", "followers", "friends", "favourites"]
+        for k in pnames:
+            g.vp[k] = g.new_vp("int64_t", val=-1)
+        for v in g.vertices():
+            x = info.get(g.vp.name[v])
+            if x is None:
+                continue
+            if x[0] != "None":
+                g.vp.time_zone[v] = x[0]
+            for k, val in zip(pnames, x[1:]):
+                g.vp[k][v] = int(val)
         yield alt, g
Update copyright information by Tiago de Paula Peixoto 73a4f0d
diff --git a/entries/twitter/__init__.py b/entries/twitter/__init__.py
index 3902b48..3bd9bd7 100644
--- a/entries/twitter/__init__.py
+++ b/entries/twitter/__init__.py
@@ -1,7 +1,7 @@
 #! /usr/bin/env python
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2020-2024 Tiago de Paula Peixoto <tiago@skewed.de>
+# 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
Update copyright information by Tiago de Paula Peixoto 3d288ea
diff --git a/entries/twitter/__init__.py b/entries/twitter/__init__.py
index af45d7c..3902b48 100644
--- a/entries/twitter/__init__.py
+++ b/entries/twitter/__init__.py
@@ -1,7 +1,7 @@
 #! /usr/bin/env python
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2020-2023 Tiago de Paula Peixoto <tiago@skewed.de>
+# Copyright (C) 2020-2024 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
Update copyright information by Tiago de Paula Peixoto 8d005ae
diff --git a/entries/twitter/__init__.py b/entries/twitter/__init__.py
index 86c7dcc..af45d7c 100644
--- a/entries/twitter/__init__.py
+++ b/entries/twitter/__init__.py
@@ -1,7 +1,7 @@
 #! /usr/bin/env python
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2021 Tiago de Paula Peixoto <tiago@skewed.de>
+# Copyright (C) 2020-2023 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
Update copyright info by Tiago de Paula Peixoto db2efcc
diff --git a/entries/twitter/__init__.py b/entries/twitter/__init__.py
index b31c066..86c7dcc 100644
--- a/entries/twitter/__init__.py
+++ b/entries/twitter/__init__.py
@@ -1,7 +1,7 @@
 #! /usr/bin/env python
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2020 Tiago de Paula Peixoto <tiago@skewed.de>
+# Copyright (C) 2021 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
Un-orphan KONECT datasets by Tiago de Paula Peixoto 894eba5
KONECT has been brought back from the dead for the time being.
diff --git a/entries/twitter/__init__.py b/entries/twitter/__init__.py
index d4b7c0f..b31c066 100644
--- a/entries/twitter/__init__.py
+++ b/entries/twitter/__init__.py
@@ -26,7 +26,6 @@ url = 'http://konect.cc/networks/munmun_twitter_social'
 citation = [('M. De Choudhury, et al. "How does the data sampling strategy impact the discovery of information diffusion in social media?" Proc. Internat. Conf. on the Web and Social Media (ICWSM 2010).', 'https://doi.org/10.1145/1810617.1810674')]
 icon_hash = '583229668cf714f319c427aa'
 upstream_prefix = 'http://konect.cc/files'
-orphan = True
 files = [('download.tsv.munmun_twitter_social.tar.bz2', None, 'konect')]
 
 def fetch_upstream(force=False):
Update citations to use DOIs by Tiago de Paula Peixoto e878874
diff --git a/entries/twitter/__init__.py b/entries/twitter/__init__.py
index a26a2a2..d4b7c0f 100644
--- a/entries/twitter/__init__.py
+++ b/entries/twitter/__init__.py
@@ -23,7 +23,7 @@ description = """A directed network of following relationships from Twitter, fro
 [^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
 tags = ['Social', 'Online', 'Unweighted']
 url = 'http://konect.cc/networks/munmun_twitter_social'
-citation = [('M. De Choudhury, et al. "How does the data sampling strategy impact the discovery of information diffusion in social media?" Proc. Internat. Conf. on the Web and Social Media (ICWSM 2010).', 'http://www.aaai.org/ocs/index.php/ICWSM/ICWSM10/paper/viewFile/1521/1832')]
+citation = [('M. De Choudhury, et al. "How does the data sampling strategy impact the discovery of information diffusion in social media?" Proc. Internat. Conf. on the Web and Social Media (ICWSM 2010).', 'https://doi.org/10.1145/1810617.1810674')]
 icon_hash = '583229668cf714f319c427aa'
 upstream_prefix = 'http://konect.cc/files'
 orphan = True
Add support for 'orphan' datasets and tag konect entries by Tiago de Paula Peixoto e330b80
diff --git a/entries/twitter/__init__.py b/entries/twitter/__init__.py
index 0e6dbe6..a26a2a2 100644
--- a/entries/twitter/__init__.py
+++ b/entries/twitter/__init__.py
@@ -26,6 +26,7 @@ url = 'http://konect.cc/networks/munmun_twitter_social'
 citation = [('M. De Choudhury, et al. "How does the data sampling strategy impact the discovery of information diffusion in social media?" Proc. Internat. Conf. on the Web and Social Media (ICWSM 2010).', 'http://www.aaai.org/ocs/index.php/ICWSM/ICWSM10/paper/viewFile/1521/1832')]
 icon_hash = '583229668cf714f319c427aa'
 upstream_prefix = 'http://konect.cc/files'
+orphan = True
 files = [('download.tsv.munmun_twitter_social.tar.bz2', None, 'konect')]
 
 def fetch_upstream(force=False):
Change license from GPLv3 to AGPLv3 by Tiago de Paula Peixoto d754be5
diff --git a/entries/twitter/__init__.py b/entries/twitter/__init__.py
index cc67101..0e6dbe6 100644
--- a/entries/twitter/__init__.py
+++ b/entries/twitter/__init__.py
@@ -3,18 +3,18 @@
 #
 # Copyright (C) 2020 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 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 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 General Public License for more details.
+# 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 General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# 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 *
 
Add explicit attribution to descriptions obtained from ICON by Tiago de Paula Peixoto 1645314
diff --git a/entries/twitter/__init__.py b/entries/twitter/__init__.py
index 10e1037..cc67101 100644
--- a/entries/twitter/__init__.py
+++ b/entries/twitter/__init__.py
@@ -19,7 +19,8 @@
 from .. import *
 
 title = "Twitter followers (2010)"
-description = "A directed network of following relationships from Twitter, from a snowball sample crawl across \"quality\" users in 2009. A directed edge (i, j) indicates that user i follows user j."
+description = """A directed network of following relationships from Twitter, from a snowball sample crawl across \"quality\" users in 2009. A directed edge (i, j) indicates that user i follows user j.[^icon]
+[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
 tags = ['Social', 'Online', 'Unweighted']
 url = 'http://konect.cc/networks/munmun_twitter_social'
 citation = [('M. De Choudhury, et al. "How does the data sampling strategy impact the discovery of information diffusion in social media?" Proc. Internat. Conf. on the Web and Social Media (ICWSM 2010).', 'http://www.aaai.org/ocs/index.php/ICWSM/ICWSM10/paper/viewFile/1521/1832')]
Initial commit by Tiago de Paula Peixoto cc85872
diff --git a/entries/twitter/__init__.py b/entries/twitter/__init__.py
new file mode 100644
index 0000000..10e1037
--- /dev/null
+++ b/entries/twitter/__init__.py
@@ -0,0 +1,48 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2020 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 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+from .. import *
+
+title = "Twitter followers (2010)"
+description = "A directed network of following relationships from Twitter, from a snowball sample crawl across \"quality\" users in 2009. A directed edge (i, j) indicates that user i follows user j."
+tags = ['Social', 'Online', 'Unweighted']
+url = 'http://konect.cc/networks/munmun_twitter_social'
+citation = [('M. De Choudhury, et al. "How does the data sampling strategy impact the discovery of information diffusion in social media?" Proc. Internat. Conf. on the Web and Social Media (ICWSM 2010).', 'http://www.aaai.org/ocs/index.php/ICWSM/ICWSM10/paper/viewFile/1521/1832')]
+icon_hash = '583229668cf714f319c427aa'
+upstream_prefix = 'http://konect.cc/files'
+files = [('download.tsv.munmun_twitter_social.tar.bz2', None, 'konect')]
+
+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
+        if isinstance(fnames, str):
+            fnames = [fnames]
+        with ExitStack() as stack:
+            fs = [stack.enter_context(open_upstream_file(name, fn, "rb")) for fn in fnames]
+            g = parse_graph(fs, fmt, directed=True)
+        yield alt, g