Datasets#

About#

Datasets

See also

For OIH the focus is on generic documents which can scope reports, data and other resources. In those cases where the resources being described are of type Dataset you may wish to review patterns developed for GeoScience Datasets by the ESIP Science on Schema community.

Datasets#

Documents will include maps, reports, guidance and other creative works. Due to this OIH will focus on a generic example of schema.org/CreativeWork and then provide examples for more focused creative work examples.

 1{
 2    "@context": {
 3        "@vocab": "https://schema.org/"
 4    },
 5    "@type": "Dataset",
 6    "@id": "https://registry.org/permanentUrlToThisJsonDoc",
 7    "name": "A concise but descriptive name of the dataset",
 8    "description": "An extended, free-text description of what's in the dataset, who created it, and other attributes",
 9    "url": "https://urlToTheDatasetOrLandingPage.org/",
10    "sameAs": [
11        "http://alternativeUrlToTheDatasetOrLandingPage.org"
12    ],
13    "license": "This work is licensed under a  Creative Commons Attribution (CC-BY) 4.0 License",
14    "citation": [
15        "Citation to other work relevant to this dataset",
16        "Citation to other work relevant to this dataset",
17        "Citation to other work relevant to this dataset"
18    ],
19    "version": "2021-04-24T06:34:56.000Z",
20    "keywords": [
21        "Keyword 1",
22        "Keyword 2",
23        "Keyword 3"
24    ],
25    "measurementTechnique": "The URL to or text about the methods, technique or technology used to generate this Dataset",
26    "variableMeasured": [
27        {
28            "@type": "PropertyValue",
29            "name": "Name of a variable in the dataset",
30            "description": "Extended description of this variable"
31        },
32        {
33            "@type": "PropertyValue",
34            "name": "Name of a variable in the dataset",
35            "url": "http://ontology.org/uriToSemanticDescriptorOfThisVariable",
36            "description": "Extended description of this variable?"
37        },
38        {
39            "@type": "PropertyValue",
40            "name": "SamplingDeviceApertureSurfaceArea",
41            "url": "http://ontology.org/uriToSemanticDescriptorOfThisVariable",
42            "description": "Extended description of this variable"
43        }
44    ],
45    "includedInDataCatalog": {
46        "@id": "https://registryOfCatalogs.org/permanentUrlIdentifiyingCatalog",
47        "@type": "DataCatalog",
48        "url": "https://urlOfDataCatalog.org"
49    },
50    "temporalCoverage": "2007/2007",
51    "distribution": {
52        "@type": "DataDownload",
53        "contentUrl": "http://urlToDirectDownloadOfThisDataset.org/",
54        "encodingFormat": "text/csv"
55    },
56    "spatialCoverage": {
57        "@type": "Place",
58        "geo": {
59            "@type": "GeoShape",
60            "polygon": "142.014 10.161667,142.014 18.033833,147.997833 18.033833,147.997833 10.161667,142.014 10.161667"
61        },
62        "additionalProperty": {
63            "@type": "PropertyValue",
64            "propertyID": "http://dbpedia.org/resource/Spatial_reference_system",
65            "value": "http://www.w3.org/2003/01/geo/wgs84_pos#lat_long"
66        }
67    },
68    "provider": [
69        {
70            "@type": "Organization",
71            "legalName": "Legal Name of Organisation which generated the dataset",
72            "name": "Other Name of Organisation which generated the dataset",
73            "url": "https://organisationWebsite.org/"
74        }
75    ],
76    "subjectOf": {
77        "@type": "Event",
78        "description": "Describe the event which is the subject of this dataset. For example, a cruise ID.",
79        "name": "Concise and descriptive name of the Event",
80        "potentialAction": {
81            "@type": "Action",
82            "name": "Concise but descriptive name of action that was part of an Event. For example, the name of a CTD cast",
83            "agent": [
84                "Name or permanent ID of person or thing that performed this action",
85                "Name or permanent ID of person or thing that performed this action",
86                "Name or permanent ID of person or thing that performed this action"
87            ],
88            "startTime": "2007-03-11T14:45UTC",
89            "endTime": "2007-03-11T15:42UTC",
90            "instrument": {
91                "@type": "Thing",
92                "name": "The name of the instrument used in the action. For example, the specific model of a CTD, a glider, a moored sensor",
93                "url": "http://ontology.org/uriToSemanticDescriptorOfThisInstrument",
94                "description": "Extended description of the sampling instrument"
95            }
96        }
97    }
98}

Demo area please ignore#

This area is being used to test out a new repository structure where the data graphs, frames and SHACL shapes are kept in a discrete location.

Hide code cell source
import warnings
with warnings.catch_warnings():
    warnings.filterwarnings("ignore",category=DeprecationWarning)
    
import json
from pyld import jsonld
import os, sys
import urllib
import contextlib

devnull = open(os.devnull, 'w')
contextlib.redirect_stderr(devnull)

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

 
url = "https://raw.githubusercontent.com/iodepo/odis-in/master/dataGraphs/thematics/docs/graphs/map.json"
dgraph = urllib.request.urlopen(url)
doc = json.load(dgraph)

furl = "https://raw.githubusercontent.com/iodepo/odis-in/master/frames/mapFrameID.json"
fgraph = urllib.request.urlopen(furl)
frame = json.load(fgraph)


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/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"
    }
}
../../_images/216ebd94310c36951347e8fa2ea2da162d80031ab1907224462fd0b4fa69d66e.svg