logo Netzschleuder network catalog, repository, and centrifuge

History of email_company

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/email_company/__init__.py b/entries/email_company/__init__.py
index 27fc173..80669c1 100644
--- a/entries/email_company/__init__.py
+++ b/entries/email_company/__init__.py
@@ -41,7 +41,7 @@ url = 'https://doi.org/10.7910/DVN/6Z3CGX'
 citation = [('R. Michalski, S. Palus, P. Kazienko, "Matching organizational structure and social network extracted from email communication." Business Information Systems, Lecture Notes in Business Information Processing 87, 197-206 (2011)', 'https://doi.org/10.1007/978-3-642-21863-7_17'),
             ('M. Nurek, R. Michalski, "Combining Machine Learning and Social Network Analysis to Reveal the Organizational Structures." Applied Sciences 10(5), 1699 (2020)', 'https://doi.org/10.3390/app10051699'),
             ('R. Michalski, "Manufacturing company email metadata and corporate hierarchy." Harvard Dataverse, dataset (2020)', 'https://doi.org/10.7910/DVN/6Z3CGX')]
-icon_hash = '575758dfbd3e93b53c69557d'
+date_added = '2020-08-11'
 upstream_license = ('Creative Commons CC0 1.0 Universal', 'https://creativecommons.org/publicdomain/zero/1.0/')
 upstream_prefix = 'https://dataverse.harvard.edu/api/access/datafile'
 files = [(('communication.csv', 'reportsto.csv'), None, None)]
[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/email_company/__init__.py b/entries/email_company/__init__.py
index 70132a6..27fc173 100644
--- a/entries/email_company/__init__.py
+++ b/entries/email_company/__init__.py
@@ -31,8 +31,11 @@ The reporting hierarchy gives, for each employee, the employee they report to (t
 
 The network has the following properties:
 
-- Nodes: `id`, the identifier of the account in the data (1 to 167); `reports_to`, the identifier of the account of the employee's supervisor (-1 for technical accounts and accounts of former employees); `is_technical`, whether the account is a technical email account not used by employees; `is_former_employee`, whether the account is that of a former employee.
-- Edges: `time`, the time of the email (Unix time, from the local time taken as Europe/Warsaw time)."""
+- (Node) `id`: the identifier of the account in the data (1 to 167).
+- (Node) `reports_to`: the identifier of the account of the employee's supervisor (-1 for technical accounts and accounts of former employees).
+- (Node) `is_technical`: whether the account is a technical email account not used by employees.
+- (Node) `is_former_employee`: whether the account is that of a former employee.
+- (Edge) `time`: the time of the email (Unix time, from the local time taken as Europe/Warsaw time)."""
 tags = ['Social', 'Communication', 'Unweighted', 'Multigraph', 'Timestamps', 'Metadata']
 url = 'https://doi.org/10.7910/DVN/6Z3CGX'
 citation = [('R. Michalski, S. Palus, P. Kazienko, "Matching organizational structure and social network extracted from email communication." Business Information Systems, Lecture Notes in Business Information Processing 87, 197-206 (2011)', 'https://doi.org/10.1007/978-3-642-21863-7_17'),
[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/email_company/__init__.py b/entries/email_company/__init__.py
index 7bda6e1..70132a6 100644
--- a/entries/email_company/__init__.py
+++ b/entries/email_company/__init__.py
@@ -59,7 +59,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] Move contact, convote_mentions, douban, email_company, epinions, flixster, football_league_results, hyves, lastfm, libimseti, livemocha, reuters, sa_companies, sister_cities, tripadvisor_ratings, wikilens_ratings and wikipedia_discussions_de to their original sources by Tiago de Paula Peixoto 8f097de
These entries downloaded KONECT's copies of the data. They now download
the original data (live, from pinned Wayback Machine snapshots, or by
re-extracting from public dumps), gaining the metadata KONECT dropped
(names, identifiers, timestamps, attributes), with descriptions and
citations rewritten from the original sources and factual errors fixed
(years and periods of contact, email_company, douban, flixster,
libimseti, sa_companies; the rated objects of epinions; the sign of
convote_mentions; songs merged by title alone in lastfm).

New networks: the trust network of epinions, the links of
wikilens_ratings, the JSON crawl of tripadvisor_ratings, and current
versions of sister_cities and wikipedia_discussions_de next to the ones
KONECT used. asu_social_networks only loses its mention of KONECT.

Changed: upstream contact convote_mentions douban email_company epinions flixster football_league_results hyves lastfm libimseti livemocha reuters sa_companies sister_cities tripadvisor_ratings wikilens_ratings wikipedia_discussions_de
diff --git a/entries/email_company/__init__.py b/entries/email_company/__init__.py
index 4c27cb3..7bda6e1 100644
--- a/entries/email_company/__init__.py
+++ b/entries/email_company/__init__.py
@@ -18,19 +18,42 @@
 
 from .. import *
 
+import datetime
+import zoneinfo
+
+# The time zone of the local times of the data (not given, taken as Poland's)
+WARSAW = zoneinfo.ZoneInfo("Europe/Warsaw")
+
 title = "Manufacturing company email (2010)"
-description = """A network of emails among employee email addresses at a mid-sized manufacturing company. Each directed edge represents an email sent from address i to address j. Edges are timestamped, and occurred over a 6 month period in an unspecified year.[^icon]
-[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
-tags = ['Social', 'Communication', 'Unweighted', 'Multigraph', 'Timestamps']
-url = 'http://konect.cc/networks/radoslaw_email'
-citation = [('R. Michalski, S. Palus, and P. Kazienko, "Matching organizational structure and social network extracted from email communication." In Lecture Notes in Business Information Processing 87, 197-206 (2011)', 'https://doi.org/10.1007/978-3-642-21863-7_17')]
+description = """A network of the internal email communication among the employees of a mid-sized manufacturing company, over the first nine months of 2010 (from 1 January to 30 September; the first email is of 2 January), with the company's reporting hierarchy, collected by Radosław Michalski and colleagues. Each node is an email account of the company (167 in total), and a directed edge from account A to account B is an email sent by A with B among its recipients, so that an email to several recipients appears as several edges (recipients in To, CC and BCC are not distinguished), and pairs of accounts are connected by several edges (a multigraph). Some emails were sent by an account to itself (51 self-loops). The data give the time of each email in local time, to the second; the time zone is not given, and the times are taken here as local times of Poland (Europe/Warsaw, with daylight saving time), the country of the authors' university (the company's location is not stated). The content of the emails is not included in the data.
+
+The reporting hierarchy gives, for each employee, the employee they report to (their supervisor), without job titles or positions; node 86 is the chief executive officer, who reports to themself. Seven accounts are technical email accounts, not used by employees, and six are accounts of former employees, for which the hierarchy has no supervisor.
+
+The network has the following properties:
+
+- Nodes: `id`, the identifier of the account in the data (1 to 167); `reports_to`, the identifier of the account of the employee's supervisor (-1 for technical accounts and accounts of former employees); `is_technical`, whether the account is a technical email account not used by employees; `is_former_employee`, whether the account is that of a former employee.
+- Edges: `time`, the time of the email (Unix time, from the local time taken as Europe/Warsaw time)."""
+tags = ['Social', 'Communication', 'Unweighted', 'Multigraph', 'Timestamps', 'Metadata']
+url = 'https://doi.org/10.7910/DVN/6Z3CGX'
+citation = [('R. Michalski, S. Palus, P. Kazienko, "Matching organizational structure and social network extracted from email communication." Business Information Systems, Lecture Notes in Business Information Processing 87, 197-206 (2011)', 'https://doi.org/10.1007/978-3-642-21863-7_17'),
+            ('M. Nurek, R. Michalski, "Combining Machine Learning and Social Network Analysis to Reveal the Organizational Structures." Applied Sciences 10(5), 1699 (2020)', 'https://doi.org/10.3390/app10051699'),
+            ('R. Michalski, "Manufacturing company email metadata and corporate hierarchy." Harvard Dataverse, dataset (2020)', 'https://doi.org/10.7910/DVN/6Z3CGX')]
 icon_hash = '575758dfbd3e93b53c69557d'
-upstream_prefix = 'http://konect.cc/files'
-files = [('download.tsv.radoslaw_email.tar.bz2', None, 'konect')]
+upstream_license = ('Creative Commons CC0 1.0 Universal', 'https://creativecommons.org/publicdomain/zero/1.0/')
+upstream_prefix = 'https://dataverse.harvard.edu/api/access/datafile'
+files = [(('communication.csv', 'reportsto.csv'), None, None)]
+# The files as deposited (the ingested tabular versions that Dataverse
+# serves by default quote every line)
+archived_urls = {
+    'communication.csv': f'{upstream_prefix}/3655318?format=original',
+    'reportsto.csv': f'{upstream_prefix}/3655319?format=original'}
+
+# Limit of rows of the communication to read, for quick checks
+_check_rows = None
 
 def fetch_upstream(force=False):
-    return fetch_upstream_files(__name__.split(".")[-1], upstream_prefix, files,
-                                force)
+    return fetch_archived_files(__name__.split(".")[-1], archived_urls, force,
+                                tries=3)
 
 @cache_network()
 @coerce_props()
@@ -41,9 +64,38 @@ def parse(alts=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, fmt, directed=True)
+        with open_upstream_file(name, fnames[1], "r") as f:
+            rows = [l.strip().split(";") for l in f if l.strip()]
+        assert rows[0] == ["ID", "ReportsToID"]
+        sup = {int(i): r for i, r in rows[1:]}
+        N = max(sup)
+        assert sorted(sup) == list(range(1, N + 1))
+        g = Graph(directed=True)
+        g.add_vertex(N)
+        g.vp.id = g.new_vp("int", vals=range(1, N + 1))
+        g.vp.reports_to = g.new_vp("int", val=-1)
+        g.vp.is_technical = g.new_vp("bool")
+        g.vp.is_former_employee = g.new_vp("bool")
+        for i, r in sup.items():
+            v = g.vertex(i - 1)
+            if r.isdigit():
+                g.vp.reports_to[v] = int(r)
+            elif r == "technical email account - not used by employees":
+                g.vp.is_technical[v] = True
+            elif r == "former employee account":
+                g.vp.is_former_employee[v] = True
+            else:
+                raise ValueError(f"unknown supervisor: {r}")
+        edges = []
+        with open_upstream_file(name, fnames[0], "r") as f:
+            reader = csv.reader(f, delimiter=";")
+            assert next(reader) == ["Sender", "Recipient", "EventDate"]
+            for n, (s, t, d) in enumerate(reader):
+                if _check_rows is not None and n >= _check_rows:
+                    break
+                d = datetime.datetime.strptime(d, "%Y-%m-%d %H:%M:%S")
+                d = d.replace(tzinfo=WARSAW)
+                edges.append((int(s) - 1, int(t) - 1, int(d.timestamp())))
+        g.ep.time = g.new_ep("int64_t")
+        g.add_edge_list(edges, eprops=[g.ep.time])
         yield alt, g
Update copyright information by Tiago de Paula Peixoto 73a4f0d
diff --git a/entries/email_company/__init__.py b/entries/email_company/__init__.py
index 7cc0e16..4c27cb3 100644
--- a/entries/email_company/__init__.py
+++ b/entries/email_company/__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/email_company/__init__.py b/entries/email_company/__init__.py
index 63a0bed..7cc0e16 100644
--- a/entries/email_company/__init__.py
+++ b/entries/email_company/__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/email_company/__init__.py b/entries/email_company/__init__.py
index 633e5eb..63a0bed 100644
--- a/entries/email_company/__init__.py
+++ b/entries/email_company/__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/email_company/__init__.py b/entries/email_company/__init__.py
index 71bf13d..633e5eb 100644
--- a/entries/email_company/__init__.py
+++ b/entries/email_company/__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
Un-orphan KONECT datasets by Tiago de Paula Peixoto 894eba5
KONECT has been brought back from the dead for the time being.
diff --git a/entries/email_company/__init__.py b/entries/email_company/__init__.py
index 2a31d51..71bf13d 100644
--- a/entries/email_company/__init__.py
+++ b/entries/email_company/__init__.py
@@ -26,7 +26,6 @@ url = 'http://konect.cc/networks/radoslaw_email'
 citation = [('R. Michalski, S. Palus, and P. Kazienko, "Matching organizational structure and social network extracted from email communication." In Lecture Notes in Business Information Processing 87, 197-206 (2011)', 'https://doi.org/10.1007/978-3-642-21863-7_17')]
 icon_hash = '575758dfbd3e93b53c69557d'
 upstream_prefix = 'http://konect.cc/files'
-orphan = True
 files = [('download.tsv.radoslaw_email.tar.bz2', None, 'konect')]
 
 def fetch_upstream(force=False):
Update citations to use DOIs by Tiago de Paula Peixoto e878874
diff --git a/entries/email_company/__init__.py b/entries/email_company/__init__.py
index dd5c3a3..2a31d51 100644
--- a/entries/email_company/__init__.py
+++ b/entries/email_company/__init__.py
@@ -23,7 +23,7 @@ description = """A network of emails among employee email addresses at a mid-siz
 [^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
 tags = ['Social', 'Communication', 'Unweighted', 'Multigraph', 'Timestamps']
 url = 'http://konect.cc/networks/radoslaw_email'
-citation = [('R. Michalski, S. Palus, and P. Kazienko, "Matching organizational structure and social network extracted from email communication." In Lecture Notes in Business Information Processing 87, 197-206 (2011)', 'http://www.ii.pwr.edu.pl/~michalski/publications/pub_2011_bis.pdf')]
+citation = [('R. Michalski, S. Palus, and P. Kazienko, "Matching organizational structure and social network extracted from email communication." In Lecture Notes in Business Information Processing 87, 197-206 (2011)', 'https://doi.org/10.1007/978-3-642-21863-7_17')]
 icon_hash = '575758dfbd3e93b53c69557d'
 upstream_prefix = 'http://konect.cc/files'
 orphan = True
Add support for 'orphan' datasets and tag konect entries by Tiago de Paula Peixoto e330b80
diff --git a/entries/email_company/__init__.py b/entries/email_company/__init__.py
index 7d130c3..dd5c3a3 100644
--- a/entries/email_company/__init__.py
+++ b/entries/email_company/__init__.py
@@ -26,6 +26,7 @@ url = 'http://konect.cc/networks/radoslaw_email'
 citation = [('R. Michalski, S. Palus, and P. Kazienko, "Matching organizational structure and social network extracted from email communication." In Lecture Notes in Business Information Processing 87, 197-206 (2011)', 'http://www.ii.pwr.edu.pl/~michalski/publications/pub_2011_bis.pdf')]
 icon_hash = '575758dfbd3e93b53c69557d'
 upstream_prefix = 'http://konect.cc/files'
+orphan = True
 files = [('download.tsv.radoslaw_email.tar.bz2', None, 'konect')]
 
 def fetch_upstream(force=False):
Change license from GPLv3 to AGPLv3 by Tiago de Paula Peixoto d754be5
diff --git a/entries/email_company/__init__.py b/entries/email_company/__init__.py
index bad6443..7d130c3 100644
--- a/entries/email_company/__init__.py
+++ b/entries/email_company/__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/email_company/__init__.py b/entries/email_company/__init__.py
index b9b46cd..bad6443 100644
--- a/entries/email_company/__init__.py
+++ b/entries/email_company/__init__.py
@@ -19,7 +19,8 @@
 from .. import *
 
 title = "Manufacturing company email (2010)"
-description = "A network of emails among employee email addresses at a mid-sized manufacturing company. Each directed edge represents an email sent from address i to address j. Edges are timestamped, and occurred over a 6 month period in an unspecified year."
+description = """A network of emails among employee email addresses at a mid-sized manufacturing company. Each directed edge represents an email sent from address i to address j. Edges are timestamped, and occurred over a 6 month period in an unspecified year.[^icon]
+[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
 tags = ['Social', 'Communication', 'Unweighted', 'Multigraph', 'Timestamps']
 url = 'http://konect.cc/networks/radoslaw_email'
 citation = [('R. Michalski, S. Palus, and P. Kazienko, "Matching organizational structure and social network extracted from email communication." In Lecture Notes in Business Information Processing 87, 197-206 (2011)', 'http://www.ii.pwr.edu.pl/~michalski/publications/pub_2011_bis.pdf')]
Initial commit by Tiago de Paula Peixoto cc85872
diff --git a/entries/email_company/__init__.py b/entries/email_company/__init__.py
new file mode 100644
index 0000000..b9b46cd
--- /dev/null
+++ b/entries/email_company/__init__.py
@@ -0,0 +1,48 @@
+#! /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 = "Manufacturing company email (2010)"
+description = "A network of emails among employee email addresses at a mid-sized manufacturing company. Each directed edge represents an email sent from address i to address j. Edges are timestamped, and occurred over a 6 month period in an unspecified year."
+tags = ['Social', 'Communication', 'Unweighted', 'Multigraph', 'Timestamps']
+url = 'http://konect.cc/networks/radoslaw_email'
+citation = [('R. Michalski, S. Palus, and P. Kazienko, "Matching organizational structure and social network extracted from email communication." In Lecture Notes in Business Information Processing 87, 197-206 (2011)', 'http://www.ii.pwr.edu.pl/~michalski/publications/pub_2011_bis.pdf')]
+icon_hash = '575758dfbd3e93b53c69557d'
+upstream_prefix = 'http://konect.cc/files'
+files = [('download.tsv.radoslaw_email.tar.bz2', None, 'konect')]
+
+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