History of frozen
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/frozen/__init__.py b/entries/frozen/__init__.py
index 3c380df..0d5686c 100644
--- a/entries/frozen/__init__.py
+++ b/entries/frozen/__init__.py
@@ -30,7 +30,7 @@ The edges have the property `weight`, the number of lines said between the two c
tags = ['Social', 'Fictional', 'Weighted']
url = 'https://petterhol.me/2019/07/19/frozen-weighted-network/'
citation = [('P. Holme, M. A. Porter, H. Sayama, "Who is the most important character in Frozen? What networks can tell us about the world." Frontiers for Young Minds 7, 99 (2019)', 'https://doi.org/10.3389/frym.2019.00099')]
-icon_hash = '5d366ad7f7b45cae74308c16'
+date_added = '2026-10-25'
upstream_license = None
# The edge list is given in the text of the blog post
upstream_prefix = 'https://petterhol.me/2019/07/19'
[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/frozen/__init__.py b/entries/frozen/__init__.py
index 77a3ec2..3c380df 100644
--- a/entries/frozen/__init__.py
+++ b/entries/frozen/__init__.py
@@ -44,7 +44,6 @@ def fetch_upstream(force=False):
@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:
[entries] New entry: frozen a9f14da
diff --git a/entries/frozen/__init__.py b/entries/frozen/__init__.py
new file mode 100644
index 0000000..77a3ec2
--- /dev/null
+++ b/entries/frozen/__init__.py
@@ -0,0 +1,65 @@
+#! /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 html
+import re
+
+title = "Frozen character interactions (2013)"
+description = """Weighted network of the dialogue between the characters of the Disney animated film "Frozen" (2013), compiled by P. Holme for an article with M. A. Porter and H. Sayama on network centrality for young readers. Nodes are characters (including groups such as "Crowd" or "Trolls"), and an undirected edge connects two characters if one speaks to the other, weighted by the number of lines they say to each other. The network was built from a transcript of the film listing who speaks each line, by watching the film and noting to whom each line is said (and correcting the transcript where necessary). The figure in the article shows a subnetwork without the edges of weight one.
+
+The edges have the property `weight`, the number of lines said between the two characters.[^icon]
+
+[^icon]: Description obtained in part from the [ICON](https://icon.colorado.edu) project."""
+tags = ['Social', 'Fictional', 'Weighted']
+url = 'https://petterhol.me/2019/07/19/frozen-weighted-network/'
+citation = [('P. Holme, M. A. Porter, H. Sayama, "Who is the most important character in Frozen? What networks can tell us about the world." Frontiers for Young Minds 7, 99 (2019)', 'https://doi.org/10.3389/frym.2019.00099')]
+icon_hash = '5d366ad7f7b45cae74308c16'
+upstream_license = None
+# The edge list is given in the text of the blog post
+upstream_prefix = 'https://petterhol.me/2019/07/19'
+files = [('frozen.html', None, None)]
+archived_urls = {'frozen.html': f'{upstream_prefix}/frozen-weighted-network/'}
+
+def fetch_upstream(force=False):
+ return fetch_archived_files(__name__.split(".")[-1], archived_urls, 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:
+ text = f.read()
+ block = re.search(r"<pre[^>]*>(.*?)</pre>", text, re.S).group(1)
+ edges = []
+ for line in html.unescape(block).splitlines():
+ if not line.strip():
+ continue
+ a, b, w = line.split()
+ edges.append((a, b, int(w)))
+ g = Graph(directed=False)
+ g.ep.weight = g.new_ep("int")
+ g.vp.name = g.add_edge_list(edges, hashed=True, hash_type="string",
+ eprops=[g.ep.weight])
+ yield alt, g