History of aminer_social_influence
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 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/aminer_social_influence/__init__.py b/entries/aminer_social_influence/__init__.py
index edec46b..b24fe5f 100644
--- a/entries/aminer_social_influence/__init__.py
+++ b/entries/aminer_social_influence/__init__.py
@@ -23,7 +23,7 @@ title = "AMiner social influence data sets: coauthorships, citations and movies
description = """Networks released by J. Tang and colleagues (Tsinghua University) with their study of topic-based social influence analysis, extracted from the AMiner (ArnetMiner) academic search system and from Wikipedia. The academic networks cover research topics found by an author-conference-topic model of AMiner: 16 (Data Mining / Association Rules), 24 (Database Systems / XML Data), 75 (Information Retrieval), 107 (Web Services), 131 (Bayesian Networks / Belief Function), 144 (Web Mining / Information Fusion), 145 (Semantic Web / Description Logics), 162 (Machine Learning), 182 (Pattern Recognition / Image Analysis) and 199 (Natural Language Systems / Statistical Machine Translation).
- `coauthors_T<topic>_sub<k>`: coauthorship networks of the authors of a topic (topics 16, 24, 75, 107, 131, 144, 145 and 162; for some topics there are several separate networks, numbered by `k`). Nodes are authors, and an undirected edge connects two authors who coauthored papers, with `weight` equal to the number of coauthored papers.
-- `citations_T<topic>`: citation networks of the papers of a topic (all ten topics). Nodes are papers, and a directed edge connects two papers with a citation relationship. The direction is not documented for these files; in `citations_all`, where publication years are available, the source paper is the later one for most edges, so that an edge presumably goes from the citing to the cited paper.
+- `citations_T<topic>`: citation networks of the papers of a topic (all ten topics). Nodes are papers, and a directed edge connects two papers with a citation relationship. The direction is not documented for these networks; in `citations_all`, where publication years are available, the source paper is the later one for most edges, so that an edge presumably goes from the citing to the cited paper.
- `citations_all`: a citation network of 2,555 papers of the ten topics (6,101 citations) with paper metadata. A directed edge goes from the source to the target paper of a citation relationship (see above).
- `movies`: a network of the English-language films on Wikipedia and their actors ("starring"), directors and writers. Nodes are films and persons, and an undirected edge connects two nodes whose names appear on the same Wikipedia page. Some pairs are listed several times (kept as parallel edges), and some edges are self-loops.
[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/aminer_social_influence/__init__.py b/entries/aminer_social_influence/__init__.py
index f5647a5..edec46b 100644
--- a/entries/aminer_social_influence/__init__.py
+++ b/entries/aminer_social_influence/__init__.py
@@ -45,8 +45,7 @@ url = ['https://web.archive.org/web/20150115063659/http://arnetminer.org/lab-dat
'https://lfs.aminer.cn/lab-datasets/soinf/']
citation = [('J. Tang, J. Sun, C. Wang, Z. Yang, "Social influence analysis in large-scale networks." Proceedings of the 15th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 807-816 (2009)', 'https://doi.org/10.1145/1557019.1557108'),
('J. Tang, J. Zhang, L. Yao, J. Li, L. Zhang, Z. Su, "ArnetMiner: extraction and mining of academic social networks." Proceedings of the 14th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 990-998 (2008)', 'https://doi.org/10.1145/1401890.1402008')]
-icon_hash = ['59cc7455ee01e9ab21aab83d', '59cc7592ee01e9ab21aab84b',
- '59cc7898ee01e9ab21aab84c']
+date_added = '2026-10-25'
upstream_license = None
upstream_prefix = 'https://lfs.aminer.cn/lab-datasets/soinf'
coauthor_nets = ['T16_sub0', 'T24_sub0', 'T75_sub0', 'T75_sub5', 'T107_sub1',
[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/aminer_social_influence/__init__.py b/entries/aminer_social_influence/__init__.py
index 656106b..f5647a5 100644
--- a/entries/aminer_social_influence/__init__.py
+++ b/entries/aminer_social_influence/__init__.py
@@ -29,15 +29,15 @@ description = """Networks released by J. Tang and colleagues (Tsinghua Universit
The networks have the following properties:
-- `name` (coauthors, movies): the name of the author, film or person.
-- `papers` (coauthors): the number of papers of the author.
-- `weight` (coauthors): the number of coauthored papers.
-- `title` (citations): the title of the paper.
-- `cited` (`citations_T<topic>`): the number of citations of the paper.
-- `year`, `venue`, `authors` (`citations_all`): the year of publication, publication venue and authors of the paper.
-- `type` (movies): the kind of node: "movie", "starring" (actor), "director" or "writer".
-- `words` (movies): the number of words introducing the node on Wikipedia.
-- `categories` (movies): the Wikipedia categories of the page of the node.
+- (Node) `name` (coauthors, movies): the name of the author, film or person.
+- (Node) `papers` (coauthors): the number of papers of the author.
+- (Edge) `weight` (coauthors): the number of coauthored papers.
+- (Node) `title` (citations): the title of the paper.
+- (Node) `cited` (`citations_T<topic>`): the number of citations of the paper.
+- (Node) `year`, `venue`, `authors` (`citations_all`): the year of publication, publication venue and authors of the paper.
+- (Node) `type` (movies): the kind of node: "movie", "starring" (actor), "director" or "writer".
+- (Node) `words` (movies): the number of words introducing the node on Wikipedia.
+- (Node) `categories` (movies): the Wikipedia categories of the page of the node.
According to the source, the data are for research purposes only."""
tags = ['Social', 'Collaboration', 'Informational', 'Citation', 'Weighted', 'Multigraph', 'Metadata']
[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/aminer_social_influence/__init__.py b/entries/aminer_social_influence/__init__.py
index c4efb32..656106b 100644
--- a/entries/aminer_social_influence/__init__.py
+++ b/entries/aminer_social_influence/__init__.py
@@ -84,7 +84,6 @@ def read_sections(f):
@coerce_props(vforce={'name': 'string', 'title': 'string'})
@annotate()
def parse(alts=None):
- global files
name = __name__.split(".")[-1]
for fname, alt, kind in files:
if alts is not None and alt not in alts:
[entries] New entry: aminer_social_influence d51f14b
diff --git a/entries/aminer_social_influence/__init__.py b/entries/aminer_social_influence/__init__.py
new file mode 100644
index 0000000..c4efb32
--- /dev/null
+++ b/entries/aminer_social_influence/__init__.py
@@ -0,0 +1,141 @@
+#! /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 re
+
+title = "AMiner social influence data sets: coauthorships, citations and movies (2009)"
+description = """Networks released by J. Tang and colleagues (Tsinghua University) with their study of topic-based social influence analysis, extracted from the AMiner (ArnetMiner) academic search system and from Wikipedia. The academic networks cover research topics found by an author-conference-topic model of AMiner: 16 (Data Mining / Association Rules), 24 (Database Systems / XML Data), 75 (Information Retrieval), 107 (Web Services), 131 (Bayesian Networks / Belief Function), 144 (Web Mining / Information Fusion), 145 (Semantic Web / Description Logics), 162 (Machine Learning), 182 (Pattern Recognition / Image Analysis) and 199 (Natural Language Systems / Statistical Machine Translation).
+
+- `coauthors_T<topic>_sub<k>`: coauthorship networks of the authors of a topic (topics 16, 24, 75, 107, 131, 144, 145 and 162; for some topics there are several separate networks, numbered by `k`). Nodes are authors, and an undirected edge connects two authors who coauthored papers, with `weight` equal to the number of coauthored papers.
+- `citations_T<topic>`: citation networks of the papers of a topic (all ten topics). Nodes are papers, and a directed edge connects two papers with a citation relationship. The direction is not documented for these files; in `citations_all`, where publication years are available, the source paper is the later one for most edges, so that an edge presumably goes from the citing to the cited paper.
+- `citations_all`: a citation network of 2,555 papers of the ten topics (6,101 citations) with paper metadata. A directed edge goes from the source to the target paper of a citation relationship (see above).
+- `movies`: a network of the English-language films on Wikipedia and their actors ("starring"), directors and writers. Nodes are films and persons, and an undirected edge connects two nodes whose names appear on the same Wikipedia page. Some pairs are listed several times (kept as parallel edges), and some edges are self-loops.
+
+The networks have the following properties:
+
+- `name` (coauthors, movies): the name of the author, film or person.
+- `papers` (coauthors): the number of papers of the author.
+- `weight` (coauthors): the number of coauthored papers.
+- `title` (citations): the title of the paper.
+- `cited` (`citations_T<topic>`): the number of citations of the paper.
+- `year`, `venue`, `authors` (`citations_all`): the year of publication, publication venue and authors of the paper.
+- `type` (movies): the kind of node: "movie", "starring" (actor), "director" or "writer".
+- `words` (movies): the number of words introducing the node on Wikipedia.
+- `categories` (movies): the Wikipedia categories of the page of the node.
+
+According to the source, the data are for research purposes only."""
+tags = ['Social', 'Collaboration', 'Informational', 'Citation', 'Weighted', 'Multigraph', 'Metadata']
+url = ['https://web.archive.org/web/20150115063659/http://arnetminer.org/lab-datasets/soinf/',
+ 'https://lfs.aminer.cn/lab-datasets/soinf/']
+citation = [('J. Tang, J. Sun, C. Wang, Z. Yang, "Social influence analysis in large-scale networks." Proceedings of the 15th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 807-816 (2009)', 'https://doi.org/10.1145/1557019.1557108'),
+ ('J. Tang, J. Zhang, L. Yao, J. Li, L. Zhang, Z. Su, "ArnetMiner: extraction and mining of academic social networks." Proceedings of the 14th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 990-998 (2008)', 'https://doi.org/10.1145/1401890.1402008')]
+icon_hash = ['59cc7455ee01e9ab21aab83d', '59cc7592ee01e9ab21aab84b',
+ '59cc7898ee01e9ab21aab84c']
+upstream_license = None
+upstream_prefix = 'https://lfs.aminer.cn/lab-datasets/soinf'
+coauthor_nets = ['T16_sub0', 'T24_sub0', 'T75_sub0', 'T75_sub5', 'T107_sub1',
+ 'T107_sub34', 'T131_sub0', 'T144_sub4', 'T144_sub6',
+ 'T144_sub27', 'T145_sub0', 'T145_sub196', 'T162_sub1']
+topics = [16, 24, 75, 107, 131, 144, 145, 162, 182, 199]
+# The rar archives are stored under names without extension (read directly)
+files = ([(f'graphs_authors:rar:graph-{n}.net', f'coauthors_{n}', 'coauthors')
+ for n in coauthor_nets] +
+ [(f'graphs_pubs:rar:graph-{t}.net', f'citations_T{t}', 'citations')
+ for t in topics] +
+ [('citation-raw.txt', 'citations_all', 'raw'),
+ ('newmovies:rar:newmovies.txt', 'movies', 'movies')])
+archived_urls = {'graphs_authors:rar:graph-T16_sub0.net': f'{upstream_prefix}/graphs_authors.rar',
+ 'graphs_pubs:rar:graph-16.net': f'{upstream_prefix}/graphs_pubs.rar',
+ 'citation-raw.txt': f'{upstream_prefix}/citation-raw.txt',
+ 'newmovies:rar:newmovies.txt': f'{upstream_prefix}/newmovies.rar'}
+
+def fetch_upstream(force=False):
+ return fetch_archived_files(__name__.split(".")[-1], archived_urls, force)
+
+def read_sections(f):
+ "Split a Pajek-like file into its *Vertices and *Edges lines."
+ sec = None
+ secs = {"vertices": [], "edges": []}
+ for line in f.read().decode("utf-8", "replace").splitlines():
+ if line.startswith("*"):
+ sec = line.split()[0][1:].lower()
+ continue
+ if line.strip() and sec in secs:
+ secs[sec].append(line)
+ return secs
+
+@cache_network()
+@coerce_props(vforce={'name': 'string', 'title': 'string'})
+@annotate()
+def parse(alts=None):
+ global files
+ name = __name__.split(".")[-1]
+ for fname, alt, kind in files:
+ if alts is not None and alt not in alts:
+ continue
+ with open_upstream_file(name, fname, "rb") as f:
+ secs = read_sections(f)
+ V = {}
+ for line in secs["vertices"]:
+ if kind == "raw":
+ x = line.split("\t")
+ V[int(x[0])] = x[1:]
+ else:
+ m = re.match(r'\s*(\d+)\s+"(.*)"\s+(\S+)\s*(.*)$', line)
+ V[int(m.group(1))] = [m.group(2), m.group(3)] + m.group(4).split("\t")
+ edges = []
+ for line in secs["edges"]:
+ x = line.split()
+ if len(x) < 2:
+ continue # a truncated line in graph-T162_sub1.net
+ edges.append((int(x[0]), int(x[1]), int(x[2]) if len(x) > 2 else 1))
+ ids = sorted(set(V) | set(i for e in edges for i in e[:2]))
+ idx = {i: k for k, i in enumerate(ids)}
+ g = Graph(directed=kind in ("citations", "raw"))
+ g.add_vertex(len(ids))
+ E = [(idx[u], idx[v], w) for u, v, w in edges]
+ if kind == "coauthors":
+ g.ep.weight = g.new_ep("int")
+ g.add_edge_list(E, eprops=[g.ep.weight])
+ else:
+ g.add_edge_list([e[:2] for e in E])
+ def vals(i, default=""):
+ return [V[k][i] if k in V and len(V[k]) > i else default for k in ids]
+ if kind == "coauthors":
+ g.vp.name = g.new_vp("string", vals=vals(0))
+ g.vp.papers = g.new_vp("int", vals=[int(x) for x in vals(1, "-1")])
+ elif kind == "citations":
+ g.vp.title = g.new_vp("string", vals=vals(0))
+ g.vp.cited = g.new_vp("int", vals=[int(x) for x in vals(1, "-1")])
+ elif kind == "raw":
+ g.vp.title = g.new_vp("string", vals=vals(0))
+ g.vp.year = g.new_vp("int", vals=[int(x) if x.strip().isdigit() else -1
+ for x in vals(1, "-1")])
+ g.vp.venue = g.new_vp("string", vals=vals(2))
+ g.vp.authors = g.new_vp("vector<string>",
+ vals=[[a.strip() for a in x.split(",") if a.strip()]
+ for x in vals(3)])
+ else:
+ g.vp.name = g.new_vp("string", vals=vals(0))
+ g.vp.words = g.new_vp("int", vals=[int(x) for x in vals(1, "-1")])
+ g.vp.type = g.new_vp("string", vals=[x.strip() for x in vals(2)])
+ g.vp.categories = g.new_vp("vector<string>",
+ vals=[[c for c in x.split(";") if c.strip()]
+ for x in vals(3)])
+ yield alt, g