logo Netzschleuder network catalog, repository, and centrifuge

History of moviegalaxies

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 by Tiago de Paula Peixoto 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/moviegalaxies/__init__.py b/entries/moviegalaxies/__init__.py
index d65f650..53fad1a 100644
--- a/entries/moviegalaxies/__init__.py
+++ b/entries/moviegalaxies/__init__.py
@@ -34,21 +34,7 @@ The networks have the following properties:
 tags = ['Social', 'Fictional', 'Weighted']
 url = 'https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/T4HBA3'
 citation = [('J. Kaminski et al., "Moviegalaxies - Social Networks in Movies." https://doi.org/10.7910/DVN/T4HBA3, Harvard Dataverse, V3 (2018)', 'https://doi.org/10.7910/DVN/T4HBA3')]
-icon_hash = ['5b634d77dfd5c2fc3b07984a',
-             '5b634c40dfd5c2fc3b079810',
-             '5b634c66dfd5c2fc3b079811',
-             '5b634ca2dfd5c2fc3b079812',
-             '5b634cd5dfd5c2fc3b079813',
-             '5b634d00dfd5c2fc3b079814',
-             '5b634d21dfd5c2fc3b079815',
-             '5b634d4adfd5c2fc3b079849',
-             '5b635cb6dfd5c2fc3b0798e4',
-             '5b635cefdfd5c2fc3b0798e5',
-             '5b635d1cdfd5c2fc3b0798e6',
-             '5b635d44dfd5c2fc3b0798e7',
-             '5b64ad7bdfd5c2fc3b07a8be',
-             '5b64ad92dfd5c2fc3b07a8bf',
-             '5b68a4f0dfd5c2fc3b07db7c']
+date_added = '2020-08-11'
 upstream_prefix = 'https://dataverse.harvard.edu/api/access/datafile/:persistentId?persistentId=doi:10.7910/DVN/T4HBA3'
 files = [((f"BIOFH6:zip:gexf/{i}.gexf", "NGCUG9"), f"{i}", "gexf") for i in range(1, 915) if
          i not in set([4, 12, 16, 18, 20, 29, 35, 37, 46, 53, 55, 56, 75, 77,
[entries] Prefix the properties in the descriptions with (Node), (Edge) or (Graph) by Tiago de Paula Peixoto 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/moviegalaxies/__init__.py b/entries/moviegalaxies/__init__.py
index 3c71c2f..d65f650 100644
--- a/entries/moviegalaxies/__init__.py
+++ b/entries/moviegalaxies/__init__.py
@@ -23,13 +23,14 @@ description = """Character networks of 773 films released between 1915 and 2012,
 
 The networks have the following properties:
 
-- `movie_title`, `imdb_id`, `release_date` (year), `slug` (graph properties): the title of the film, its IMDb identifier, its release year, and its identifier on the Moviegalaxies website.
-- `label` (nodes): the name of the character, as written in the script.
-- `vid`: the node ID in the source file.
-- `viz`: the visualization attributes (color, position, size) from the source GEXF file.
-- `movie_id`: the Moviegalaxies ID of the film (for nodes and edges).
-- `weight`: the number of scenes in which the two characters appear together.
-- `label` (edges): the edge ID in the source file."""
+- (Graph) `movie_title`, `imdb_id`, `release_date` (year), `slug`: the title of the film, its IMDb identifier, its release year, and its identifier on the Moviegalaxies website.
+- (Node) `label` (nodes): the name of the character, as written in the script.
+- (Node) `vid`: the node ID in the source file.
+- (Node) `viz`: the visualization attributes (color, position, size) from the source GEXF file.
+- (Node) `movie_id`: the Moviegalaxies ID of the film.
+- (Edge) `weight`: the number of scenes in which the two characters appear together.
+- (Edge) `label` (edges): the edge ID in the source file.
+- (Edge) `movie_id`: the Moviegalaxies ID of the film."""
 tags = ['Social', 'Fictional', 'Weighted']
 url = 'https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/T4HBA3'
 citation = [('J. Kaminski et al., "Moviegalaxies - Social Networks in Movies." https://doi.org/10.7910/DVN/T4HBA3, Harvard Dataverse, V3 (2018)', 'https://doi.org/10.7910/DVN/T4HBA3')]
[entries] Remove unneeded code from the entries by Tiago de Paula Peixoto 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/moviegalaxies/__init__.py b/entries/moviegalaxies/__init__.py
index bf704d5..3c71c2f 100644
--- a/entries/moviegalaxies/__init__.py
+++ b/entries/moviegalaxies/__init__.py
@@ -69,7 +69,6 @@ def fetch_upstream(force=False):
 @coerce_props()
 @annotate()
 def parse(alts=None):
-    global files
     name = __name__.split(".")[-1]
     gprops = None
     for fnames, alt, fmt in files:
[entries] Fix parse bugs and improve the metadata of existing entries by Tiago de Paula Peixoto c996a0e
From a review of the dataset descriptions against the upstream sources
and papers, and from user reports:

- parse fixes (wrong edge direction or directedness, shifted or
  misnamed properties, merged node identities, duplicated or missing
  edges and nodes, wrong types), e.g. arxiv_citation (the HepTh dates
  were a copy of the HepPh ones; now from the KDD Cup 2003 data),
  eu_procurements, foursquare_global, hiv_transmission, genetic_multiplex,
  gnutella (adds the 05 snapshot), roadnet, macaque_neural, python_dependency
- descriptions rewritten from the upstream sources, documenting every
  property
- corrected titles, citations and DOIs, licences (ustream_license typo,
  the data's own terms), tags and ICON ids
- url lists for entries with several sources or dataset pages
- SocioPatterns entries moved to the site's new data location, with the
  daily networks of sp_infectious and sp_primary_school
- the Michael Fire entries marked as orphans (served from the mirror)
- redundant type forcings removed after the graph-tool coercion fixes
diff --git a/entries/moviegalaxies/__init__.py b/entries/moviegalaxies/__init__.py
index 373f3dc..bf704d5 100644
--- a/entries/moviegalaxies/__init__.py
+++ b/entries/moviegalaxies/__init__.py
@@ -18,13 +18,36 @@
 
 from .. import *
 
-title = "Moviegalaxies, movies 410-466 (2018)"
-description = """Social graphs for over 700 movies from the moviegalaxies.com website. Each node represents a character in a movie and each edge is a same-scene appearance between two characters in that movie. The weight gives the number of same-scene appearances. Networks are extracted from movie scripts automatically.[^icon]
-[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
+title = "Moviegalaxies movie character networks (2018)"
+description = """Character networks of 773 films released between 1915 and 2012, from the Moviegalaxies website, created by J. Kaminski, M. Schober, R. Albaladejo, O. Zastupailo and C. Hidalgo. The networks were extracted automatically from the movie scripts with a script parser: nodes are characters of a film (as named in the script), and two characters are connected if they appear in the same scene, with a weight equal to the number of scenes in which they appear together. Each film is a separate network, identified by its Moviegalaxies ID.
+
+The networks have the following properties:
+
+- `movie_title`, `imdb_id`, `release_date` (year), `slug` (graph properties): the title of the film, its IMDb identifier, its release year, and its identifier on the Moviegalaxies website.
+- `label` (nodes): the name of the character, as written in the script.
+- `vid`: the node ID in the source file.
+- `viz`: the visualization attributes (color, position, size) from the source GEXF file.
+- `movie_id`: the Moviegalaxies ID of the film (for nodes and edges).
+- `weight`: the number of scenes in which the two characters appear together.
+- `label` (edges): the edge ID in the source file."""
 tags = ['Social', 'Fictional', 'Weighted']
 url = 'https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/T4HBA3'
 citation = [('J. Kaminski et al., "Moviegalaxies - Social Networks in Movies." https://doi.org/10.7910/DVN/T4HBA3, Harvard Dataverse, V3 (2018)', 'https://doi.org/10.7910/DVN/T4HBA3')]
-icon_hash = '5b634d77dfd5c2fc3b07984a'
+icon_hash = ['5b634d77dfd5c2fc3b07984a',
+             '5b634c40dfd5c2fc3b079810',
+             '5b634c66dfd5c2fc3b079811',
+             '5b634ca2dfd5c2fc3b079812',
+             '5b634cd5dfd5c2fc3b079813',
+             '5b634d00dfd5c2fc3b079814',
+             '5b634d21dfd5c2fc3b079815',
+             '5b634d4adfd5c2fc3b079849',
+             '5b635cb6dfd5c2fc3b0798e4',
+             '5b635cefdfd5c2fc3b0798e5',
+             '5b635d1cdfd5c2fc3b0798e6',
+             '5b635d44dfd5c2fc3b0798e7',
+             '5b64ad7bdfd5c2fc3b07a8be',
+             '5b64ad92dfd5c2fc3b07a8bf',
+             '5b68a4f0dfd5c2fc3b07db7c']
 upstream_prefix = 'https://dataverse.harvard.edu/api/access/datafile/:persistentId?persistentId=doi:10.7910/DVN/T4HBA3'
 files = [((f"BIOFH6:zip:gexf/{i}.gexf", "NGCUG9"), f"{i}", "gexf") for i in range(1, 915) if
          i not in set([4, 12, 16, 18, 20, 29, 35, 37, 46, 53, 55, 56, 75, 77,
Update copyright information by Tiago de Paula Peixoto 73a4f0d
diff --git a/entries/moviegalaxies/__init__.py b/entries/moviegalaxies/__init__.py
index ee3bfbf..373f3dc 100644
--- a/entries/moviegalaxies/__init__.py
+++ b/entries/moviegalaxies/__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 by Tiago de Paula Peixoto 3d288ea
diff --git a/entries/moviegalaxies/__init__.py b/entries/moviegalaxies/__init__.py
index b916ab3..ee3bfbf 100644
--- a/entries/moviegalaxies/__init__.py
+++ b/entries/moviegalaxies/__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 by Tiago de Paula Peixoto 8d005ae
diff --git a/entries/moviegalaxies/__init__.py b/entries/moviegalaxies/__init__.py
index 90c6f71..b916ab3 100644
--- a/entries/moviegalaxies/__init__.py
+++ b/entries/moviegalaxies/__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 by Tiago de Paula Peixoto db2efcc
diff --git a/entries/moviegalaxies/__init__.py b/entries/moviegalaxies/__init__.py
index f2ceaf9..90c6f71 100644
--- a/entries/moviegalaxies/__init__.py
+++ b/entries/moviegalaxies/__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
Change license from GPLv3 to AGPLv3 by Tiago de Paula Peixoto d754be5
diff --git a/entries/moviegalaxies/__init__.py b/entries/moviegalaxies/__init__.py
index 68ae15a..f2ceaf9 100644
--- a/entries/moviegalaxies/__init__.py
+++ b/entries/moviegalaxies/__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 by Tiago de Paula Peixoto 1645314
diff --git a/entries/moviegalaxies/__init__.py b/entries/moviegalaxies/__init__.py
index a5f5f51..68ae15a 100644
--- a/entries/moviegalaxies/__init__.py
+++ b/entries/moviegalaxies/__init__.py
@@ -19,7 +19,8 @@
 from .. import *
 
 title = "Moviegalaxies, movies 410-466 (2018)"
-description = "Social graphs for over 700 movies from the moviegalaxies.com website. Each node represents a character in a movie and each edge is a same-scene appearance between two characters in that movie. The weight gives the number of same-scene appearances. Networks are extracted from movie scripts automatically."
+description = """Social graphs for over 700 movies from the moviegalaxies.com website. Each node represents a character in a movie and each edge is a same-scene appearance between two characters in that movie. The weight gives the number of same-scene appearances. Networks are extracted from movie scripts automatically.[^icon]
+[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
 tags = ['Social', 'Fictional', 'Weighted']
 url = 'https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/T4HBA3'
 citation = [('J. Kaminski et al., "Moviegalaxies - Social Networks in Movies." https://doi.org/10.7910/DVN/T4HBA3, Harvard Dataverse, V3 (2018)', 'https://doi.org/10.7910/DVN/T4HBA3')]
Initial commit by Tiago de Paula Peixoto cc85872
diff --git a/entries/moviegalaxies/__init__.py b/entries/moviegalaxies/__init__.py
new file mode 100644
index 0000000..a5f5f51
--- /dev/null
+++ b/entries/moviegalaxies/__init__.py
@@ -0,0 +1,81 @@
+#! /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 = "Moviegalaxies, movies 410-466 (2018)"
+description = "Social graphs for over 700 movies from the moviegalaxies.com website. Each node represents a character in a movie and each edge is a same-scene appearance between two characters in that movie. The weight gives the number of same-scene appearances. Networks are extracted from movie scripts automatically."
+tags = ['Social', 'Fictional', 'Weighted']
+url = 'https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/T4HBA3'
+citation = [('J. Kaminski et al., "Moviegalaxies - Social Networks in Movies." https://doi.org/10.7910/DVN/T4HBA3, Harvard Dataverse, V3 (2018)', 'https://doi.org/10.7910/DVN/T4HBA3')]
+icon_hash = '5b634d77dfd5c2fc3b07984a'
+upstream_prefix = 'https://dataverse.harvard.edu/api/access/datafile/:persistentId?persistentId=doi:10.7910/DVN/T4HBA3'
+files = [((f"BIOFH6:zip:gexf/{i}.gexf", "NGCUG9"), f"{i}", "gexf") for i in range(1, 915) if
+         i not in set([4, 12, 16, 18, 20, 29, 35, 37, 46, 53, 55, 56, 75, 77,
+                       78, 79, 90, 94, 95, 96, 105, 121, 140, 156, 160, 168, 172, 181, 188,
+                       196, 202, 203, 207, 215, 219, 228, 230, 233, 237, 245, 259, 267, 270,
+                       275, 277, 284, 285, 312, 342, 345, 353, 360, 365, 367, 380, 381, 382,
+                       390, 392, 425, 428, 431, 440, 441, 448, 463, 473, 479, 480, 492, 493,
+                       502, 504, 514, 522, 540, 546, 554, 557, 561, 563, 568, 574, 576, 585,
+                       588, 589, 590, 596, 597, 598, 604, 612, 613, 614, 617, 626, 627, 639,
+                       646, 654, 663, 674, 676, 680, 681, 684, 690, 702, 709, 711, 722, 726,
+                       736, 752, 759, 763, 776, 778, 789, 795, 796, 807, 813, 823, 838, 842,
+                       845, 856, 864, 866, 868, 882, 886, 890, 894, 897, 898, 900, 903, 909])]
+
+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]
+    gprops = None
+    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[0]], fmt, directed=False)
+            g.gp.clear()
+            p = g.vp["_graphml_vertex_id"]
+            del g.vp["_graphml_vertex_id"]
+            g.vp.vid = p
+            del g.ep["_graphml_edge_id"]
+
+            for p in ["Betweenness Centrality", "Closeness Centrality",
+                      "Component ID", "Eccentricity", "Modularity Class",
+                      "Degree"]:
+                del g.vp[p]
+
+            if gprops is None:
+                gprops = {}
+                lines = fs[1].read().decode("utf8").splitlines()
+                for line in lines[1:]:
+                    vals = line.split("\t")
+                    gprops[int(vals[0])] = vals[1:5]
+            g.gp.movie_title = g.new_gp("string", gprops[int(alt)][0])
+            g.gp.imdb_id = g.new_gp("string", gprops[int(alt)][1])
+            g.gp.release_date = g.new_gp("string", gprops[int(alt)][2])
+            g.gp.slug = g.new_gp("string", gprops[int(alt)][3])
+
+        yield alt, g