History of amazon_copurchases
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] Fix parse bugs and improve descriptions and metadata 6bb6851
- parse fixes from the review of the descriptions, e.g. us_patents (directed), celegans_2019 (synapse direction), ecoli_transcription and yeast_transcription (regulator to target), bitcoin (direction, phantom node), ego_social (Google+ features and circles), scotus_majority, arxiv_authors and social_location (as in SNAP), caida_as, dnc, dom, mist, reuters and bibsonomy (names on the right nodes), uci_zoo - every description now states explicitly what the nodes and edges represent; corrected titles, years, tags, citations and licences - the "Hypergraph" tag is removed; very large entries are marked `huge = True` (see --skip-huge) - ICON ids of partial duplicates added (hiv_transmission, congress_bills, openflights, dutch_school)
diff --git a/entries/amazon_copurchases/__init__.py b/entries/amazon_copurchases/__init__.py
index 2760263..b5a37fd 100644
--- a/entries/amazon_copurchases/__init__.py
+++ b/entries/amazon_copurchases/__init__.py
@@ -19,13 +19,24 @@
from .. import *
title = "Amazon co-purchasing network (2003)"
-description = """Network of items for sale on amazon.com in 2003 and the items they \"recommend\" (via the \"Customers Who Bought This Item Also Bought\" feature). If one item is frequently co-purchased with another, then the first item recommends the second.[^icon]
-[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
+description = r"""Networks of products sold on Amazon.com and their co-purchasing relations, collected by J. Leskovec, L. Adamic and B. Huberman by crawling the Amazon website in 2003. The data are based on the "Customers Who Bought This Item Also Bought" feature of the product pages: a directed edge $i \to j$ means that product $j$ is listed on the page of product $i$ as frequently co-purchased with it. Nodes are products (e.g. books, music CDs, DVDs and VHS video tapes).
+
+There are four snapshots, crawled on different dates:
+
+- `302`: March 2, 2003 (at most 5 out-edges per product);
+- `312`: March 12, 2003;
+- `505`: May 5, 2003;
+- `601`: June 1, 2003.
+
+In the last three snapshots each product has at most 10 out-edges. Node identifiers are not consistent across snapshots, and the networks have no node or edge properties."""
tags = ['Economic', 'Commerce', 'Unweighted']
-url = 'http://snap.stanford.edu/data/amazon0302.html'
-citation = [('J. Leskovec, L. Adamic and B. Adamic. "The Dynamics of Viral Marketing." ACM Transactions on the Web (ACM TWEB), 1 (2007)', 'https://doi.org/10.1145/1232722.1232727')]
+url = ['https://snap.stanford.edu/data/amazon0302.html',
+ 'https://snap.stanford.edu/data/amazon0312.html',
+ 'https://snap.stanford.edu/data/amazon0505.html',
+ 'https://snap.stanford.edu/data/amazon0601.html']
+citation = [('J. Leskovec, L. Adamic and B. Huberman. "The Dynamics of Viral Marketing." ACM Transactions on the Web (ACM TWEB), 1 (2007)', 'https://doi.org/10.1145/1232722.1232727')]
icon_hash = '56a85c8e26855e083a2f78bb'
-ustream_license = None
+upstream_license = None
upstream_prefix = 'https://snap.stanford.edu/data'
files = [('amazon0302.txt.gz', '302', 'snap'),
('amazon0312.txt.gz', '312', 'snap'),
Update copyright information 73a4f0d
diff --git a/entries/amazon_copurchases/__init__.py b/entries/amazon_copurchases/__init__.py
index fc26d19..2760263 100644
--- a/entries/amazon_copurchases/__init__.py
+++ b/entries/amazon_copurchases/__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 3d288ea
diff --git a/entries/amazon_copurchases/__init__.py b/entries/amazon_copurchases/__init__.py
index 88a4c01..fc26d19 100644
--- a/entries/amazon_copurchases/__init__.py
+++ b/entries/amazon_copurchases/__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 8d005ae
diff --git a/entries/amazon_copurchases/__init__.py b/entries/amazon_copurchases/__init__.py
index 58b24d7..88a4c01 100644
--- a/entries/amazon_copurchases/__init__.py
+++ b/entries/amazon_copurchases/__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 db2efcc
diff --git a/entries/amazon_copurchases/__init__.py b/entries/amazon_copurchases/__init__.py
index d7d011c..58b24d7 100644
--- a/entries/amazon_copurchases/__init__.py
+++ b/entries/amazon_copurchases/__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
Update citations to use DOIs e878874
diff --git a/entries/amazon_copurchases/__init__.py b/entries/amazon_copurchases/__init__.py
index 440975c..d7d011c 100644
--- a/entries/amazon_copurchases/__init__.py
+++ b/entries/amazon_copurchases/__init__.py
@@ -23,7 +23,7 @@ description = """Network of items for sale on amazon.com in 2003 and the items t
[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
tags = ['Economic', 'Commerce', 'Unweighted']
url = 'http://snap.stanford.edu/data/amazon0302.html'
-citation = [('J. Leskovec, L. Adamic and B. Adamic. "The Dynamics of Viral Marketing." ACM Transactions on the Web (ACM TWEB), 1 (2007)', 'http://www.cs.cmu.edu/~jure/pubs/viral-tweb.pdf')]
+citation = [('J. Leskovec, L. Adamic and B. Adamic. "The Dynamics of Viral Marketing." ACM Transactions on the Web (ACM TWEB), 1 (2007)', 'https://doi.org/10.1145/1232722.1232727')]
icon_hash = '56a85c8e26855e083a2f78bb'
ustream_license = None
upstream_prefix = 'https://snap.stanford.edu/data'
Change license from GPLv3 to AGPLv3 d754be5
diff --git a/entries/amazon_copurchases/__init__.py b/entries/amazon_copurchases/__init__.py
index 911cec5..440975c 100644
--- a/entries/amazon_copurchases/__init__.py
+++ b/entries/amazon_copurchases/__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 1645314
diff --git a/entries/amazon_copurchases/__init__.py b/entries/amazon_copurchases/__init__.py
index c0c421c..911cec5 100644
--- a/entries/amazon_copurchases/__init__.py
+++ b/entries/amazon_copurchases/__init__.py
@@ -19,7 +19,8 @@
from .. import *
title = "Amazon co-purchasing network (2003)"
-description = "Network of items for sale on amazon.com in 2003 and the items they \"recommend\" (via the \"Customers Who Bought This Item Also Bought\" feature). If one item is frequently co-purchased with another, then the first item recommends the second."
+description = """Network of items for sale on amazon.com in 2003 and the items they \"recommend\" (via the \"Customers Who Bought This Item Also Bought\" feature). If one item is frequently co-purchased with another, then the first item recommends the second.[^icon]
+[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
tags = ['Economic', 'Commerce', 'Unweighted']
url = 'http://snap.stanford.edu/data/amazon0302.html'
citation = [('J. Leskovec, L. Adamic and B. Adamic. "The Dynamics of Viral Marketing." ACM Transactions on the Web (ACM TWEB), 1 (2007)', 'http://www.cs.cmu.edu/~jure/pubs/viral-tweb.pdf')]
Initial commit cc85872
diff --git a/entries/amazon_copurchases/__init__.py b/entries/amazon_copurchases/__init__.py
new file mode 100644
index 0000000..c0c421c
--- /dev/null
+++ b/entries/amazon_copurchases/__init__.py
@@ -0,0 +1,52 @@
+#! /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 = "Amazon co-purchasing network (2003)"
+description = "Network of items for sale on amazon.com in 2003 and the items they \"recommend\" (via the \"Customers Who Bought This Item Also Bought\" feature). If one item is frequently co-purchased with another, then the first item recommends the second."
+tags = ['Economic', 'Commerce', 'Unweighted']
+url = 'http://snap.stanford.edu/data/amazon0302.html'
+citation = [('J. Leskovec, L. Adamic and B. Adamic. "The Dynamics of Viral Marketing." ACM Transactions on the Web (ACM TWEB), 1 (2007)', 'http://www.cs.cmu.edu/~jure/pubs/viral-tweb.pdf')]
+icon_hash = '56a85c8e26855e083a2f78bb'
+ustream_license = None
+upstream_prefix = 'https://snap.stanford.edu/data'
+files = [('amazon0302.txt.gz', '302', 'snap'),
+ ('amazon0312.txt.gz', '312', 'snap'),
+ ('amazon0505.txt.gz', '505', 'snap'),
+ ('amazon0601.txt.gz', '601', 'snap')]
+
+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