logo Netzschleuder network catalog, repository, and centrifuge

History of german_polisci

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/german_polisci/__init__.py b/entries/german_polisci/__init__.py
index 9e941d2..52f17d5 100644
--- a/entries/german_polisci/__init__.py
+++ b/entries/german_polisci/__init__.py
@@ -40,7 +40,7 @@ tags = ['Social', 'Collaboration', 'Affiliation', 'Unweighted', 'Metadata']
 url = 'https://doi.org/10.7910/DVN/ZBRQU2'
 citation = [('P. Leifeld, S. Wankmüller, V. T. Z. Berger, K. Ingold, C. Steiner, "Collaboration patterns in the German political science co-authorship network." PLOS ONE 12(4), e0174671 (2017)', 'https://doi.org/10.1371/journal.pone.0174671'),
             ('P. Leifeld, "German Political Science Co-Authorship Network." Harvard Dataverse, dataset (2017)', 'https://doi.org/10.7910/DVN/ZBRQU2')]
-icon_hash = '5944ae6c4ed8f1bb6022a49f'
+date_added = '2026-10-25'
 upstream_license = ('Creative Commons CC0 1.0 Universal', 'https://creativecommons.org/publicdomain/zero/1.0/')
 upstream_prefix = 'https://dataverse.harvard.edu/api/access/datafile'
 # leifeldetal.zip
[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/german_polisci/__init__.py b/entries/german_polisci/__init__.py
index 67eb9d1..9e941d2 100644
--- a/entries/german_polisci/__init__.py
+++ b/entries/german_polisci/__init__.py
@@ -24,9 +24,18 @@ description = """A bipartite network of political scientists in Germany and thei
 
 The network has the following properties:
 
-- Nodes: `is_publication`, whether the node is a publication (otherwise a researcher).
-- Researchers: `name`, the name of the researcher; `affiliations`, the list of research organizations of the researcher (some researchers have more than one); `chairs`, the title of the chair or research group of the researcher at each of these affiliations (as listed on their homepage or CV); `status`, "Postdoc" or "Professor"; `gender`, "male" or "female"; `birth_year` and `phd_year`, the year of birth and of the PhD (-1 if missing, which is common).
-- Publications: `pub_id`, the identifier of the publication; `type`, the type of publication ("article", "book chapter", "monograph", "edited volume" or "other"); `year`, the year of publication; `language`, the language code of the publication (e.g. "de", "en"); `reporting_author`, the researcher on whose homepage or CV the publication was found."""
+- (Node) `is_publication`: whether the node is a publication (otherwise a researcher).
+- (Node) `name` (researchers): the name of the researcher.
+- (Node) `affiliations` (researchers): the list of research organizations of the researcher (some researchers have more than one).
+- (Node) `chairs` (researchers): the title of the chair or research group of the researcher at each of these affiliations (as listed on their homepage or CV).
+- (Node) `status` (researchers): "Postdoc" or "Professor".
+- (Node) `gender` (researchers): "male" or "female".
+- (Node) `birth_year`, `phd_year` (researchers): the year of birth and of the PhD (-1 if missing, which is common).
+- (Node) `pub_id` (publications): the identifier of the publication.
+- (Node) `type` (publications): the type of publication ("article", "book chapter", "monograph", "edited volume" or "other").
+- (Node) `year` (publications): the year of publication.
+- (Node) `language` (publications): the language code of the publication (e.g. "de", "en").
+- (Node) `reporting_author` (publications): the researcher on whose homepage or CV the publication was found."""
 tags = ['Social', 'Collaboration', 'Affiliation', 'Unweighted', 'Metadata']
 url = 'https://doi.org/10.7910/DVN/ZBRQU2'
 citation = [('P. Leifeld, S. Wankmüller, V. T. Z. Berger, K. Ingold, C. Steiner, "Collaboration patterns in the German political science co-authorship network." PLOS ONE 12(4), e0174671 (2017)', 'https://doi.org/10.1371/journal.pone.0174671'),
[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/german_polisci/__init__.py b/entries/german_polisci/__init__.py
index ffc08f3..67eb9d1 100644
--- a/entries/german_polisci/__init__.py
+++ b/entries/german_polisci/__init__.py
@@ -52,7 +52,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: german_polisci by Tiago de Paula Peixoto fca351b
diff --git a/entries/german_polisci/__init__.py b/entries/german_polisci/__init__.py
new file mode 100644
index 0000000..ffc08f3
--- /dev/null
+++ b/entries/german_polisci/__init__.py
@@ -0,0 +1,113 @@
+#! /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 = "German political science authors and publications (2009-2013)"
+description = """A bipartite network of political scientists in Germany and their publications, from Leifeld et al. The authors compiled a list of 85 university departments and research institutes hosting political scientists in Germany, and of their researchers holding a doctorate (postdocs and professors), with their affiliation, gender and seniority status. For each researcher, all publications from 2009 to 2013 listed in their CV or homepage (journal articles, book chapters, monographs, edited volumes, and other items such as working papers and book reviews; newspaper articles were excluded) were recorded, including their co-authors. The data collection took place mostly between the fall of 2013 and mid-2014, and was completed at the beginning of 2015. Of the 1,583 researchers covered, 1,339 had a publication list with publications in that period, and are the researchers included in the network. Each publication is connected to the researchers that co-authored it (co-authors that are not among the 1,339 researchers are not included). Although the analysis of the paper is restricted to the years 2009 to 2013 (22,080 publications), the distributed network contains also 2,704 publications from 2014 and 2015, which are kept here, with their year as a node property. In 77 cases the source matrix has a value of 2 instead of 1 for an authorship; these are kept as single edges.
+
+The network has the following properties:
+
+- Nodes: `is_publication`, whether the node is a publication (otherwise a researcher).
+- Researchers: `name`, the name of the researcher; `affiliations`, the list of research organizations of the researcher (some researchers have more than one); `chairs`, the title of the chair or research group of the researcher at each of these affiliations (as listed on their homepage or CV); `status`, "Postdoc" or "Professor"; `gender`, "male" or "female"; `birth_year` and `phd_year`, the year of birth and of the PhD (-1 if missing, which is common).
+- Publications: `pub_id`, the identifier of the publication; `type`, the type of publication ("article", "book chapter", "monograph", "edited volume" or "other"); `year`, the year of publication; `language`, the language code of the publication (e.g. "de", "en"); `reporting_author`, the researcher on whose homepage or CV the publication was found."""
+tags = ['Social', 'Collaboration', 'Affiliation', 'Unweighted', 'Metadata']
+url = 'https://doi.org/10.7910/DVN/ZBRQU2'
+citation = [('P. Leifeld, S. Wankmüller, V. T. Z. Berger, K. Ingold, C. Steiner, "Collaboration patterns in the German political science co-authorship network." PLOS ONE 12(4), e0174671 (2017)', 'https://doi.org/10.1371/journal.pone.0174671'),
+            ('P. Leifeld, "German Political Science Co-Authorship Network." Harvard Dataverse, dataset (2017)', 'https://doi.org/10.7910/DVN/ZBRQU2')]
+icon_hash = '5944ae6c4ed8f1bb6022a49f'
+upstream_license = ('Creative Commons CC0 1.0 Universal', 'https://creativecommons.org/publicdomain/zero/1.0/')
+upstream_prefix = 'https://dataverse.harvard.edu/api/access/datafile'
+# leifeldetal.zip
+files = [(('3006753:zip:input/networkAff-DE.csv',
+           '3006753:zip:input/persons-DE.csv',
+           '3006753:zip:input/publications-DE.csv'), None, None)]
+
+PUB_TYPES = {"Artikel": "article", "Buchkapitel": "book chapter",
+             "Monographie": "monograph", "Sammelband": "edited volume",
+             "Sonstiges": "other"}
+GENDERS = {"männlich": "male", "weiblich": "female"}
+
+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 ExitStack() as stack:
+            fs = [stack.enter_context(open_upstream_file(name, fn, "r")) for fn in fnames]
+            # Semicolon-separated affiliation matrix, with researcher names
+            # in the first column and publication ids in the header
+            lines = fs[0].read().splitlines()
+            # Researchers: one row per affiliation
+            persons = list(csv.DictReader(fs[1], delimiter=";"))
+            pubs = {r["id"]: r for r in csv.DictReader(fs[2], delimiter=";")}
+        pub_ids = lines[0].split(";")[1:]
+        rows = [l.split(";") for l in lines[1:]]
+        names = [r[0] for r in rows]
+        A = numpy.array([r[1:] for r in rows], dtype="int")
+        R = len(names)
+        g = Graph(directed=False)
+        g.add_vertex(R + len(pub_ids))
+        i, j = numpy.nonzero(A)
+        g.add_edge_list(numpy.column_stack((i, R + j)))
+        g.vp.is_publication = g.new_vp("bool")
+        g.vp.is_publication.a[R:] = True
+
+        g.vp.name = g.new_vp("string")
+        g.vp.affiliations = g.new_vp("vector<string>")
+        g.vp.chairs = g.new_vp("vector<string>")
+        g.vp.status = g.new_vp("string")
+        g.vp.gender = g.new_vp("string")
+        g.vp.birth_year = g.new_vp("int")
+        g.vp.phd_year = g.new_vp("int")
+        pinfo = {}
+        for p in persons:
+            pinfo.setdefault(p["name"], []).append(p)
+        for v, n in enumerate(names):
+            ps = pinfo[n]
+            g.vp.name[v] = n
+            g.vp.affiliations[v] = [p["uni"] for p in ps]
+            g.vp.chairs[v] = [p["chair"] for p in ps]
+            g.vp.status[v] = ps[0]["status"]
+            g.vp.gender[v] = GENDERS.get(ps[0]["gender"], ps[0]["gender"])
+            g.vp.birth_year[v] = int(ps[0]["geb"]) or -1
+            g.vp.phd_year[v] = int(ps[0]["phd"]) or -1
+
+        g.vp.pub_id = g.new_vp("string")
+        g.vp.type = g.new_vp("string")
+        g.vp.year = g.new_vp("int")
+        g.vp.language = g.new_vp("string")
+        g.vp.reporting_author = g.new_vp("string")
+        for k, pid in enumerate(pub_ids):
+            v = g.vertex(R + k)
+            p = pubs[pid]
+            g.vp.pub_id[v] = pid
+            g.vp.type[v] = PUB_TYPES.get(p["type"], p["type"])
+            g.vp.year[v] = int(p["year"])
+            g.vp.language[v] = p["language"]
+            g.vp.reporting_author[v] = p["reportingAuthor"]
+        yield alt, g