History of vivino
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/vivino/__init__.py b/entries/vivino/__init__.py
index 00bdc3d..f0815da 100644
--- a/entries/vivino/__init__.py
+++ b/entries/vivino/__init__.py
@@ -35,7 +35,7 @@ The network has the following properties:
tags = ['Social', 'Online', 'Unweighted', 'Metadata']
url = 'https://arxiv.org/abs/1804.10982'
citation = [('N. Kotonya, P. De Cristofaro, E. De Cristofaro, "Of Wines and Reviews: Measuring and Modeling the Vivino Wine Social Network." Proceedings of the 2018 IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining (ASONAM), 387-392 (2018)', 'https://doi.org/10.1109/ASONAM.2018.8508776')]
-icon_hash = '5fc03091f99959057f5f908e'
+date_added = '2026-10-25'
upstream_license = None
upstream_prefix = 'https://emilianodc.com/datasets'
files = [('user_taste_profiles.jsonl.7z:user_taste_profiles.jsonl', None, None)]
[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/vivino/__init__.py b/entries/vivino/__init__.py
index 23f8ac9..00bdc3d 100644
--- a/entries/vivino/__init__.py
+++ b/entries/vivino/__init__.py
@@ -26,7 +26,12 @@ description = """A network of users of Vivino, an online social network and mark
The network has the following properties:
-- Nodes: `user_id`, the anonymized identifier of the user; `has_profile`, whether the profile of the user is included in the data (all remaining properties are empty or zero otherwise); `country`, the country of the user; `followers` and `following`, the number of followers of the user and of users followed by the user; `ratings`, the total number of wine ratings by the user; `taste_styles`, `taste_regions`, `taste_ratings` and `taste_counts`, the taste profile of the user, i.e. the list of regional wine styles rated by the user (e.g. "/wine-styles/spanish-grenache"), with their wine regions, the average rating given by the user (from 1 to 5) and the number of ratings, in the order given by Vivino."""
+- (Node) `user_id`: the anonymized identifier of the user.
+- (Node) `has_profile`: whether the profile of the user is included in the data (all remaining properties are empty or zero otherwise).
+- (Node) `country`: the country of the user.
+- (Node) `followers` and `following`: the number of followers of the user and of users followed by the user.
+- (Node) `ratings`: the total number of wine ratings by the user.
+- (Node) `taste_styles`, `taste_regions`, `taste_ratings` and `taste_counts`: the taste profile of the user, i.e. the list of regional wine styles rated by the user (e.g. "/wine-styles/spanish-grenache"), with their wine regions, the average rating given by the user (from 1 to 5) and the number of ratings, in the order given by Vivino."""
tags = ['Social', 'Online', 'Unweighted', 'Metadata']
url = 'https://arxiv.org/abs/1804.10982'
citation = [('N. Kotonya, P. De Cristofaro, E. De Cristofaro, "Of Wines and Reviews: Measuring and Modeling the Vivino Wine Social Network." Proceedings of the 2018 IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining (ASONAM), 387-392 (2018)', 'https://doi.org/10.1109/ASONAM.2018.8508776')]
[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/vivino/__init__.py b/entries/vivino/__init__.py
index f2373df..23f8ac9 100644
--- a/entries/vivino/__init__.py
+++ b/entries/vivino/__init__.py
@@ -43,7 +43,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] New entry: vivino 9ce64eb
diff --git a/entries/vivino/__init__.py b/entries/vivino/__init__.py
new file mode 100644
index 0000000..f2373df
--- /dev/null
+++ b/entries/vivino/__init__.py
@@ -0,0 +1,96 @@
+#! /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 ast
+import json
+
+title = "Vivino wine social network users (2017)"
+description = """A network of users of Vivino, an online social network and marketplace for wine enthusiasts, where users rate and review wines and follow each other, from Kotonya et al. The data were collected by crawling the Vivino website from November 2016 to March 2017, targeting the 10,000 most active users (according to Vivino's per-country user ranking) of each of the 15 countries with the highest wine consumption (Argentina, Australia, Brazil, Canada, China, France, Germany, Italy, Portugal, Romania, Russia, South Africa, Spain, United Kingdom and United States). The distributed data contain the profiles of 129,351 users, with anonymized user identifiers. Each profile lists between 1 and 20 other users in a field named "top_in_network", which defines the edges of the network: a directed edge goes from a profiled user to each user listed in this field. The meaning of this field is not documented in the source data or the paper; ICON describes it as the social connections of the user to other users active in the 365 days prior to the crawl. The edges are not reciprocated, and most listed users (410,652) do not have a profile in the data; these are included as nodes without metadata.
+
+The network has the following properties:
+
+- Nodes: `user_id`, the anonymized identifier of the user; `has_profile`, whether the profile of the user is included in the data (all remaining properties are empty or zero otherwise); `country`, the country of the user; `followers` and `following`, the number of followers of the user and of users followed by the user; `ratings`, the total number of wine ratings by the user; `taste_styles`, `taste_regions`, `taste_ratings` and `taste_counts`, the taste profile of the user, i.e. the list of regional wine styles rated by the user (e.g. "/wine-styles/spanish-grenache"), with their wine regions, the average rating given by the user (from 1 to 5) and the number of ratings, in the order given by Vivino."""
+tags = ['Social', 'Online', 'Unweighted', 'Metadata']
+url = 'https://arxiv.org/abs/1804.10982'
+citation = [('N. Kotonya, P. De Cristofaro, E. De Cristofaro, "Of Wines and Reviews: Measuring and Modeling the Vivino Wine Social Network." Proceedings of the 2018 IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining (ASONAM), 387-392 (2018)', 'https://doi.org/10.1109/ASONAM.2018.8508776')]
+icon_hash = '5fc03091f99959057f5f908e'
+upstream_license = None
+upstream_prefix = 'https://emilianodc.com/datasets'
+files = [('user_taste_profiles.jsonl.7z:user_taste_profiles.jsonl', None, None)]
+
+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
+ with open_upstream_file(name, fnames, "r") as f:
+ lines = f.readlines()
+
+ g = Graph(directed=True)
+ g.vp.user_id = g.new_vp("string")
+ g.vp.has_profile = g.new_vp("bool")
+ g.vp.country = g.new_vp("string")
+ g.vp.followers = g.new_vp("int")
+ g.vp.following = g.new_vp("int")
+ g.vp.ratings = g.new_vp("int")
+ g.vp.taste_styles = g.new_vp("vector<string>")
+ g.vp.taste_regions = g.new_vp("vector<string>")
+ g.vp.taste_ratings = g.new_vp("vector<double>")
+ g.vp.taste_counts = g.new_vp("vector<int>")
+ vs = {}
+ def get_v(uid):
+ v = vs.get(uid)
+ if v is None:
+ v = vs[uid] = g.add_vertex()
+ g.vp.user_id[v] = uid
+ return v
+ edges = []
+ for line in lines:
+ if not line.strip():
+ continue
+ r = json.loads(line)
+ v = get_v(r["id"])
+ g.vp.has_profile[v] = True
+ g.vp.country[v] = r["country"]
+ g.vp.followers[v] = r["number_followers"]
+ g.vp.following[v] = r["number_following"]
+ g.vp.ratings[v] = r["ratings"]
+ # Taste profile, formatted as "[1: {...}, 2: {...}, ...]"
+ tp = r["taste_profile"].strip()
+ tp = ast.literal_eval("{" + tp[1:-1] + "}") if len(tp) > 2 else {}
+ tp = [tp[k] for k in sorted(tp)]
+ g.vp.taste_styles[v] = [t["regional_style"] for t in tp]
+ g.vp.taste_regions[v] = [t["wine_region"] for t in tp]
+ g.vp.taste_ratings[v] = [float(t["average_rating"]) for t in tp]
+ g.vp.taste_counts[v] = [int(t["number_ratings"]) for t in tp]
+ # Comma-separated list of user ids
+ for u in r["top_in_network"].split(","):
+ if u.strip():
+ edges.append((int(v), int(get_v(u.strip()))))
+ g.add_edge_list(edges)
+ yield alt, g