History of facebook100
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/facebook100/__init__.py b/entries/facebook100/__init__.py
index 0e0d9b3..fda8086 100644
--- a/entries/facebook100/__init__.py
+++ b/entries/facebook100/__init__.py
@@ -43,7 +43,7 @@ url = ['https://archive.org/details/oxford-2005-facebook-matrix',
'https://github.com/Pchambet/facebook100-social-structure/tree/a30d7f4601d50f835b8d0c672efc5b6c4bf0d6bc/data/facebook100']
citation = [('A. L. Traud, P. J. Mucha, and M. A. Porter, "Social structure of Facebook networks." Physica A 391(16), 4165-4180 (2012).', 'https://doi.org/10.1016/j.physa.2011.12.021'),
('A. L. Traud, E. D. Kelsic, P. J. Mucha, and M. A. Porter, "Comparing Community Structure to Characteristics in Online Collegiate Social Networks." SIAM Review 53(3), 526-543 (2011).', 'https://doi.org/10.1137/080734315')]
-icon_hash = None
+date_added = '2026-10-27'
upstream_license = None
restricted = True
# The Internet Archive item (facebook100.zip, MD5
[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/facebook100/__init__.py b/entries/facebook100/__init__.py
index 2890232..0e0d9b3 100644
--- a/entries/facebook100/__init__.py
+++ b/entries/facebook100/__init__.py
@@ -31,13 +31,13 @@ The data were obtained from a copy of the original files (identical to the copy
The node attributes were anonymized by the authors: each attribute value is replaced by an integer code (except the year), and the meaning of the codes is not provided; the code 0 means missing data. The networks have the following properties:
-- `status`: the student/faculty status flag (an integer code; which code stands for which status, e.g. student or faculty, is not documented; the codes are 1 to 6, 0 if missing, and 10 for two nodes).
-- `gender`: the gender (an integer code, 1 or 2; 0 if missing; which code stands for which gender is not documented).
-- `major`: the major (an integer code).
-- `second_major`: the second major or minor (an integer code).
-- `dorm`: the dorm or house (an integer code).
-- `year`: the class year (a calendar year, e.g. 2008; 0 if missing). A few implausible values are kept as in the data (e.g. 1887, 3000, and the year 2147483647 of a node of `Harvard1` and -80085 of a node of `UChicago30`).
-- `high_school`: the high school (an integer code)."""
+- (Node) `status`: the student/faculty status flag (an integer code; which code stands for which status, e.g. student or faculty, is not documented; the codes are 1 to 6, 0 if missing, and 10 for two nodes).
+- (Node) `gender`: the gender (an integer code, 1 or 2; 0 if missing; which code stands for which gender is not documented).
+- (Node) `major`: the major (an integer code).
+- (Node) `second_major`: the second major or minor (an integer code).
+- (Node) `dorm`: the dorm or house (an integer code).
+- (Node) `year`: the class year (a calendar year, e.g. 2008; 0 if missing). A few implausible values are kept as in the data (e.g. 1887, 3000, and the year 2147483647 of a node of `Harvard1` and -80085 of a node of `UChicago30`).
+- (Node) `high_school`: the high school (an integer code)."""
tags = ['Social', 'Online', 'Unweighted', 'Metadata']
url = ['https://archive.org/details/oxford-2005-facebook-matrix',
'https://github.com/Pchambet/facebook100-social-structure/tree/a30d7f4601d50f835b8d0c672efc5b6c4bf0d6bc/data/facebook100']
[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 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/facebook100/__init__.py b/entries/facebook100/__init__.py
index 2a89dbe..2890232 100644
--- a/entries/facebook100/__init__.py
+++ b/entries/facebook100/__init__.py
@@ -27,7 +27,7 @@ import scipy.sparse
title = "Facebook100 university friendship networks (2005)"
description = r"""Facebook friendship networks within 100 American colleges and universities, from a single day in September 2005, when Facebook was still restricted to university communities. The data were provided to A. L. Traud, P. J. Mucha and M. A. Porter by Facebook, and released by them in 2011 (as `facebook100.zip`; five of the networks had been released before as "Facebook5"). Each network contains all the friendships between Facebook users of the same institution (links to other institutions are not included), without isolated nodes, and is not restricted to the largest connected component. Nodes are users (anonymous, labeled consecutively), and an undirected edge connects two users who are Facebook friends. Each network is named after its institution with the number by which the authors indexed it (e.g. `Caltech36`, `Harvard1`, `Penn94`; the spaces of `Johns Hopkins55` and `Notre Dame57` are replaced by underscores).
-**Access to this entry is restricted** (it requires an access token): Facebook asked for the original distribution of the data to be withdrawn, and the authors no longer distribute it. The data were obtained from a copy of the original files (identical to the copy of five of them in the LINKX benchmark repository) in the history of a public GitHub repository, pinned at a fixed commit, since the copy in the Internet Archive (item `oxford-2005-facebook-matrix`, facebook100.zip) is no longer publicly accessible.
+The data were obtained from a copy of the original files (identical to the copy of five of them in the LINKX benchmark repository) in the history of a public GitHub repository, pinned at a fixed commit, since the copy in the Internet Archive (item `oxford-2005-facebook-matrix`, facebook100.zip) is no longer publicly accessible.
The node attributes were anonymized by the authors: each attribute value is replaced by an integer code (except the year), and the meaning of the codes is not provided; the code 0 means missing data. The networks have the following properties:
[entries] New entry: facebook100 34d84b0
diff --git a/entries/facebook100/__init__.py b/entries/facebook100/__init__.py
new file mode 100644
index 0000000..2a89dbe
--- /dev/null
+++ b/entries/facebook100/__init__.py
@@ -0,0 +1,108 @@
+#! /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 urllib.parse
+import scipy.io
+import scipy.sparse
+
+title = "Facebook100 university friendship networks (2005)"
+description = r"""Facebook friendship networks within 100 American colleges and universities, from a single day in September 2005, when Facebook was still restricted to university communities. The data were provided to A. L. Traud, P. J. Mucha and M. A. Porter by Facebook, and released by them in 2011 (as `facebook100.zip`; five of the networks had been released before as "Facebook5"). Each network contains all the friendships between Facebook users of the same institution (links to other institutions are not included), without isolated nodes, and is not restricted to the largest connected component. Nodes are users (anonymous, labeled consecutively), and an undirected edge connects two users who are Facebook friends. Each network is named after its institution with the number by which the authors indexed it (e.g. `Caltech36`, `Harvard1`, `Penn94`; the spaces of `Johns Hopkins55` and `Notre Dame57` are replaced by underscores).
+
+**Access to this entry is restricted** (it requires an access token): Facebook asked for the original distribution of the data to be withdrawn, and the authors no longer distribute it. The data were obtained from a copy of the original files (identical to the copy of five of them in the LINKX benchmark repository) in the history of a public GitHub repository, pinned at a fixed commit, since the copy in the Internet Archive (item `oxford-2005-facebook-matrix`, facebook100.zip) is no longer publicly accessible.
+
+The node attributes were anonymized by the authors: each attribute value is replaced by an integer code (except the year), and the meaning of the codes is not provided; the code 0 means missing data. The networks have the following properties:
+
+- `status`: the student/faculty status flag (an integer code; which code stands for which status, e.g. student or faculty, is not documented; the codes are 1 to 6, 0 if missing, and 10 for two nodes).
+- `gender`: the gender (an integer code, 1 or 2; 0 if missing; which code stands for which gender is not documented).
+- `major`: the major (an integer code).
+- `second_major`: the second major or minor (an integer code).
+- `dorm`: the dorm or house (an integer code).
+- `year`: the class year (a calendar year, e.g. 2008; 0 if missing). A few implausible values are kept as in the data (e.g. 1887, 3000, and the year 2147483647 of a node of `Harvard1` and -80085 of a node of `UChicago30`).
+- `high_school`: the high school (an integer code)."""
+tags = ['Social', 'Online', 'Unweighted', 'Metadata']
+url = ['https://archive.org/details/oxford-2005-facebook-matrix',
+ 'https://github.com/Pchambet/facebook100-social-structure/tree/a30d7f4601d50f835b8d0c672efc5b6c4bf0d6bc/data/facebook100']
+citation = [('A. L. Traud, P. J. Mucha, and M. A. Porter, "Social structure of Facebook networks." Physica A 391(16), 4165-4180 (2012).', 'https://doi.org/10.1016/j.physa.2011.12.021'),
+ ('A. L. Traud, E. D. Kelsic, P. J. Mucha, and M. A. Porter, "Comparing Community Structure to Characteristics in Online Collegiate Social Networks." SIAM Review 53(3), 526-543 (2011).', 'https://doi.org/10.1137/080734315')]
+icon_hash = None
+upstream_license = None
+restricted = True
+# The Internet Archive item (facebook100.zip, MD5
+# a7687ec2362d369803a3463e2884dbe8) became access-restricted (HTTP 401) in
+# October 2026; the original .mat files are taken from the history of a
+# public repository, pinned at a fixed commit
+upstream_prefix = 'https://raw.githubusercontent.com/Pchambet/facebook100-social-structure/a30d7f4601d50f835b8d0c672efc5b6c4bf0d6bc/data/facebook100'
+schools = ['American75', 'Amherst41', 'Auburn71', 'BC17', 'BU10', 'Baylor93',
+ 'Berkeley13', 'Bingham82', 'Bowdoin47', 'Brandeis99', 'Brown11',
+ 'Bucknell39', 'Cal65', 'Caltech36', 'Carnegie49', 'Colgate88',
+ 'Columbia2', 'Cornell5', 'Dartmouth6', 'Duke14', 'Emory27', 'FSU53',
+ 'GWU54', 'Georgetown15', 'Hamilton46', 'Harvard1', 'Haverford76',
+ 'Howard90', 'Indiana69', 'JMU79', 'Johns Hopkins55', 'Lehigh96',
+ 'MIT8', 'MSU24', 'MU78', 'Maine59', 'Maryland58', 'Mich67',
+ 'Michigan23', 'Middlebury45', 'Mississippi66', 'NYU9',
+ 'Northeastern19', 'Northwestern25', 'Notre Dame57', 'Oberlin44',
+ 'Oklahoma97', 'Penn94', 'Pepperdine86', 'Princeton12', 'Reed98',
+ 'Rice31', 'Rochester38', 'Rutgers89', 'Santa74', 'Simmons81',
+ 'Smith60', 'Stanford3', 'Swarthmore42', 'Syracuse56', 'Temple83',
+ 'Tennessee95', 'Texas80', 'Texas84', 'Trinity100', 'Tufts18',
+ 'Tulane29', 'UC33', 'UC61', 'UC64', 'UCF52', 'UCLA26', 'UCSB37',
+ 'UCSC68', 'UCSD34', 'UChicago30', 'UConn91', 'UF21', 'UGA50',
+ 'UIllinois20', 'UMass92', 'UNC28', 'UPenn7', 'USC35', 'USF51',
+ 'USFCA72', 'UVA16', 'Vanderbilt48', 'Vassar85', 'Vermont70',
+ 'Villanova62', 'Virginia63', 'Wake73', 'WashU32', 'Wellesley22',
+ 'Wesleyan43', 'William77', 'Williams40', 'Wisconsin87', 'Yale4']
+files = [(s.replace(" ", "_") + ".mat", s.replace(" ", "_"), None) for s in schools]
+# two file names contain spaces, which must be quoted in the URLs
+archived_urls = {s.replace(" ", "_") + ".mat":
+ f"{upstream_prefix}/{urllib.parse.quote(s)}.mat"
+ for s in schools}
+
+def fetch_upstream(force=False):
+ return fetch_archived_files(__name__.split(".")[-1], archived_urls, force,
+ tries=3)
+
+attrs = ["status", "gender", "major", "second_major", "dorm", "year",
+ "high_school"]
+
+@cache_network()
+@coerce_props()
+@annotate()
+def parse(alts=None):
+ name = __name__.split(".")[-1]
+ for fnames, alt, fmt in files:
+ if alts is not None and alt not in alts:
+ continue
+ with open_upstream_file(name, fnames, "rb", seekable=True) as f:
+ d = scipy.io.loadmat(f)
+ A = scipy.sparse.coo_matrix(d["A"])
+ info = d["local_info"]
+ N = A.shape[0]
+ assert A.shape == (N, N) and info.shape == (N, len(attrs))
+ g = Graph(directed=False)
+ g.add_vertex(N)
+ # the matrix is symmetric, with unit entries: each friendship once
+ idx = A.row < A.col
+ assert (A.row != A.col).all() and idx.sum() * 2 == A.nnz
+ g.add_edge_list(numpy.array([A.row[idx], A.col[idx]]).T)
+ for i, a in enumerate(attrs):
+ g.vp[a] = g.new_vp("int32_t", vals=info[:, i].astype("int32"))
+ yield alt, g