Experts and Institutions#

About#

This thematic type provides a way to describe the experts and institutions. In this case the following definitions are used:

Expert: A person who has a deep understanding of a particular subject area.

Institution: A group of people working together to provide a particular service.

Example: Person Graph#

The following graph present a basic record we might use for a person.
We will break down some of the key properties used in this graph.

As Ocean InfoHub is levergaing Schema.org we are using schema.org/Person for this type. Any of the properties of Person seen there are valid to use in such a record.

While publishers are free to use as many elements as they wish, our goal with this documentation is provide a simple example that address some of the search and discovery goals of OIH along with those properties most useful in the linking of resources between OIH participants.

 1{
 2  "@context": {
 3    "@vocab": "https://schema.org/"
 4  },
 5  "@id": "https://example.org/permanentUrlToThisJsonDoc",
 6  "@type": "Person",
 7  "name": "Jane Doe",
 8  "jobTitle": "Professor",
 9  "workLocation": {
10    "@type": "Place",
11    "address": "54 Ocean Drive, 23521 Ocean City, CountryName",
12    "name": "Place name"
13  },
14  "telephone": "(425) 123-4567",
15  "url": "http://www.janedoe.com",
16  "knowsAbout": [
17    "Invasive species in brackish water",
18    "https://www.wikidata.org/wiki/Q183368",
19    {
20      "@id": "https://example.org/id/course/x",
21      "@type": "Course",
22      "description": "In this course ...",
23      "url": "URL to the course"
24    }
25  ],
26  "identifier": {
27    "@id": "https://orcid.org/0000-0002-2257-9127",
28    "@type": "PropertyValue",
29    "propertyID": "https://registry.identifiers.org/registry/orcid",
30    "url": "https://orcid.org/0000-0002-2257-9127",
31    "description": "Optional description of this record..."
32  },
33  "nationality": {
34    "@type": "Country",
35    "name": "Fiji",
36    "identifier": {
37      "@type": "PropertyValue",
38      "name": "ISO 3166-1 alpha-2 code",
39      "value": "FJ",
40      "propertyID": [
41        "https://unece.org/trade/cefact/unlocode-code-list-country-and-territory",
42        "ISO 3166-1:2020"
43      ]
44    }
45  },
46  "knowsLanguage": {
47    "@type": "Language",
48    "name": "Spanish",
49    "alternateName": "es"
50  }
51}
Hide code cell source
import json
from pyld import jsonld
import os, sys

currentdir = os.path.dirname(os.path.abspath(''))
parentdir = os.path.dirname(currentdir)
sys.path.insert(0, parentdir)
from lib import jbutils

with open("../../../odis-in/dataGraphs/thematics/expinst/graphs/person.json") as dgraph:
    doc = json.load(dgraph)

context = {
    "@vocab": "https://schema.org/",
}

compacted = jsonld.compact(doc, context)
jbutils.show_graph(compacted)
../../_images/7d8bc061620e82ab1fe96039a9378964c2b27991ca5e02bc24e1440c48bf6ae3.svg

Details: Identifier#

For each profile there are a few key elements we need to know about. One key element is what the authoritative reference or canonical identifier is for a resource.

Hide code cell source
import json
from rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph
from rdflib.extras.external_graph_libs import rdflib_to_networkx_graph
from pyld import jsonld
import graphviz
import os, sys

currentdir = os.path.dirname(os.path.abspath(''))
parentdir = os.path.dirname(currentdir)
sys.path.insert(0, parentdir)
from lib import jbutils

with open("../../../odis-in/dataGraphs/thematics/expinst/graphs/person.json") as dgraph:
    doc = json.load(dgraph)

frame = {
  "@context": {"@vocab": "https://schema.org/"},
  "@explicit": "true",
  "@type":     "Person",
  "identifier": ""
}

context = {
    "@vocab": "https://schema.org/",
}

compacted = jsonld.compact(doc, context)

framed = jsonld.frame(compacted, frame)
jd = json.dumps(framed, indent=4)
print(jd)

jbutils.show_graph(framed)
{
    "@context": {
        "@vocab": "https://schema.org/"
    },
    "@id": "https://example.org/permanentUrlToThisJsonDoc",
    "@type": "Person",
    "identifier": {
        "@id": "https://orcid.org/0000-0002-2257-9127",
        "@type": "PropertyValue",
        "description": "Optional description of this record...",
        "propertyID": "https://registry.identifiers.org/registry/orcid",
        "url": "https://orcid.org/0000-0002-2257-9127"
    }
}
../../_images/9eea09c33dbfc9c8766f64be131b1c315511d372b50ce1ab873f9b06184d468f.svg

Details: nationality#

Nationality provide connections to languages a person is connected with. The property, schema.org/nationality, is used to present that. In the OIH we need to state what the semantics of nationality are for our use case.

Hide code cell source
import json
from rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph
from rdflib.extras.external_graph_libs import rdflib_to_networkx_graph
from pyld import jsonld
import graphviz
import os, sys

currentdir = os.path.dirname(os.path.abspath(''))
parentdir = os.path.dirname(currentdir)
sys.path.insert(0, parentdir)
from lib import jbutils

with open("../../../odis-in/dataGraphs/thematics/expinst/graphs/person.json") as dgraph:
    doc = json.load(dgraph)

frame = {
  "@context": {"@vocab": "https://schema.org/"},
  "@explicit": "true",
  "@type":     "Person",
  "nationality": ""
}

context = {
    "@vocab": "https://schema.org/",
}

compacted = jsonld.compact(doc, context)

framed = jsonld.frame(compacted, frame)
jd = json.dumps(framed, indent=4)
print(jd)

jbutils.show_graph(framed)
{
    "@context": {
        "@vocab": "https://schema.org/"
    },
    "@id": "https://example.org/permanentUrlToThisJsonDoc",
    "@type": "Person",
    "nationality": {
        "@type": "Country",
        "identifier": {
            "@type": "PropertyValue",
            "name": "ISO 3166-1 alpha-2 code",
            "propertyID": [
                "https://unece.org/trade/cefact/unlocode-code-list-country-and-territory",
                "ISO 3166-1:2020"
            ],
            "value": "FJ"
        },
        "name": "Fiji"
    }
}
../../_images/9e4b98d67da850d5be6a7a317e15767552ca3b177b39e3373431e1df8dac56a1.svg

Note

The visual above demonstrates an issue that can be seen in several of the graph. Where we don’t use an @id the graph will be represented as a “blank node”.
These will be uniquely identified in the graph, however, in the construction of the visual this is a common blank node and results in the double arrows pointing to an underscore. This is a visualization issue and not a proper representation of the graph structure.

Details: knowsLanguage#

Knows about provide connections to languages a person is connected with. The property, schema.org/knowsLanguage, is used to present that. Multiple languages can be expressed using the JSON array [] syntax.

Hide code cell source
import json
from rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph
from rdflib.extras.external_graph_libs import rdflib_to_networkx_graph
from pyld import jsonld
import graphviz
import os, sys

currentdir = os.path.dirname(os.path.abspath(''))
parentdir = os.path.dirname(currentdir)
sys.path.insert(0, parentdir)
from lib import jbutils

with open("../../../odis-in/dataGraphs/thematics/expinst/graphs/person.json") as dgraph:
    doc = json.load(dgraph)

frame = {
  "@context": {"@vocab": "https://schema.org/"},
  "@explicit": "true",
  "@type":     "Person",
  "knowsLanguage": ""
}

context = {
    "@vocab": "https://schema.org/",
}

compacted = jsonld.compact(doc, context)

framed = jsonld.frame(compacted, frame)
jd = json.dumps(framed, indent=4)
print(jd)

jbutils.show_graph(framed)
{
    "@context": {
        "@vocab": "https://schema.org/"
    },
    "@id": "https://example.org/permanentUrlToThisJsonDoc",
    "@type": "Person",
    "knowsLanguage": {
        "@type": "Language",
        "alternateName": "es",
        "name": "Spanish"
    }
}
../../_images/5b6fb20d08aaa71516ebcbd5c2abab1c6590099f06d16b28fe0fad4035a0fe4b.svg

Details: Knows About#

Knows about provide connections to resources a person is connected with. The property, schema.org/knowsAbout, can connect a Person or Organization to Text, URL or any Thing type.

Hide code cell source
import json
from rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph
from rdflib.extras.external_graph_libs import rdflib_to_networkx_graph
from pyld import jsonld
import graphviz
import os, sys

currentdir = os.path.dirname(os.path.abspath(''))
parentdir = os.path.dirname(currentdir)
sys.path.insert(0, parentdir)
from lib import jbutils

with open("../../../odis-in/dataGraphs/thematics/expinst/graphs/person.json") as dgraph:
    doc = json.load(dgraph)

frame = {
  "@context": {"@vocab": "https://schema.org/"},
  "@explicit": "true",
  "@type":     "Person",
  "knowsAbout": ""
}

context = {
    "@vocab": "https://schema.org/",
}

compacted = jsonld.compact(doc, context)

framed = jsonld.frame(compacted, frame)
jd = json.dumps(framed, indent=4)
print(jd)

jbutils.show_graph(framed)
{
    "@context": {
        "@vocab": "https://schema.org/"
    },
    "@id": "https://example.org/permanentUrlToThisJsonDoc",
    "@type": "Person",
    "knowsAbout": [
        "Invasive species in brackish water",
        "https://www.wikidata.org/wiki/Q183368",
        {
            "@id": "https://example.org/id/course/x",
            "@type": "Course",
            "description": "In this course ...",
            "url": "URL to the course"
        }
    ]
}
../../_images/fbb92a064306f453f516ff99987e80c84f12f03b8157cc8e688365ce2b4ce536.svg

Example: Institution Graph#

Here we have an example of an data graph for type schema.org/Organization.
For the identifier we are using the a GRID, but this could also be something like a ROR.

 1{
 2    "@context": {
 3        "@vocab": "https://schema.org/"
 4    },
 5    "@id": "https://index.example.org/id/org/x",
 6    "@type": "Organization",
 7    "address": {
 8        "@type": "PostalAddress",
 9        "addressLocality": "Paris, France",
10        "postalCode": "F-75002",
11        "streetAddress": "38 avenue de l'Opera"
12    },
13    "location": {
14        "@type": "Place",
15        "address": "38 avenue de l'Opera, F-75002, Paris, France",
16        "name": "Paris"
17    },
18    "email": "secretariat(at)example.org",
19    "name": "Organization X",
20    "description": "Description of org ...",
21    "telephone": "( 33 1) 42 68 53 00",
22    "url": "https://example.org/",
23    "member": [
24        {
25            "@id": "https://example.org/id/org/1",
26            "@type": "Organization",
27            "name": "Organization A",
28            "description": "Org A is a potential parent organization of Org X"
29        },
30        {
31            "@id": "https://orcid.org/0000-0002-2257-9127",
32            "@type": "Person"
33        }
34    ],
35    "identifier": {
36        "@id": "https://grid.ac/institutes/grid.475727.4",
37        "@type": "PropertyValue",
38        "description": "UN Department of Economic and Social Affairs Sustainable Development",
39        "propertyID": "https://registry.identifiers.org/registry/grid",
40        "url": "https://grid.ac/institutes/grid.475727.4"
41    }
42}

On the property membership#

Line 18-29 show the inclusion of a schema.org/member property. There are issues to note here both for consumers (aggregators) and providers (publishers). The Person type is show connected simply on a type and id. This provides the cleanest connection. If a member is added by type and id, as in the case of the “Organization A” link, there is the problem of additional triples being added. Here, the name and description properties are going to add triples to the OIH KG. In so doing, we run the risk or adding potentially un-authoritative information. The aggregator doesn’t know if triples here are or are not provided by an actor authoritative for those properties. This could be addresses with framing or validation workflows, or ignored. The prov elements stored could be leveraged to later track down sources, but don’t provide further information on the issue of authority.

It is recommended that best practice is to attempt to link only on ids (with a type in all cases) where possible. If you are connecting with a type, do not provide additional properties. In cases where such an id can not be provided, you may wish to fill out basic properties you can provide with confidence.

Hide code cell source
import json
from pyld import jsonld
import os, sys

currentdir = os.path.dirname(os.path.abspath(''))
parentdir = os.path.dirname(currentdir)
sys.path.insert(0, parentdir)
from lib import jbutils

with open("../../../odis-in/dataGraphs/thematics/expinst/graphs/organization.json") as dgraph:
    doc = json.load(dgraph)

context = {
    "@vocab": "https://schema.org/",
}

compacted = jsonld.compact(doc, context)
jbutils.show_graph(compacted)
../../_images/56db6cccc4e266a7f712b42c92f3d43a86c6dcca4ab21b0be276a1b9ed929f9b.svg

Details: Indentifier#

For each profile there are a few key elements we need to know about. One key element is what the authoritative reference or canonical identifier is for a resource.

Hide code cell source
import json
from rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph
from rdflib.extras.external_graph_libs import rdflib_to_networkx_graph
from pyld import jsonld
import graphviz
import os, sys

currentdir = os.path.dirname(os.path.abspath(''))
parentdir = os.path.dirname(currentdir)
sys.path.insert(0, parentdir)
from lib import jbutils

with open("../../../odis-in/dataGraphs/thematics/expinst/graphs/organization.json") as dgraph:
    doc = json.load(dgraph)

frame = {
  "@context": {"@vocab": "https://schema.org/"},
  "@explicit": "true",
  "@requireAll": "true",
  "@type":     "Organization",
  "identifier": ""
}

context = {
    "@vocab": "https://schema.org/",
}

compacted = jsonld.compact(doc, context)

framed = jsonld.frame(compacted, frame)
jd = json.dumps(framed, indent=4)
print(jd)

jbutils.show_graph(framed)
{
    "@context": {
        "@vocab": "https://schema.org/"
    },
    "@id": "https://index.example.org/id/org/x",
    "@type": "Organization",
    "identifier": {
        "@id": "https://grid.ac/institutes/grid.475727.4",
        "@type": "PropertyValue",
        "description": "UN Department of Economic and Social Affairs Sustainable Development",
        "propertyID": "https://registry.identifiers.org/registry/grid",
        "url": "https://grid.ac/institutes/grid.475727.4"
    }
}
../../_images/1726a6958c6586fe23fe208af50b3d51ef644fb66ceda5d67ddd225b6e3e517d.svg

References#