fils/oihBook huggingface dataset:
99                    "url": "http://vocab.nerc.ac.uk/collection/L22/current/TOOL0999/",
100                    "description": "The WaMoS II 500 radar is an industry-proven X-band radar-based wave and surface current monitoring system developed by OceanWaveS. This sensor is able to measure and displays essential wave field parameters including wave heights, periods, directions and surface currents. The operating range extends to 4.0 km depending on X-band radar type and installation gemoetry. Requiring a minimum wind speed of 3 m/s and a minimum wave height of about 0.5m."
101                }
102            },
103            {
104                "@type": "Action",
105                "name": "Measurement of ocean stress",
106                "instrument": {
107                    "@type": "Thing",
108                    "name": "Metek uSonic-3 Scientific {formerly: USA-1} ultrasonic anemometer",
109                    "url": "http://vocab.nerc.ac.uk/collection/L22/current/TOOL1402/",
110                    "description": "A high precision 3D sonic anemometer. Typical applications for this device include: meteorological systems, meteorological networks, measuring dispersion parameters for pollution modelling, research stations, industrial sites, air quality forecasts, eddy correlation fluxes, marine and offshore platforms, wind shear detection, wind energy, and wake vortex monitoring. This device takes accurate measurement of 3 wind components and turbulence. Constructed with stainless steel. "
111                }
112            }
113        ]
114    },
115    "datePublished": "2018-07-29",
116    "dateModified": "2018-07-30T14:30Z",
117    "temporalCoverage": "2012-09-20/2016-01-22"
118}
license#
As licenses are an important cross-cutting item there is a separate section on licenses
at:  License chapter
keywords#
As keywords are an important cross-cutting item there is a separate section on keywords
at:  Keywords chapter
variableMeasured#
A key section detailing approaches to describing variables.  This property expects either of text or
the more detailed schema:PropertyValue.
Note
There can be multiple links in the proertyID property.  Preference should be given to those with semantic descriptions.
Note
Note
In cases where a single value can be associated with a variable, or a min max value, this can be provided along with a
unitCode property.   In cases where a variable represents a large collection of data this can be omitted and the data obtained
in a distribution reference.
See also
See also:  Science on Schema variable
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/variables/graphs/obisData2.json") as dgraph:
    doc = json.load(dgraph)
frame = {
  "@context": {"@vocab": "https://schema.org/"},
  "@explicit": "true",
  "@type":     "Dataset",
  "variableMeasured": ""
}
context = {
    "@vocab": "https://schema.org/",
}
compacted = jsonld.compact(doc, context)
framed = jsonld.frame(compacted, frame)
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/dataset/12345",
    "@type": "Dataset",
    "variableMeasured": [
        {
            "@type": "PropertyValue",
            "description": "Sea State is the characterization of wave and swell, typically in terms of height, wavelength, period, and directional wave energy flux ",
            "name": "Sea State",
            "propertyID": [
                "http://purl.obolibrary.org/obo/ENVO_01001374",
"https://gcmd.earthdata.nasa.gov/KeywordViewer/scheme/all/11aca777-8a01-42ce-b076-b3059c3d8cae?gtm_keyword=SEA%20STATE&gtm_scheme=Earth%20Science"
            ]
        },
        {
            "@type": "PropertyValue",
            "description": "The 2-dimensional horizontal vector Ocean Surface Stress is the rate per unit area at which momentum is transferred from the atmosphere to the ocean.",
            "name": "Ocean Surface Stress",
            "propertyID": "http://purl.obolibrary.org/obo/ENVO_01001844",
            "unitCode": "http://qudt.org/vocab/unit/N-PER-M2",
            "value": 0.2
        }
    ]
}
measurementTechnique#
https://schema.org/measurementTechnique is used to provide either
text about or a URL to information about the techniques or technology used in a Dataset.
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)
parentdir = os.path.dirname(currentdir)
sys.path.insert(0, parentdir)
from lib import jbutils
with open("../../../odis-in/dataGraphs/thematics/variables/graphs/obisData2.json") as dgraph:
    doc = json.load(dgraph)
frame = {
  "@context": {"@vocab": "https://schema.org/"},
  "@explicit": "true",
  "@type":     "Dataset",
  "measurementTechnique": ""
}
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/"
{
    "@context": {
        "@vocab": "https://schema.org/"
    },
    "@id": "https://example.org/dataset/12345",
    "@type": "Dataset",
    "measurementTechnique": [
        "http://dx.doi.org/10.1002/exampleMethodsSeaStateDOI.ch1",
        "http://dx.doi.org/10.1002/exampleMethodsOceanStressDOI.ch1"
    ]
}
publishingPrinciples#
As defined in the Linking to Principles
section on publishing principles, This can be used to connect CreativeWork, Organization, or Person to either of
CreativeWork or URL. So this allows us to link a CreativeWork to a policy or principle statement.
This has some very useful use cases where resources can be grouped based on their connection to those principles and policies.
For this section on EOVs, it is used to link in the specification sheets for the measured variables.  This can also be used to link
in QA/QC documentation.  There is no direct connection between the creative works linked here and the measured variables though convention
would be to keep the order the same if possible.  Such order is not maintained through potential serialization of the JSON-LD records though
list order can be maintained with an @list keyword.
import json
list order can be maintained with an @list keyword.
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/variables/graphs/obisData2.json") as dgraph:
    doc = json.load(dgraph)
frame = {
  "@context": {"@vocab": "https://schema.org/"},
  "@explicit": "true",
  "@type":     "Dataset",
  "publishingPrinciples": ""
}
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)
print(jd)
jbutils.show_graph(framed)
{
    "@context": {
        "@vocab": "https://schema.org/"
    },
    "@id": "https://example.org/dataset/12345",
    "@type": "Dataset",
    "publishingPrinciples": [
        {
            "@type": "CreativeWork",
            "description": "This is the EOV specification sheet released by GOOS for Sea State.  It was composed by the Ocean Observations Panel for Climate.  OOPC is sponsored by the Global Ocean Observing System the Global Climate Observing System and the World Climate Research Program. OOPC provides advice on scientific requirements to the Joint Commission for Oceanography and Marine Meteorology. ",
            "name": "Ocean Observations Physics and Climate Panel (OOPC) Sea State GOOS EOV Specification Sheet",
"url": "http://www.goosocean.org/components/com_oe/oe.php?task=download&id=34494&version=1.0&lang=1&format=1"
        },
        {
            "@type": "CreativeWork",
            "description": "This is the EOV specification sheet released by GOOS for Ocean Surface Stress.  It was composed by the Ocean Observations Panel for Climate.  OOPC is sponsored by the Global Ocean Observing System the Global Climate Observing System and the World Climate Research Program. OOPC provides advice on scientific requirements to the Joint Commission for Oceanography and Marine Meteorology. ",
            "name": "Ocean Observations Physics and Climate Panel (OOPC) Ocean Surface Stress GOOS EOV Specification Sheet",
            "url": "http://www.goosocean.org/components/com_oe/oe.php?task=download&id=34507&version=1.0&lang=1&format=1"
        },
        {
            "@type": "CreativeWork",
            "description": "QA/QC  - EOV data and the methods used to generate them should have been vetted through some QA/QC methods, ideally performed by an independent third-party. These should be included in a dedicated JSON-LD block, even if it points to the same methodology linked to in the measurementTechnique block. ",
"name": "QA/QC guidance",
            "url": "http://example.org/id/doc/ID"
        }
    ]
}
spatialCoverage#
More details on spatial elements are found
at:  Spatial Geometry
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/variables/graphs/obisData2.json") as dgraph:
    doc = json.load(dgraph)
frame = {
  "@context": {"@vocab": "https://schema.org/"},
  "@explicit": "true",
  "@type":     "Dataset",
  "spatialCoverage": ""
}
context = {
    "@vocab": "https://schema.org/",
}
compacted = jsonld.compact(doc, context)
framed = jsonld.frame(compacted, frame)
jd = json.dumps(framed, indent=4)
print(jd)
jd = json.dumps(framed, indent=4)
print(jd)
jbutils.show_graph(framed)
{
    "@context": {
        "@vocab": "https://schema.org/"
    },
    "@id": "https://example.org/dataset/12345",
    "@type": "Dataset",
    "spatialCoverage": {
        "@type": "Place",
        "additionalProperty": {
            "@type": "PropertyValue",
            "propertyID": "http://dbpedia.org/resource/Spatial_reference_system",
            "value": "http://www.w3.org/2003/01/geo/wgs84_pos#lat_long"
        },
        "geo": {
            "@type": "GeoShape",
},
        "geo": {
            "@type": "GeoShape",
            "polygon": "142.014 10.161667,142.014 18.033833,147.997833 18.033833,147.997833 10.161667,142.014 10.161667"
        }
    }
}
about#
This section is an attempt to leverage schema.org to link instrument information.  This is done via the Event type with a
connected Action type.
See also
See also Identifier and Prov subjectOf and inverse about.
schema:about connects the subject matter of the content.
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/variables/graphs/obisData2.json") as dgraph:
    doc = json.load(dgraph)
frame = {
  "@context": {"@vocab": "https://schema.org/"},
frame = {
  "@context": {"@vocab": "https://schema.org/"},
  "@explicit": "true",
  "@type":     "Dataset",
  "about": ""
}
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/dataset/12345",
    "@type": "Dataset",
    "about": {
        "@type": "Event",
        "description": "describe the activity, might include name here too.",
"description": "describe the activity, might include name here too.",
        "name": "Measurement of sea state",
        "potentialAction": [
            {
                "@type": "Action",
                "instrument": {
                    "@type": "Thing",
                    "description": "The WaMoS II 500 radar is an industry-proven X-band radar-based wave and surface current monitoring system developed by OceanWaveS. This sensor is able to measure and displays essential wave field parameters including wave heights, periods, directions and surface currents. The operating range extends to 4.0 km depending on X-band radar type and installation gemoetry. Requiring a minimum wind speed of 3 m/s and a minimum wave height of about 0.5m.",
                    "name": "OceanWaveS WaMoS II 500 waves and surface current radar",
                    "url": "http://vocab.nerc.ac.uk/collection/L22/current/TOOL0999/"
                },
                "name": "Measurement of sea state"
            },
            {
                "@type": "Action",
                "instrument": {
                    "@type": "Thing",
"instrument": {
                    "@type": "Thing",
                    "description": "A high precision 3D sonic anemometer. Typical applications for this device include: meteorological systems, meteorological networks, measuring dispersion parameters for pollution modelling, research stations, industrial sites, air quality forecasts, eddy correlation fluxes, marine and offshore platforms, wind shear detection, wind energy, and wake vortex monitoring. This device takes accurate measurement of 3 wind components and turbulence. Constructed with stainless steel. ",
                    "name": "Metek uSonic-3 Scientific {formerly: USA-1} ultrasonic anemometer",
                    "url": "http://vocab.nerc.ac.uk/collection/L22/current/TOOL1402/"
                },
                "name": "Measurement of ocean stress"
            }
        ]
    }
}
temporalCoverage#
Representation of temporal coverage follows ISO 8601 patterns.  ESIP Science on Schema
as has patterns for Deep Time (geologic time) patterns.
See also
This section is based on the
Science on Schema Temporal Coverage
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
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/variables/graphs/obisData2.json") as dgraph:
    doc = json.load(dgraph)
frame = {
  "@context": {"@vocab": "https://schema.org/"},
  "@explicit": "true",
  "@type":     "Dataset",
  "temporalCoverage": ""
}
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/dataset/12345",
    "@type": "Dataset",
    "temporalCoverage": "2012-09-20/2016-01-22"
}
Science on Schema temporalCoverage#
Example from Science on Schema recommendations:
 1{    "@context": {
 2    "@vocab": "https://schema.org/",
 3    "time": "http://www.w3.org/2006/time#"
 4},
 5
 6"@type": "Dataset",
 7    "description": "Eruptive activity at Mt. St. Helens, Washington, March 1980 - January 1981",
 8    "temporalCoverage": ["1980-03-27T19:36:00/1981-01-03T00:00:00Z",
 9        {
10            "@type": "time:ProperInterval",
11            "time:hasBeginning": {
12                 "@type": "time:Instant",
12                 "@type": "time:Instant",
13                 "time:inXSDDateTimeStamp": "1980-03-27T19:36:00Z"
14             },
15             "time:hasEnd": {
16                "@type": "time:Instant",
17                "time:inXSDDateTimeStamp": "1981-01-03T00:00:00Z"
18             }
19        }]
20}
Spatial Maps#
About#
Map: A map represented by a static file or document
The schema.org type Map only offers one special property beyond
the parent CreativeWork.  That is a mapType which is an
enumeration of types that do not apply to OIH use cases.  However, the use of the
Map typing itself may aid in narrowing search requests later to a specific creative work.
Schema.org type Map is a subtype of CreativeWork. As such, we can all the approaches
described in the Documents section for this type as well.  The use
of type Map would be focused on documenting files such as KML, GeoJSON or others as a
creative work that may be downloaded and used either in a workflow or directly.
A map in this context would be a static file or document of some sort.  Map services like
those described by an OGC Catalogue Service or other GIS service would be described as a
service.  Potential approaches for doing can be seen the service type.
Note
In the current context, schema.org Map typically references maps as a document.
Here we are likely to reference a KML, Shapefile or GeoPackage.  We may wish to then
indicate the type of document it is through a mimetype via encoding.
 1{
 2    "@context": {
 3        "@vocab": "https://schema.org/"
 4    },
3        "@vocab": "https://schema.org/"
 4    },
 5    "@type": "Map",
 6    "@id": "https://example.org/id/XYZ",
 7    "name": "Name or title of the document",
 8    "description": "Description of the map to aid in searching",
 9    "url": "https://www.sample-data-repository.org/creativework/map.pdf",
10    "identifier": {
11        "@id": "https://doi.org/10.5066/F7VX0DMQ",
12        "@type": "PropertyValue",
13        "propertyID": "https://registry.identifiers.org/registry/doi",
14        "value": "doi:10.5066/F7VX0DMQ",
15        "url": "https://doi.org/10.5066/F7VX0DMQ"
16    },
17    "keywords": [
18        {
19            "@id": "http://purl.org/dc/dcmitype/Image",
20            "@type": "DefinedTerm",
21            "inDefinedTermSet": "http://purl.org/dc/terms/DCMIType",
22            "termCode": "Image",
23            "name": "Image"
24        },
25        "Region X",
23            "name": "Image"
24        },
25        "Region X",
26        {
27            "@id": "https://www.wikidata.org/wiki/Q350134",
28            "@type": "URL",
29            "url": "https://www.wikidata.org/wiki/Q350134",
30            "name": "North Atlantic Ocean"
31        }
32    ]
33}
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/docs/graphs/map.json") as dgraph:
    doc = json.load(dgraph)
context = {
    "@vocab": "https://schema.org/",
}
compacted = jsonld.compact(doc, context)
jbutils.show_graph(compacted)
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.
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/docs/graphs/map.json") as dgraph:
    doc = json.load(dgraph)
frame = {
  "@context": {"@vocab": "https://schema.org/"},
  "@explicit": "true",
  "@requireAll": "true",
  "@type":     "Map",
  "identifier": ""
}
context = {
    "@vocab": "https://schema.org/",
}
compacted = jsonld.compact(doc, context)
framed = jsonld.frame(compacted, frame)
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/id/XYZ",
    "@type": "Map",
    "identifier": {
        "@id": "https://doi.org/10.5066/F7VX0DMQ",
        "@type": "PropertyValue",
        "propertyID": "https://registry.identifiers.org/registry/doi",
        "url": "https://doi.org/10.5066/F7VX0DMQ",
        "value": "doi:10.5066/F7VX0DMQ"
    }
}
Keywords#
}
}
Keywords#
We can see three different approaches here to defining keywords.
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/docs/graphs/map.json") as dgraph:
    doc = json.load(dgraph)
frame = {
  "@context": {"@vocab": "https://schema.org/"},
  "@explicit": "true",
  "@requireAll": "true",
  "@type":     "Map",
  "keywords": ""
}
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)
print(jd)
jbutils.show_graph(framed)
{
    "@context": {
        "@vocab": "https://schema.org/"
    },
    "@id": "https://example.org/id/XYZ",
    "@type": "Map",
    "keywords": [
        {
            "@id": "http://purl.org/dc/dcmitype/Image",
            "@type": "DefinedTerm",
            "inDefinedTermSet": "http://purl.org/dc/terms/DCMIType",
            "name": "Image",
            "termCode": "Image"
        },
        "Region X",
        {
            "@id": "https://www.wikidata.org/wiki/Q350134",
            "@type": "URL",
            "name": "North Atlantic Ocean",
            "url": "https://www.wikidata.org/wiki/Q350134"
"url": "https://www.wikidata.org/wiki/Q350134"
        }
    ]
}
References#
For dataset we can use SOS Dataset
OBPS group is using JericoS3 API (ref:  https://www.jerico-ri.eu/)
Traditional knowledge points here
sounds like they use dspace
For other document these are likely going to be some schema:CretiveWork with there being many subtypes we can explore.   See also here Adam Leadbetter’s work at Ocean best practices
This is a great start and perhaps helps to highlight why SHACL shapes are useful
https://irishmarineinstitute.github.io/erddap-lint/
https://github.com/earthcubearchitecture-project418/p419dcatservices/blob/master/CHORDS/DataFeed.jsonld
*EMODnet  (Coner Delaney)
ERDAP also
Are we talking links from schema.org that link to OGC and ERDAP services
Are these methods?
Sounds like may link to external metadata for interop they have developed in the community
NOAA connected as well
Interested in OGC assets
ERDAP data platform