logo Netzschleuder network catalog, repository, and centrifuge

History of physician_trust

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] Merge duplicate entries and add cross-references between related ones by Tiago de Paula Peixoto 9bc6033
- Removed duplicates, merged into the entries holding the same data:
  dblp_coauthor_snap (soc_net_comms), cattle and bison (dom; bison's
  breeding data move there, as do the wolves' age and sex),
  football_tsevans (football, with both conference assignments),
  eu_procurements_alt (eu_procurements), foursquare_friendships
  (foursquare_global).
- software_dependencies: colt and scolt are one network; ambassador: the
  duplicate 2001 network is dropped and the three same-edge networks
  combined; dom: the dataset count corrected (436).
- macaque_neural: Young's 71-area network added (young71; the 47-area one
  is now cocomac47), both from archived copies.
- collins_yeast, celegans_interactomes: from archived copies of the dead
  CCSB site (byte-identical files).
- Cross-references between entries holding versions of the same data
  (food webs, Wikipedia, Slashdot, physicians, SNAP/Mislove, CCSB).
- ICON ids of duplicate records added; macaque_neural's corrected.
- prosper, dbpedia_all: string properties given in edge-index order (needs
  graph-tool with the fixed vals ordering).
diff --git a/entries/physician_trust/__init__.py b/entries/physician_trust/__init__.py
index 1ca23e7..e4d8918 100644
--- a/entries/physician_trust/__init__.py
+++ b/entries/physician_trust/__init__.py
@@ -21,7 +21,7 @@ from .. import *
 title = "Physician trust network (1966)"
 description = """Advice, discussion and friendship ties among 246 physicians in four towns in Illinois (Peoria, Bloomington, Quincy and Galesburg), from the study of the diffusion of a medical innovation (the adoption of the new drug tetracycline) by J. Coleman, E. Katz and H. Menzel. The data set was prepared by R. S. Burt from the data collected by Coleman, Katz and Menzel, reported in their 1966 book. Three sociometric relations were obtained from the replies to the questions: "When you need information or advice about questions of therapy where do you usually turn?" (advice); "And who are the three or four physicians with whom you most often find yourself discussing cases or therapy in the course of an ordinary week -- last week for instance?" (discussion); and "Would you tell me the first names of your three friends whom you see most often socially?" (friendship). In addition, records of prescriptions were reviewed and many other questions were asked, of which 13 items are included as node attributes. The data were distributed by L. C. Freeman on his network data page at the University of California, Irvine (no longer online), from which this version was obtained via the Internet Archive.
 
-A directed edge (i, j) indicates that physician i named physician j in reply to at least one of the three questions. There are no ties between physicians of different towns. Five physicians neither named nor were named by anyone, and are isolated nodes.
+A directed edge (i, j) indicates that physician i named physician j in reply to at least one of the three questions. There are no ties between physicians of different towns. Five physicians neither named nor were named by anyone, and are isolated nodes. A different preparation of the Galesburg part of the same study (31 physicians, with friendship and discussion ties, from Knoke and Burt 1983) is in the entry `galesburg_physicians`; here, Galesburg has 35 physicians, with 86 friendship ties (78 there).
 
 The network has the following properties:
 
[entries] Move more KONECT-derived entries to their original sources by Tiago de Paula Peixoto bf9dc0e
The entries now download the data from where KONECT obtained them (live,
or via the Wayback Machine), using the same release as KONECT where it is
still available, and gain the metadata KONECT dropped; descriptions and
citations are rewritten from the original sources:

- Linton Freeman's UCINET data page: bible_nouns, bison, cattle, hens,
  highschool, kangaroo, macaques, moreno_sheep, physician_trust (the three
  relations and the physicians' attributes), rhesus_monkey,
  train_terrorists, windsurfers (now the networks `interaction` and
  `closeness`), college_freshmen, crime, interactome_yeast (from the
  primary source), moreno_taro (undirected), residence_hall, zebras
- other pages, archived: contiguous_usa, advogato, google, github,
  digg_reply, twitter, bookcrossing, dbtropes_feature (without KONECT's
  spurious "ItemName" tropes)
- movielens_100k (in fact the MovieLens 10M tag assignments)
- dblp release 2017-05-02: dblp_author_paper, dblp_cite, dblp_coauthor
- DBpedia 3.9: dbpedia_country, dbpedia_genre, dbpedia_location,
  dbpedia_occupation, dbpedia_producer, dbpedia_recordlabel,
  dbpedia_starring, dbpedia_team, dbpedia_writer, dbpedia_all, dbpedia_link
- Discogs releases dump of October 2015: discogs_affiliation,
  discogs_genre and discogs_label (now with genre and style networks)
diff --git a/entries/physician_trust/__init__.py b/entries/physician_trust/__init__.py
index a20e125..1ca23e7 100644
--- a/entries/physician_trust/__init__.py
+++ b/entries/physician_trust/__init__.py
@@ -19,21 +19,56 @@
 from .. import *
 
 title = "Physician trust network (1966)"
-description = """A network of trust relationships among physicians in four midwestern (USA) cities in 1966. Edge direction indicates that node i trusts or asks for advice from node j. Each of the four components represent the network within a given city.[^icon]
-[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
-tags = ['Social', 'Offline', 'Unweighted']
-url = 'http://konect.cc/networks/moreno_innovation'
-citation = [('J. Coleman, E. Katz, & H. Menzel, "The diffusion of an innovation among physicians." Sociometry, 20(4), 253-270. (1957)', 'https://doi.org/10.2307/2785979')]
-icon_hash = '57e18ce88cf714f319c38bdd'
-upstream_prefix = 'http://konect.cc/files'
-files = [('download.tsv.moreno_innovation.tar.bz2', None, 'konect')]
+description = """Advice, discussion and friendship ties among 246 physicians in four towns in Illinois (Peoria, Bloomington, Quincy and Galesburg), from the study of the diffusion of a medical innovation (the adoption of the new drug tetracycline) by J. Coleman, E. Katz and H. Menzel. The data set was prepared by R. S. Burt from the data collected by Coleman, Katz and Menzel, reported in their 1966 book. Three sociometric relations were obtained from the replies to the questions: "When you need information or advice about questions of therapy where do you usually turn?" (advice); "And who are the three or four physicians with whom you most often find yourself discussing cases or therapy in the course of an ordinary week -- last week for instance?" (discussion); and "Would you tell me the first names of your three friends whom you see most often socially?" (friendship). In addition, records of prescriptions were reviewed and many other questions were asked, of which 13 items are included as node attributes. The data were distributed by L. C. Freeman on his network data page at the University of California, Irvine (no longer online), from which this version was obtained via the Internet Archive.
+
+A directed edge (i, j) indicates that physician i named physician j in reply to at least one of the three questions. There are no ties between physicians of different towns. Five physicians neither named nor were named by anyone, and are isolated nodes.
+
+The network has the following properties:
+
+- Nodes (in all coded attributes except `adoption_date`, 9 means no answer):
+    - `city`, the town of practice.
+    - `adoption_date`, the month in which the physician first prescribed tetracycline, according to the prescription records (1 to 14: the months from November 1953 to December 1954, in order, so that 9 is July 1954; 15: December 1954/January 1955, 16: January/February 1955, 17: February 1955, 18: no prescriptions found, 98: no prescription data obtained; the value 99, which occurs for 30 physicians, is not documented).
+    - `career_start`, the year in which the physician started in the profession (1: 1919 or before, 2: 1920–1929, 3: 1930–1934, 4: 1935–1939, 5: 1940–1944, 6: 1945 or later).
+    - `meetings`, attendance at national, regional or state conventions of professional societies during the last 12 months (0: none, 1: only general meetings, 2: specialty meetings).
+    - `journals`, the number of medical journals received regularly (1: two, 2: three, ..., 8: nine or more).
+    - `free_time`, with whom the physician spends more free time (1: non-doctors, 2: about evenly split, 3: doctors).
+    - `discuss`, whether the physician likes to talk about medical matters when with other doctors socially (1: no, 2: yes, 3: does not care).
+    - `clubs`, membership in a club or hobby composed mostly of doctors (0: no, 1: yes).
+    - `friends`, how many of the three friends seen most often socially are doctors (1: none, 2: one, 3: two, 4: three).
+    - `community`, how long the physician has been practicing in the community (1: a year or less, 2: one to two years, 3: two to five years, 4: five to ten years, 5: ten to twenty years, 6: more than twenty years; the value 8, which occurs for one physician, is not documented).
+    - `patients`, the number of office visits in an average week (1: 25 or less, 2: 26–50, 3: 51–75, 4: 76–100, 5: 101–150, 6: 151 or more).
+    - `proximity`, whether there are other physicians in the same building (1: none in the building, 2: some in the building, but none sharing the office or waiting room, 3: some sharing the office or waiting room, 4: some perhaps sharing the office or waiting room).
+    - `specialty`, the medical specialty (1: general practitioner, 2: internist, 3: pediatrician, 4: other specialty).
+- Edges: `advice`, `discussion` and `friendship`, whether i named j in reply to the corresponding question."""
+tags = ['Social', 'Offline', 'Unweighted', 'Metadata', 'Multilayer']
+url = 'https://web.archive.org/web/20210115130726/http://moreno.ss.uci.edu/data.html#ckm'
+citation = [('J. Coleman, E. Katz, & H. Menzel, "The diffusion of an innovation among physicians." Sociometry, 20(4), 253-270. (1957)', 'https://doi.org/10.2307/2785979'),
+            ('J. S. Coleman, E. Katz, H. Menzel, "Medical Innovation: A Diffusion Study." Bobbs-Merrill, New York (1966)', 'https://scholar.google.com/scholar?q=Coleman+Katz+Menzel+%22Medical+innovation%3A+a+diffusion+study%22'),
+            ('R. S. Burt, "Social contagion and innovation: Cohesion versus structural equivalence." American Journal of Sociology 92(6), 1287-1335 (1987)', 'https://doi.org/10.1086/228667')]
+icon_hash = ['57e18ce88cf714f319c38bdd',
+             '56a85c8e26855e083a2f7920']
+upstream_license = None
+upstream_prefix = 'https://web.archive.org/web/20210115130726id_/http://moreno.ss.uci.edu'
+files = [(('ckm.dat', 'attributes.dat'), None, None)]
+
+cities = {1: "Peoria", 2: "Bloomington", 3: "Quincy", 4: "Galesburg"}
+
+# property names of the attribute columns
+attrs = {"city": "city", "adoption date": "adoption_date",
+         "med_sch_yr": "career_start", "meetings": "meetings",
+         "jours": "journals", "free_time": "free_time", "discuss": "discuss",
+         "clubs": "clubs", "friends": "friends", "community": "community",
+         "patients": "patients", "proximity": "proximity",
+         "specialty": "specialty"}
 
 def fetch_upstream(force=False):
-    return fetch_upstream_files(__name__.split(".")[-1], upstream_prefix, files,
-                                force)
+    # The Wayback Machine refuses connections or fails when rate-limited, so
+    # retry with increasing pauses (files already fetched are skipped)
+    return retry_download(fetch_upstream_files, __name__.split(".")[-1],
+                          upstream_prefix, files, force)
 
 @cache_network()
-@coerce_props()
+@coerce_props(vforce={"city": "string"})
 @annotate()
 def parse(alts=None):
     global files
@@ -44,6 +79,21 @@ def parse(alts=None):
         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)
+            fs = [stack.enter_context(open_upstream_file(name, fn, "rb"))
+                  for fn in fnames]
+            ds = [read_dl(f, pad=False) for f in fs]
+        d, da = ds
+        assert d["levels"] == ["ADVICE", "DISCUSSION", "FRIEND"]
+        assert da["nr"] == d["nr"] and da["cols"] == list(attrs.keys())
+        R = d["data"] != 0
+        g = matrix_graph([R.any(axis=0).astype("int")], True, wtype=None)
+        s, t = g.get_edges().T
+        for k, r in enumerate(["advice", "discussion", "friendship"]):
+            g.ep[r] = g.new_ep("bool", vals=R[k][s, t])
+        A = da["data"][0].astype("int")
+        for k, a in enumerate(attrs.values()):
+            if a == "city":
+                g.vp.city = g.new_vp("string", vals=[cities[x] for x in A[:, k]])
+            else:
+                g.vp[a] = g.new_vp("int", vals=A[:, k])
         yield alt, g
Update copyright information by Tiago de Paula Peixoto 73a4f0d
diff --git a/entries/physician_trust/__init__.py b/entries/physician_trust/__init__.py
index b09d29e..a20e125 100644
--- a/entries/physician_trust/__init__.py
+++ b/entries/physician_trust/__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/physician_trust/__init__.py b/entries/physician_trust/__init__.py
index 27cc808..b09d29e 100644
--- a/entries/physician_trust/__init__.py
+++ b/entries/physician_trust/__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/physician_trust/__init__.py b/entries/physician_trust/__init__.py
index 78b2c73..27cc808 100644
--- a/entries/physician_trust/__init__.py
+++ b/entries/physician_trust/__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/physician_trust/__init__.py b/entries/physician_trust/__init__.py
index 3ed7423..78b2c73 100644
--- a/entries/physician_trust/__init__.py
+++ b/entries/physician_trust/__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/physician_trust/__init__.py b/entries/physician_trust/__init__.py
index 9ebd601..3ed7423 100644
--- a/entries/physician_trust/__init__.py
+++ b/entries/physician_trust/__init__.py
@@ -26,7 +26,6 @@ url = 'http://konect.cc/networks/moreno_innovation'
 citation = [('J. Coleman, E. Katz, & H. Menzel, "The diffusion of an innovation among physicians." Sociometry, 20(4), 253-270. (1957)', 'https://doi.org/10.2307/2785979')]
 icon_hash = '57e18ce88cf714f319c38bdd'
 upstream_prefix = 'http://konect.cc/files'
-orphan = True
 files = [('download.tsv.moreno_innovation.tar.bz2', None, 'konect')]
 
 def fetch_upstream(force=False):
Update citations to use DOIs by Tiago de Paula Peixoto e878874
diff --git a/entries/physician_trust/__init__.py b/entries/physician_trust/__init__.py
index 66f5924..9ebd601 100644
--- a/entries/physician_trust/__init__.py
+++ b/entries/physician_trust/__init__.py
@@ -23,7 +23,7 @@ description = """A network of trust relationships among physicians in four midwe
 [^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
 tags = ['Social', 'Offline', 'Unweighted']
 url = 'http://konect.cc/networks/moreno_innovation'
-citation = [('J. Coleman, E. Katz, & H. Menzel, "The diffusion of an innovation among physicians." Sociometry, 20(4), 253-270. (1957)', 'http://www.jstor.org/stable/2785979')]
+citation = [('J. Coleman, E. Katz, & H. Menzel, "The diffusion of an innovation among physicians." Sociometry, 20(4), 253-270. (1957)', 'https://doi.org/10.2307/2785979')]
 icon_hash = '57e18ce88cf714f319c38bdd'
 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/physician_trust/__init__.py b/entries/physician_trust/__init__.py
index 8ddef40..66f5924 100644
--- a/entries/physician_trust/__init__.py
+++ b/entries/physician_trust/__init__.py
@@ -26,6 +26,7 @@ url = 'http://konect.cc/networks/moreno_innovation'
 citation = [('J. Coleman, E. Katz, & H. Menzel, "The diffusion of an innovation among physicians." Sociometry, 20(4), 253-270. (1957)', 'http://www.jstor.org/stable/2785979')]
 icon_hash = '57e18ce88cf714f319c38bdd'
 upstream_prefix = 'http://konect.cc/files'
+orphan = True
 files = [('download.tsv.moreno_innovation.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/physician_trust/__init__.py b/entries/physician_trust/__init__.py
index 8c94806..8ddef40 100644
--- a/entries/physician_trust/__init__.py
+++ b/entries/physician_trust/__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/physician_trust/__init__.py b/entries/physician_trust/__init__.py
index c74fbf9..8c94806 100644
--- a/entries/physician_trust/__init__.py
+++ b/entries/physician_trust/__init__.py
@@ -19,7 +19,8 @@
 from .. import *
 
 title = "Physician trust network (1966)"
-description = "A network of trust relationships among physicians in four midwestern (USA) cities in 1966. Edge direction indicates that node i trusts or asks for advice from node j. Each of the four components represent the network within a given city."
+description = """A network of trust relationships among physicians in four midwestern (USA) cities in 1966. Edge direction indicates that node i trusts or asks for advice from node j. Each of the four components represent the network within a given city.[^icon]
+[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
 tags = ['Social', 'Offline', 'Unweighted']
 url = 'http://konect.cc/networks/moreno_innovation'
 citation = [('J. Coleman, E. Katz, & H. Menzel, "The diffusion of an innovation among physicians." Sociometry, 20(4), 253-270. (1957)', 'http://www.jstor.org/stable/2785979')]
Initial commit by Tiago de Paula Peixoto cc85872
diff --git a/entries/physician_trust/__init__.py b/entries/physician_trust/__init__.py
new file mode 100644
index 0000000..c74fbf9
--- /dev/null
+++ b/entries/physician_trust/__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 = "Physician trust network (1966)"
+description = "A network of trust relationships among physicians in four midwestern (USA) cities in 1966. Edge direction indicates that node i trusts or asks for advice from node j. Each of the four components represent the network within a given city."
+tags = ['Social', 'Offline', 'Unweighted']
+url = 'http://konect.cc/networks/moreno_innovation'
+citation = [('J. Coleman, E. Katz, & H. Menzel, "The diffusion of an innovation among physicians." Sociometry, 20(4), 253-270. (1957)', 'http://www.jstor.org/stable/2785979')]
+icon_hash = '57e18ce88cf714f319c38bdd'
+upstream_prefix = 'http://konect.cc/files'
+files = [('download.tsv.moreno_innovation.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