logo Netzschleuder network catalog, repository, and centrifuge

History of oregon_as

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] New entry: oregon_as by Tiago de Paula Peixoto 3184b4e
diff --git a/entries/oregon_as/__init__.py b/entries/oregon_as/__init__.py
new file mode 100644
index 0000000..a999dc6
--- /dev/null
+++ b/entries/oregon_as/__init__.py
@@ -0,0 +1,62 @@
+#! /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 *
+
+title = "Oregon Route Views AS graphs (2001)"
+description = """Weekly snapshots of the Internet at the level of Autonomous Systems (ASs), between March 31 and May 26 2001, as distributed by SNAP and used by Leskovec, Kleinberg and Faloutsos in their study of the evolution of networks over time. Nodes are ASs, and an undirected edge indicates that two ASs exchange traffic (peering relationship), as inferred from routing data.
+
+- `oregon1_<date>`: 9 graphs inferred from the Border Gateway Protocol (BGP) tables collected by the University of Oregon Route Views project.
+- `oregon2_<date>`: 9 graphs inferred from the Route Views BGP data combined with Looking Glass data and the Internet Routing Registry, which reveal many more peering links.
+
+The dates are given as YYMMDD (from 010331 to 010526). Each AS is identified by its AS number, which is consistent across all graphs. As distributed, each graph contains one edge listed twice.
+
+The networks have the following properties:
+
+- Nodes: `as_number`, the AS number."""
+tags = ['Technological', 'Communication', 'Unweighted', 'Temporal']
+url = ['https://snap.stanford.edu/data/Oregon-1.html',
+       'https://snap.stanford.edu/data/Oregon-2.html']
+citation = [('J. Leskovec, J. Kleinberg, C. Faloutsos, "Graphs over time: densification laws, shrinking diameters and possible explanations." Proceedings of the 11th ACM SIGKDD International Conference on Knowledge Discovery in Data Mining (KDD), 177-187 (2005)', 'https://doi.org/10.1145/1081870.1081893'),
+            ('University of Oregon Route Views Project', 'https://www.routeviews.org/')]
+icon_hash = ['57213dd7461efe0c7a6755e0', '57213f74461efe0c7a6755ea']
+upstream_license = None
+upstream_prefix = 'https://snap.stanford.edu/data'
+dates = ['010331', '010407', '010414', '010421', '010428', '010505', '010512',
+         '010519', '010526']
+files = [(f'oregon{i}_{d}.txt.gz', f'oregon{i}_{d}', 'snap')
+         for i in [1, 2] for d in dates]
+
+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 fname, alt, fmt in files:
+        if alts is not None and alt not in alts:
+            continue
+        with open_upstream_file(name, fname, "r") as f:
+            edges = numpy.loadtxt(f, dtype="int64", comments="#")
+        g = Graph(directed=False)
+        g.vp.as_number = g.add_edge_list(edges, hashed=True)
+        yield alt, g