Projects#

About#

Project: An enterprise (potentially individual but typically collaborative), planned to achieve a particular aim. Use properties from Organization, subOrganization/parentOrganization to indicate project sub-structures.

Research Project#

This is what a basic research project data graph might look like. We have the full record below, but this shows some of the basics we would be looking for.

This type is based on the Schema.org type Project which has a sub-type of ResearchProject.

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/projects/graphs/proj.json") as dgraph:
    doc = json.load(dgraph)

frame = {
  "@context": {"@vocab": "https://schema.org/"},
  "@explicit": "true",
  "@requireAll": "true",
  "@type":     "ResearchProject",
  "legalName": "",
  "name": "",
  "url": "",
  "description": "",
  "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": "ResearchProject",
    "description": "Repo description ... ",
    "identifier": {
        "@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"
    },
    "legalName": "Example Data Repository",
    "name": "ExDaRepo",
    "url": "https://www.example-data-repository.org"
}
../../_images/31539e64af7fb1a425040efab575fda41b8de1b32ae42fb408f164c50966d19b.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/projects/graphs/proj.json") as dgraph:
    doc = json.load(dgraph)

frame = {
  "@context": {"@vocab": "https://schema.org/"},
  "@explicit": "true",
  "@requireAll": "true",
  "@type":     "ResearchProject",
  "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": "ResearchProject",
    "identifier": {
        "@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/47a31312afe7a612c19c92cce565c33e5b9fcb3e10b58a1fe1998c1c91fe5b0d.svg

Full Research Project#

Here is what our full record looks like. We have added in several more nodes to cover things like funding source, policy connections, spatial area served and parent organization.

  1{
  2  "@context": {
  3    "@vocab": "https://schema.org/"
  4  },
  5  "@type": "ResearchProject",
  6  "@id": "https://example.org/permanentUrlToThisJsonDoc",
  7  "legalName": "Example Data Repository",
  8  "name": "ExDaRepo",
  9  "url": "https://www.example-data-repository.org",
 10  "description": "Repo description ... ",
 11  "logo": {
 12    "@type": "ImageObject",
 13    "url": "https://www.example-data-repository.org/logo.jpg"
 14  },
 15  "identifier": {
 16    "@type": "PropertyValue",
 17    "description": "UN Department of Economic and Social Affairs Sustainable Development",
 18    "propertyID": "https://registry.identifiers.org/registry/grid",
 19    "url": "https://grid.ac/institutes/grid.475727.4"
 20  },
 21  "contactPoint": {
 22    "@type": "ContactPoint",
 23    "name": "Support",
 24    "email": "info@example-data-repository.org",
 25    "url": "https://www.example-data-repository.org/about-us",
 26    "contactType": "customer support"
 27  },
 28  "funder": {
 29    "@type": "FundingAgency",
 30    "name": "National Science Foundation",
 31    "legalName": "National Science Foundation",
 32    "alternateName": "NSF",
 33    "url": "https://www.nsf.gov/",
 34    "identifier": {
 35      "@type": "PropertyValue",
 36      "propertyID": "https://registry.identifiers.org/registry/doi",
 37      "value": "DOI value expressed as doi:{doi}",
 38      "url": "https://dio.org/id/XYZ"
 39    }
 40  },
 41  "funding": [
 42    {
 43      "@type": "MonetaryGrant",
 44      "url": "http://www.someinstitute.edu",
 45      "name": "{odo:hasAward -> odo:hasAwardNumber}",
 46      "identifier": "{odo:hasAward -> odo:hasAwardNumber}",
 47      "funder": [
 48        {
 49          "@type": "FundingAgency",
 50          "name": "Some other org",
 51          "url": "https://example.funder.org/",
 52          "identifier": {
 53            "@type": "PropertyValue",
 54            "propertyID": "https://registry.identifiers.org/registry/doi",
 55            "value": "DOI value expressed as doi:{doi}",
 56            "url": "https://dio.org/id/XYZ"
 57          }
 58        }
 59      ]
 60    }
 61  ],
 62  "ethicsPolicy": {
 63    "@type": "CreativeWork",
 64    "name": "Name or title of the document",
 65    "description": "Description of the creative work ",
 66    "url": "https://www.foo.org/creativework/ethicsPolicy.pdf"
 67  },
 68  "diversityPolicy": {
 69    "@type": "CreativeWork",
 70    "name": "Name or title of the document",
 71    "description": "Description of the creative work",
 72    "url": "https://www.foo.org/creativework/diversityPolicy.pdf"
 73  },
 74  "areaServed": [
 75    {
 76      "@type": "Place",
 77      "geo": {
 78        "@type": "GeoCoordinates",
 79        "latitude": 39.3280,
 80        "longitude": 120.1633
 81      },
 82      "name": "Textual name of the area served",
 83      "description": "Description of the area served"
 84    },
 85    {
 86      "@type": "AdministrativeArea",
 87      "geo": {
 88        "@type": "GeoCoordinates",
 89        "latitude": 39.3280,
 90        "longitude": 120.1633
 91      },
 92      "description": "Needs to be subset of Place, Review Place"
 93    }
 94  ],
 95  "parentOrganization": {
 96    "@type": "Organization",
 97    "legalName": "Some Institute",
 98    "name": "SI",
 99    "url": "http://www.someinstitute.edu",
100    "address": {
101      "@type": "PostalAddress",
102      "streetAddress": "234 Main St.",
103      "addressLocality": "Anytown",
104      "addressRegion": "ST",
105      "postalCode": "12345",
106      "addressCountry": "USA"
107    }
108  }
109}
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/projects/graphs/proj.json") as dgraph:
    doc = json.load(dgraph)

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

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

References#