{"id": "e6e4329de00e-0", "text": "Index", "source": "https://book.oceaninfohub.org/genindex.html"}
{"id": "30b004f29c60-0", "text": "Structured Data on the Web#\nAbout#\nStructured data on the web is a way to provide semantics and linked data in an\napproachable manner. This approach expresses concepts in JSON-LD which is a\nJavaScript notation popular among developers which easily expresses concepts\n(terms) and links to related resources (things). This structured data on the\nweb approach has been popularized by the large commercial search providers like\nGoogle, Bing, Yandex and others via schema.org As described at schema.org:\n\u201cSchema.org is a collaborative, community activity with a mission to create,\nmaintain, and promote schemas for structured data on the Internet, on web pages,\nin email messages, and beyond.\u201d\nThe popularity of leveraging the schema.org approach in the earth sciences can\nbe attributed to both this ease of developer adoption and also to its\nfoundational use of web architecture. A web architecture foundation aids\nadoption by the operations side as well as the developer side. It also takes\nadvantage of the scale and resilience of the web.\nThe broad nature of schema.org even scopes to the concepts of Datasets. It is\nthe existence of schema.org/Dataset that was a focus of several EarthCube\nprojects (Project 418, Project 419 and the Resource Registry) from which spun up\nthe ESIP Science on Schema work.\nAdditionally, Google leveraged schema.org/Dataset to develop and populate the", "source": "https://book.oceaninfohub.org/content.html"}
{"id": "30b004f29c60-1", "text": "Additionally, Google leveraged schema.org/Dataset to develop and populate the\nGoogle Data Set Search and provides guidance to developers to facilitate this.\nWeb architecture approach#\nOIH is focused on leveraging the web architecture as the foundation for this\napproach. There are several key reasons for this vs approaches like OAI-PMH or\nothers.\nA key point is that in the processes of establishing a web presence, a standard\nstep for groups, they have already begun to build the infrastructure needed for\nstructured data on the web. Setting up special servers or establishing and\nmaintaining special APIs to support harvesting is not required.\nAlso, a large collection of tooling already exists around JSON that is directly\nusable in JSON-LD. That scale extends to the use of schema.org patterns which\nhave become common in the commercial web. Allowing us to bring those same\npatterns and the tooling to the science community.\nAdditionally, this approach keeps the metadata and its representation a product\nof the data providers. The actor in the life cycle most aware of needed edits,\nnew records or other events. That same record then serves multiple consumers\nable to generate various value add products. This benefits the provider by\nfacilitating multiple and varied discovery vectors for their holdings.\nAnother key factor is the web native and semantic nature of this representation", "source": "https://book.oceaninfohub.org/content.html"}
{"id": "30b004f29c60-2", "text": "Another key factor is the web native and semantic nature of this representation\nof metadata. Traditional metadata, such as ISO, by itself does not express a\nweb referenceable instance of concepts. In doing this, structured data on the\nweb allow connections to be made and discovered by people and machines across\nmany holdings. This aids in both serendipitous discovery and can also be\nleveraged to aid discovery via semantic relations.\nTerminology#\nA CSV file is a text file containing spreadsheet information following a data\nmodel that is encoded using a convention of rows and commas defining columns.\nA JSON-LD fle is a text file containing graph information following the RDF data\nmodel that is encoded using a convention based on JSON syntax.\nJSON-LD is a way to serialize RDF that uses JSON notation. It is really no\ndifferent then than RDF-XML, turtle, n-triples, etc. There are several ways to\nrepresent the RDF data model in text files (and some emerging binary ones like\nCBOR and parquet patterns).\nSchema.org is a vocabulary for describing things similar to DCAT, FOAF, Dublin\nCore. It does this by using RDF as the underlying data model to represent this\n\u201contology\u201d.\nThe confusion comes from the collision of outcomes. JSON-LD came about, partly,\nto allow the use of the RDF data model by a broader audience. This is done by", "source": "https://book.oceaninfohub.org/content.html"}
{"id": "30b004f29c60-3", "text": "to allow the use of the RDF data model by a broader audience. This is done by\nleveraging a more popular notation for the data model, JSON, in the form of\nJSON-LD. Schema.org also wanted to advance the use of structured [meta]data by\nmaking it easier to use and connecting structured data to web pages. At the\nstart, there were three approaches; RDFa, microformats and JSON-LD, to putting\nschema.org in web pages. However, the JSON-LD approach to incorporating this\nstructured data has grown in popularity far beyond the others. As the popularity\nof both JSON-LD and schema.org grew, they often got conflated with each other.\nThe term \u201cstructured data on the web\u201d is perhaps a more neutral way to discuss\nthe use of vocabularies encoding in JSON-LD used in web pages. However, the\nphrase \u201cschema.org\u201d is starting to become the term for \u201cstructured data on the\nweb using JSON-LD as a serialization\u201d. Even in cases where you combine other\nvocabularies such as DCAT with JSON-LD with no schema.org involved, it seems the\nway to convey this is to say: \u201cWe will use the schema.org \u2018pattern\u2019 with DCAT\u201d.\nIt is arguably not the best or most accurate communications strategy. It can", "source": "https://book.oceaninfohub.org/content.html"}
{"id": "30b004f29c60-4", "text": "It is arguably not the best or most accurate communications strategy. It can\nconflate data models, serialization and vocabularies. However, it is concise\nand ubiquitous and not likely to change.\nIntellectual Merit#\nOIH leverages structured data o the web patterns in the form of of\nSchema.org and JSON-LD encoding. This means that much of what is done\nto address OIH implementation by providers also is available both to existing\ncommercial indexing approaches as well as emerging community practices\nAdditionally, both the publishing and indexing approaches are based\non several web architecture patterns. Meaning that existing organization skills\nare leveraged and staff experience is enhanced. This helps to address both\nthe sustainability of the OIH connection and the efficiency of\norganizational operation.\nBroader Impacts#\nBy leveraging existing technology and approaches a larger community is enabled\nto engage and make more samples discoverable and usable.\nThe nature of structured data on the web also provides the ability to apply\nsemantic context to samples. This means richer discovery and information about\nsamples, the past uses and potential future uses is more readily available.\nSimplified architecture also means easier development of tools and interfaces to\npresent the data. Allowing the presentation of samples and their information in\na manner aligned with a given community\u2019s needs. A simplified architecture\naids sustainability from both a technical and financial perspective.", "source": "https://book.oceaninfohub.org/content.html"}
{"id": "51c09fd5c150-0", "text": "Search\n Please activate JavaScript to enable the search\n functionality.\n \n Searching for multiple words only shows matches that contain\n all words.", "source": "https://book.oceaninfohub.org/search.html"}
{"id": "773a8bef920a-0", "text": "The Ocean InfoHub Project#\nIntroduction#\nThe Ocean InfoHub aims to build a sustainable, interoperable, and inclusive digital ecosystem for all Ocean data centres. Existing and emerging data systems are linked, with the ultimate goal of coordinating action and capacity to improve access to Ocean data and knowledge.\nThe following video provide brief high level context to the Ocean InfoHub project.\nBroucher\nOrganizations are increasingly exposing data and resources on the Web. A popular approach to this is using web architecture to expose structured data on the web using the schema.org vocabulary. Doing this makes resources discoverable by a range of organizations leveraging this architecture to build indexes. These include major commercial indexes, large domain focused groups and community focused services.\nThe Ocean Data and Information System (ODIS) will provide a schema.org based interoperability layer and supporting technology to allow existing and emerging ocean data and information systems, from any stakeholder, to interoperate with one another. This will enable and accelerate more effective development and dissemination of digital technology and sharing of ocean data, information, and knowledge. As such, ODIS will not be a new portal or centralized system, but will provide a collaborative solution to interlink distributed systems for common goals. Together with global project partners and partners in the three regions, a process of co-design will enable a number of global and regional nodes to test the proof of concept for the ODIS.", "source": "https://book.oceaninfohub.org/index.html"}
{"id": "773a8bef920a-1", "text": "The ODIS-architecture development is being supported by the Ocean InfoHub Project, and it has been tested initially on IOC and partner databases. However, the system and standards are open for any institution or initiative that is interested in accessing the global data ecosystem to adopt and implement.\nGuidance for the implementation of the ODIS-architecture#\nOIH is providing guidance on the various stages of such an\narchitecture including authoring, publishing, indexing and interfaces.\nThe basics of this approach can be described as:\nProviders publish HTML pages for a resource. This may be a publication, course description, research instrument or other. The core themes for OIH are described in the Authoring section below.\nA HTML page then has a small JSON based snippet added to the HTML. This is\ndescribed in the Including JSON-LD in your resource page in the Publishing\nresource below.\nIf you wish a resource to be included in the OIH index, then you need to\ninclude it in a sitemap file. This is a small XML document that lists links\nto the resources you wish to be part of the index. This approach is shown in\nthe sitemap.xml section of the Publishing resource.\nOnce the above is done the publishing phase is over. At this point, OIH or\nother groups can now access and index your resources. OIH is using some", "source": "https://book.oceaninfohub.org/index.html"}
{"id": "773a8bef920a-2", "text": "other groups can now access and index your resources. OIH is using some\nexisting software to index and generate the graph and expose a simple\nreference interface to them. This software is open and available and others\nare free to implement the approach with other software. Links to other\nsoftware are at the repository.\nThe OIH index/graph and a simple interface is current at a development site\nand in a later phase of OIH a production interface will be developed.\nAdditionally, software to aid in validating and checking the resources is under\ndevelopment and will be available at the repository. This will aid providers\nin expressing the information needed to address interfaces and services of\ninterest to the community.\nThe result is a sustainable architecture to address discovery and access to\nvarious resources published by the community and a shared graph of these\nresources. That shared graph can be used by all members to link and discover\nacross groups.\nKey links to the OIH GitHub repository#\nInterested groups can review material addressing these stages at the OIH GitHub\nrepository. Links and descriptions of these stages are described below.\nAuthoring Thematic Patterns#\nThe ODIS OIH is working across five major thematic areas; Experts and\nInstitutions, Documents, Projects, Training, Vessels. Examples of these\nthematic concepts are being hosted and developed with input from the community.", "source": "https://book.oceaninfohub.org/index.html"}
{"id": "773a8bef920a-3", "text": "thematic concepts are being hosted and developed with input from the community.\nAdditionally, methods for validation and simple tooling for authoring and\ntesting are hosted at this repository. Alongside these five thematic topics\nguidance on connecting services and spatial context on resources.\nPublishing#\nGuidance on implementation the web architecture approach is also available.\nThis includes approaches on leveraging robots.txt and sitemaps.xml file for\nexpressing hosted resources to the net.\nIndexing#\nThe architecture approach is open and standards based. As such, many\norganizations will be able to leverage the authoring and publishing approaches\nabove to index a providers resources. OIH will be providing reference\nimplementations of software that can generate the index.\nInterfaces and Services#\nDuring the development of the OIH a basic reference implementation for an\ninterface has been generated. This is a development site meant to test and\nexercise the above elements. It serves to demonstrate how others could also\nimplement this approach and how future interfaces could be developed.\nAn example of the value of implementing a lightweight can be seen with the\nGovernment of Canada:\nThe Federal Geospatial Platform is a intra-governmental data catalogue\nimplementing the Harmonized North American Profile of ISO 19115 (HNAP), with\ncontent exposed externally via OGC CSW (Catalogue Services Web).\nThis content is harvested by the public facing Open Maps platform, which", "source": "https://book.oceaninfohub.org/index.html"}
{"id": "773a8bef920a-4", "text": "This content is harvested by the public facing Open Maps platform, which\nincludes a catalogue component that is fed in part by the Federal Geospatial\nPlatform. DCAT-based metadata is derived from the original ISO 19115 based\nmetadata. As this markup is recognized by web crawlers such as those hosted by\nGoogle, content is harvested and is subsequently visible through Google\nDataset Search. Furthermore, the cited publication for the data is also link\nvia a complementary link to Google Scholar.", "source": "https://book.oceaninfohub.org/index.html"}
{"id": "25fa20ac1745-0", "text": "Publisher#\nAbout#\nThis page describes the publishing process for structured data\non the web approach OIH will use.\nNote many software packages you are using might already\nimplement this approach. See the section:\nExisting support in software at the bottom of this document.\nSee also\nWe also recommend reviewing the document:\nSchema.org for Research Data Managers: A Primer\nArchitecture Implementation#\nThe Ocean Info Hub (OIH) will leverage structured data on the web and web\narchitecture patterns to expose metadata about resources of interest to the\ncommunity. The primary tasks include:\nAuthoring JSON-LD documents (https://json-ld.org/) aligned with ODIS OIH\nguidance to express the structured metadata for a resource. This step will\nrequire experience with using the existing metadata resources within an\norganization. So any necessary skills needed to access or query existing\nfacility data systems will be needed to assemble the information to populate\nthe JSON-LD data graph. The JSON-LD documents need to be generated using the\ntools/languages at the previous reference or through other means.\nWithin the system architecture of the site, a JSON-LD document needs to be\nplaced into the HTML DOM as a SCRIPT tag within the HEAD tag of each\npublished resource. The SCRIPT tag pattern is:\n", "source": "https://book.oceaninfohub.org/publishing/publishing.html"}
{"id": "25fa20ac1745-1", "text": "\nAdditionally these resources that are marked up with these tags and JSON-LD\ndocuments should be expressed in an XML sitemap file. This should follow the\nguidance at https://www.sitemaps.org/. It should also include a lastmod node\nelement as described at https://www.sitemaps.org/protocol.html which should\nindicate the date the resource metadata was last updated and published to the\nweb.\nThe process of aligning the JSON-LD is iterative at this stage as the OIH\nprofile is evolved. To aid this we can leverage existing validation tools\nincluding JSONSchema, W3C SPARQL and more to communicate structure changes.\nThese tools exist and need only be implemented using knowledge of command\nline environments. The results will then indicate revisions needed in the\nJSON-LD. OIH will provide the necessary templates for the tools to use\nagainst the authored JSON-LD documents.\nInformation on the sources, standards and vocabularies to be used can be found\nat: https://github.com/iodepo/odis-arch/tree/schema-dev/docs\nIncluding JSON-LD in your resource page#\nTo provide detailed and semantically described details on a resource, OIH uses\na JSON-LD snippet or data graph. This small document", "source": "https://book.oceaninfohub.org/publishing/publishing.html"}
{"id": "25fa20ac1745-2", "text": "a JSON-LD snippet or data graph. This small document\nprovides details on the resource. It can also express any explicate\nconnections to other resources an author may wish to express. The semantic\nnature of the document also means that connections may later be discovered\nthrough graph queries.\nPages will need a JSON-LD data graph placed in it via a typed script\ntag/element in the document head element like the following.\n\nAn example data graph can be seen below. However, check the various\nthematic sections for more examples for a given thematic area.\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\",\n \"endDate\": {\n \"@type\": \"http://www.w3.org/2001/XMLSchema#dateTime\"\n },\n \"startDate\": {\n \"@type\": \"http://www.w3.org/2001/XMLSchema#dateTime\"\n }\n },\n \"@id\": \"https://foo.org/url/to/metadata/representation\",\n \"@type\": \"Course\",\n \"description\": \"In this course you will get an introduction to the main tools and ideas in the data scientist's toolbox...\",\n \"hasCourseInstance\": {\n \"@type\": \"CourseInstance\",\n \"courseMode\": [\n \"MOOC\",\n \"online\"", "source": "https://book.oceaninfohub.org/publishing/publishing.html"}
{"id": "25fa20ac1745-3", "text": "\"courseMode\": [\n \"MOOC\",\n \"online\"\n ],\n \"endDate\": \"2019-03-21\",\n \"startDate\": \"2019-02-15\"\n }\n}\nThis example is from the training and courses thematic\nsection. To view all the types\nbeing developed reference\nthe Thematic section.\nThese JSON-LD documents leverage schema.org as the primary vocabulary.\nThe examples in the thematic section provide examples for the various type.\nJSON-LD Tools and References#\nA key resource for JSON-LD can be found at JSON-LD.\nThere is also an interactive playground hosted there. The JSON-LD\nPlayground is useful when testing or\nexploring approaches for JSON-LD data graphs. It will catch basic errors of\nsyntax and use. Note, it will not catch semantic issues such as using\nproperties on types that are out of range. Tools like the Structured Data\nTesting Tool are\nbetter at that. Also the documents and validation material created here OIH\nwill also allow for that sort of testing and feedback.\nProviders may also wish to provide content negotiation for type application/ld+json\nfor these resources. Some indexers, like Gleaner, will attempt to negotiate for\nthe specific serialization and this will likely lighten the load on the servers going forward.", "source": "https://book.oceaninfohub.org/publishing/publishing.html"}
{"id": "25fa20ac1745-4", "text": "the specific serialization and this will likely lighten the load on the servers going forward.\nValidation With SHACL or ShEx#\nTo help facilitate the interconnection of resource, some application focused validation\nwill be developed. Note, this validation does not limit what can be in the graphs.\nRather, it simply provides insight on to how well a given graph can be\nleveraged for a specific application. For this project, the application will\nbe the OIH search portal.\nSome initial development work for this can be found in the\nvalidation directory\nValidation Tools and References#\nSHACL playground\nSchemarama\nSchimatos.org\ndemo\nComparing ShEx and SHACL\nValidation Leveraging JSON Schema#\nWe have been exploring the potential to use JSON Schema combined with various\non-line JSON editors (JSON Schema driven) to provide a potential approach to a\nmore visual editing workflow. The workflow presented here is very ad hoc but\nexposes a potential route a group might take to develop a usable tool. Such a\ntool might, for example, leverage the Electron app dev environment to evolve\nthis approach in a more dedicated tool/manner.\nUse a JSON-LD document (Example) one could\nload this into something like\nthe JSONschema.net tool.\nThe results of the above can then been loaded into the online JSON-Editor at\nhttps://json-editor.github.io/json-editor/. (Ref:", "source": "https://book.oceaninfohub.org/publishing/publishing.html"}
{"id": "25fa20ac1745-5", "text": "https://json-editor.github.io/json-editor/. (Ref:\nhttps://github.com/json-editor/json-editor)\nThe results of this then can be loaded into https://json-ld.org/playground/ to\nvalidate that we have well formed JSON-LD.\nThough this workflow is rather crude and manual it exposes a route to a defined\nworkflow based around established schema that leverages other tools and\nsoftware libraries to generate a workable tool.\nBasics#\nThe basic activity can be seen in the following diagram:\nElements in detail#\nrobots.txt#\nOPTIONAL: Providers may decide to generate or modify their robots.txt\nfile to provide guidance to the aggregators.\nThe plan is to use the Gleaner software (gleaner.io) as well as some\nPython based notebooks and a few other approaches in this test.\nGleaner uses an agent string of EarthCube_DataBot/1.0 and this can be\nused a robots.txt file to specify alternative sitemaps and guidance.\nThis also allows a provider to provide guidance to Google and other potential\nindexers both for allow and disallow directives.\nSitemap: http://samples.earth/sitemap.xml\nUser-agent: *\nCrawl-delay: 4\nAllow: /\nUser-agent: Googlebot\nDisallow: /id\nUser-agent: EarthCube_DataBot/1.0\nAllow: /", "source": "https://book.oceaninfohub.org/publishing/publishing.html"}
{"id": "25fa20ac1745-6", "text": "User-agent: EarthCube_DataBot/1.0\nAllow: /\nSitemap: https://example.org/sitemap.xml\nsitemap.xml#\nProviders will need to expose a set of resource\nlanding pages using a sitemap.xml file. As noted above, providers\ncan expose a sitemap file to just the target agent\nto avoid indexing test pages by commercial providers. You may wish\nto do this during testing or for other reasons. Otherwise,\na sitemap.xml file exposed in general from somewhere in your site is\nperfectly fine.\nInformation on the sitemap structure can be found at sitemaps.org.\nIt is encouraged to use the sitemap lastmod node\nto provide guidance to indexers on page updates.\nAdditionally indexers may test ways to evaluate additions and\nremovals from the sitemap URL set to manage new or removed resources.\n\n\n \n http://samples.earth/sitemap_websites_sampleseaxml\n 2004-10-01T18:23:17+00:00\n \n ", "source": "https://book.oceaninfohub.org/publishing/publishing.html"}
{"id": "25fa20ac1745-7", "text": "\n \n http://samples.easitemap_doclouds_igsndatagraphs.xml\n 2005-01-01\n \n\nFull Workflow#\nThe architecture defines a workflow for objects seen in the above diagram.\nThe documents flow from; authoring, publishing and indexing to\nstorage for the objects and the resulting graph. These resources are\nthen ready for use in search and other functions.\nMoving left to right we can review the image.\nProviders are engaged in the process of developing the OIH example\ndocuments. These provide a profile to follow to represent the semantic\nmetadata. Note, these are not limiters, simply guidance on minimum and\nrecommend elements to address the functional goals of the OIH portal.\nProviders use these documents to generate the JSON-LD data graphs.\nThese can be either static documents or generated and placed in pages\ndynamically with Javascript or server side templates. These are the\nexisting web pages for the resoruces, not enhanced with the\nsemantic metadata snippets in the HTML source.\nThese are published to the web and referenced in the sitemap.xml\ndocument that is also made available. At this point this material is\navailable to anyone who may wish to index it and provide discovery\nfor these resources.", "source": "https://book.oceaninfohub.org/publishing/publishing.html"}
{"id": "25fa20ac1745-8", "text": "available to anyone who may wish to index it and provide discovery\nfor these resources.\nOIH Portal will then index and validate these resources on a\nrecurring bases to maintain a current index. This index will include\nboth the JSON-LD objects and the graph they form. This graph can\nbe used for search, connections and other value add services for the\ncommunity. The graph is also directly available to the community for them\nto use in support of services they may wish to provide.\nExisting support in software#\nMany content management systems other web based data interfaces\nmay already have support for the structured data on the web pattern and\nschema.org specifically. While it is beyond the scope of this project to\ndetail each one, a few starting points for exploration are provided below\nfor some of the more common ones.\nDrupal\nCKAN\nDSpace\nDKAN\nERDDAP (native support)\nOPeNDAP (native support)\nGeoNode\nschema.org issue ref", "source": "https://book.oceaninfohub.org/publishing/publishing.html"}
{"id": "03064d09d0dd-0", "text": "JSON-LD Foundation#\nIntroduction#\nJSON-LD is a way of encoding Linked Data in JSON, the popular data interchange\nformat used by many web APIs. Linked Data is a method of representing information\non the web in a way that allows it to be linked and interconnected with other data.\nThis allows data from different sources to be connected and used together in new\nand powerful ways. JSON-LD uses a standardized syntax to represent Linked Data,\nmaking it easier to integrate with other systems and tools. It is often used to\nadd structured data to web pages, making it easier for search engines and other\napplications to understand and process the information on the page.\nThis document provide a very brief introduction to the JSON-LD serialization format.\nThe JSON-LD website has some detailed material and videos in\ntheir documentation section.\nThe material here is just a brief introduction. For this page we will be using\na simplified version of a CreativeWork document. All the types used by OIH are defined\nby Schema.org types. In this case it is CreativeWork.\nAt the Schema.org site you will find extensive details on what the various types mean and\nthe full range of their properties. For OIH we are defining only a few of these properties\nas of interest in the Thematic section. You are free to use additional\nproperties to describe your resources. It will not cause any issues, however, the OIH interfaces", "source": "https://book.oceaninfohub.org/foundation/foundation.html"}
{"id": "03064d09d0dd-1", "text": "may not leverage them. However, if you feel others would, or you use them yourself, it\u2019s encouraged\nto add them.\nWe will use the following simple JSON-LD document to show the various features of the format.\n 1{\n 2 \"@context\": {\n 3 \"@vocab\": \"https://schema.org/\"\n 4 },\n 5 \"@type\": \"CreativeWork\",\n 6 \"@id\": \"https://example.org/id/XYZ\",\n 7 \"name\": \"Name or title of the document\",\n 8 \"description\": \"Description of the creative work to aid in searching\",\n 9 \"url\": \"https://www.sample-data-repository.org/creativework/report.pdf\"\n10}\nimport json\nfrom pyld import jsonld\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nsys.path.insert(0, currentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/foundation/graphs/simple.json\") as dgraph:\n doc = json.load(dgraph)\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\njbutils.show_graph(compacted)", "source": "https://book.oceaninfohub.org/foundation/foundation.html"}
{"id": "03064d09d0dd-2", "text": "compacted = jsonld.compact(doc, context)\njbutils.show_graph(compacted)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nNote\nA small note on nomenclature. In Schema.org, as in ontologies, the class or type\nnames of Things will be uppercase. So, for example, in the above JSON-LD data graph,\nthis is describing a resource of type CreativeWork. So the type CreativeWork will\nstart with an uppercase letter. The property name is a property of the type and\nproperties like this will be lowercase.\nThe Context#\nThe context is where the terms used in a document are connected to definitions and identifiers for them.\nIf you wish to dive into the details of the context check out the\nW3 JSON-LD 1.1 Recommendations Context section.\nThe context part of this document is highlighted below.\n 1{\n 2 \"@context\": {", "source": "https://book.oceaninfohub.org/foundation/foundation.html"}
{"id": "03064d09d0dd-3", "text": "1{\n 2 \"@context\": {\n 3 \"@vocab\": \"https://schema.org/\"\n 4 },\n 5 \"@type\": \"CreativeWork\",\n 6 \"@id\": \"https://example.org/id/XYZ\",\n 7 \"name\": \"Name or title of the document\",\n 8 \"description\": \"Description of the creative work to aid in searching\",\n 9 \"url\": \"https://www.sample-data-repository.org/creativework/report.pdf\"\n10}\nNote\nThis @context section will be the same for all\nthe documents described in OIH documentation with the exception of the spatial patterns.\nAs justed noted, for the spatial patterns we add in the OGC context\nto all us to use terms from that vocabulary.\nBelow we can see the addition of the geosparql context in line 4 and the use of the vocabulary, using the defined geosparql: prefix in lines 9, 11 and 15.\nIf we wanted to use other vocabularies like DCAT or FOAF, we would add them to the context with a\nprefix and then the vocabulary namespace. We could then use terms from that vocabulary in our document\nfollowing the same prefix:term pattern.\n 1{\n 2 \"@context\": {\n 3 \"@vocab\": \"https://schema.org/\",", "source": "https://book.oceaninfohub.org/foundation/foundation.html"}
{"id": "03064d09d0dd-4", "text": "3 \"@vocab\": \"https://schema.org/\",\n 4 \"geosparql\": \"http://www.opengis.net/ont/geosparql#\"\n 5 },\n 6 \"@id\": \"https://example.org/id/XYZ\",\n 7 \"@type\": \"Dataset\",\n 8 \"name\": \"Data set name\",\n 9 \"geosparql:hasGeometry\": {\n10 \"@type\": \"http://www.opengis.net/ont/sf#Point\",\n11 \"geosparql:asWKT\": {\n12 \"@type\": \"http://www.opengis.net/ont/geosparql#wktLiteral\",\n13 \"@value\": \"POINT(-76 -18)\"\n14 },\n15 \"geosparql:crs\": {\n16 \"@id\": \"http://www.opengis.net/def/crs/OGC/1.3/CRS84\"\n17 }\n18 }\n19}\n20 \nGraph#\nThe next section we will discuss is the graph part of the document seen in lines 5-9 below. This is where the properties and\nvalues of our resource are described.\n 1{\n 2 \"@context\": {\n 3 \"@vocab\": \"https://schema.org/\"\n 4 },", "source": "https://book.oceaninfohub.org/foundation/foundation.html"}
{"id": "03064d09d0dd-5", "text": "3 \"@vocab\": \"https://schema.org/\"\n 4 },\n 5 \"@type\": \"CreativeWork\",\n 6 \"@id\": \"https://example.org/id/XYZ\",\n 7 \"name\": \"Name or title of the document\",\n 8 \"description\": \"Description of the creative work to aid in searching\",\n 9 \"url\": \"https://www.sample-data-repository.org/creativework/report.pdf\"\n10}\nFirst though, let\u2019s visit a couple special properties in our\ndocument.\nNode identifiers (@id)#\n 1{\n 2 \"@context\": {\n 3 \"@vocab\": \"https://schema.org/\"\n 4 },\n 5 \"@type\": \"CreativeWork\",\n 6 \"@id\": \"https://example.org/id/XYZ\",\n 7 \"name\": \"Name or title of the document\",\n 8 \"description\": \"Description of the creative work to aid in searching\",\n 9 \"url\": \"https://www.sample-data-repository.org/creativework/report.pdf\"\n10}\nThe first special property is the @id property. This is the identifier for the top level node in the\ngraph and is typically the identifier for the record.\nNote", "source": "https://book.oceaninfohub.org/foundation/foundation.html"}
{"id": "03064d09d0dd-6", "text": "graph and is typically the identifier for the record.\nNote\nIt should be noted this is the not the ID for the object being described but rather the record itself.\nIf you are describing a dataset with a DOI, for example, the @id is not that DOI. Rather it is the\nID, potentially the URL, for the metadata record about that dataset. Your dataset ID would be included\nin the metadata record using the the identifier property.\nIt\u2019s good practice to ensure all your records have an @id property. If there is no value then the\nresource is identified by what is known as a blank node. Such identifiers do not allowing use in\na Linked Open Data approach and are generally not recommended.\nThe @id should be the URL for the metadata record itself. Not the HTML page the record is in. However,\nthese might be the same if use use content negotiation to select between HTML and JSON-LD representations\nof the record.\nType identifiers (@type)#\n 1{\n 2 \"@context\": {\n 3 \"@vocab\": \"https://schema.org/\"\n 4 },\n 5 \"@type\": \"CreativeWork\",\n 6 \"@id\": \"https://example.org/id/XYZ\",\n 7 \"name\": \"Name or title of the document\",\n 8 \"description\": \"Description of the creative work to aid in searching\",", "source": "https://book.oceaninfohub.org/foundation/foundation.html"}
{"id": "03064d09d0dd-7", "text": "8 \"description\": \"Description of the creative work to aid in searching\",\n 9 \"url\": \"https://www.sample-data-repository.org/creativework/report.pdf\"\n10}\nThe next property to focus on is the @type property. This describes the type of record we are describing.\nNote\nIn Schema.org and in most vocabularies, types will be named with a capitol letter. Properties on these\ntypes will be all lower case. So, CreateWork, as a type, starts with a upper case C. Then, name, as\na property on the CreateWork type, starts with a lower case n.\nFor OIH these type for the various thematic profiles are defined in the documentation for the types.\nOther properties#\nAt this point we can return to look at the other properties for our type.\n 1{\n 2 \"@context\": {\n 3 \"@vocab\": \"https://schema.org/\"\n 4 },\n 5 \"@type\": \"CreativeWork\",\n 6 \"@id\": \"https://example.org/id/XYZ\",\n 7 \"name\": \"Name or title of the document\",\n 8 \"description\": \"Description of the creative work to aid in searching\",\n 9 \"url\": \"https://www.sample-data-repository.org/creativework/report.pdf\"", "source": "https://book.oceaninfohub.org/foundation/foundation.html"}
{"id": "03064d09d0dd-8", "text": "10}\nAs noted, we are using Schema.org type for OIH. In this case, as mentioned,\nthis is type CreativeWork. So any of the properties\nseen at the Schema.org site can be used. The key properties of value to the OIH implementation can then\nbe found, for this type, in the Documents thematic type.\nFor the OIH implementation, we will use the following properties as core properties we\nwant all OIH documents to have. These include:\nname: The name of the document or item being described\ndescription: A description of the document or item being described\nurl: A URL for the document or item being described.\nDomain and range#\nThe domain of a property identifies the type of object it can be applied to.\nSo if the domain of a property like schema.org/knowsAbout\nis Person and Organization. Then that property can only be used on those types.\nFor example, it would not be correct to use knowsAbout on a resource of type Dataset.\nThe range of a property identifies the type of object the property can point to. In\nthe case of knowAbout, we see its range as Text, Thing or URL. This means the property\ncan point to a Text, Thing or URL object.\nIn schema.org, the domain will be identified as \u201cUsed on these types\u201d, and the", "source": "https://book.oceaninfohub.org/foundation/foundation.html"}
{"id": "03064d09d0dd-9", "text": "In schema.org, the domain will be identified as \u201cUsed on these types\u201d, and the\nrange will be identified as \u201cValues expected to be one of these types\u201d. You can see\nthis at the schema.org/knowsAbout page.\nThing and DataType#\nThe Thing and Datatype types\nare two special types we should mention. Thing is the upper level and most generic\ntype in schema.org. Everything in schema.org is descended from Thing. So when\nknowsAbout says its range includes Thing, it means you can use any type in schema.org\nas the value of that property.\nDataType is the basic data type Thing in schema.org and is a subclass of rdfs:Class.\nA DataType includes things like Integers, Strings, DateTime, etc. So, using again\nknowsAbout, we see the range includes not only Thing by also the DataTypes Text\nand URL, where URL is actually a sub-type of Text.", "source": "https://book.oceaninfohub.org/foundation/foundation.html"}
{"id": "7036d2f026bc-0", "text": "Thematic Patterns#\nIntroduction#\nThese thematic patterns are managed by OIH and the community to add in the discovery and use\nof ocean related resources. The patterns are simple examples of Schema.org types, with a focus\non the properties and type relations of value to the Ocean InfoHub and the community it engages.\nThese \u201cprofiles\u201d provide both a starting point for new users and a catalysis for discussion and\nextension with the community.\nThematic Profiles#\nThese profiles represent a reference implementation of schema.org Types\nrelated to the identified ODIS thematic areas. They provide a set of minimal elements\nand notes on more detailed elements.\nThese are not final and will evolve with community input. As this process moves forward we will implement\nversioning of the profiles to provide stable implementations providers can reliably leverage in their workflows.\nCore Profiles#\nSix key categories of interest:\nExperts and Institutions\nDocuments\nSpatial Maps\nProjects\nTraining\nVessels\nSupporting Profiles#\nIn support of these five thematic types above, these cross cutting types and properties were\nselected for attention. They represent some key patterns people may wish to leverage when\ndescribing their resources.\nSpatial Geometry\nServices\nTerm Lists\nLanguages\nLinking to Principles\nIdentifier Patterns\nSee also\nFor OIH the focus is on generic documents which can scope reports, data and other resources.", "source": "https://book.oceaninfohub.org/thematics/index.html"}
{"id": "7036d2f026bc-1", "text": "For OIH the focus is on generic documents which can scope reports, data and other resources.\nIn those cases where the resources being described are of type Dataset you may wish to review\npatterns developed for GeoScience Datasets by the ESIP\nScience on Schema community.", "source": "https://book.oceaninfohub.org/thematics/index.html"}
{"id": "620f23f4014c-0", "text": "Training#\nAbout#\nA thematic type to describe potential training activities. In Schema.org a Course\nis a subtype of CreativeWork and LearningResource.\nAs defined from https://schema.org/Course:\nCourse: A description of an educational course which may be offered as distinct\ninstances at which take place at different times or take place at different\nlocations, or be offered through different media or modes of study. An\neducational course is a sequence of one or more educational events and/or\ncreative works which aims to build knowledge, competence or ability of learners.\nWe can start by looking at a basic Course description.\nSimple Course#\nA basic course might simply present the name and description of the course along\nwith a few other key properties.\n 1{\n 2 \"@context\": {\n 3 \"@vocab\": \"https://schema.org/\"\n 4 },\n 5 \"@id\": \"https://example.org/id/course/2\",\n 6 \"@type\": \"Course\",\n 7 \"courseCode\": \"SD100\",\n 8 \"name\": \"Structured Data\",\n 9 \"description\": \"An introduction to authoring JSON-LD documents for OIH\",\n10 \"provider\": {\n11 \"@type\": \"Organization\",\n12 \"name\": \"Example University\",", "source": "https://book.oceaninfohub.org/thematics/training/index.html"}
{"id": "620f23f4014c-1", "text": "11 \"@type\": \"Organization\",\n12 \"name\": \"Example University\",\n13 \"@id\": \"https://grid.ac/institutes/grid.475727.4\",\n14 \"description\": \"UN Department of Economic and Social Affairs Sustainable Development\"\n15 }\n16}\nimport json\nfrom pyld import jsonld\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/training/graphs/course2.json\") as dgraph:\n doc = json.load(dgraph)\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\njbutils.show_graph(compacted)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document", "source": "https://book.oceaninfohub.org/thematics/training/index.html"}
{"id": "620f23f4014c-2", "text": "Here we can see the emphasized line 7 and lines 10-15 highlighting some\nunique types.\ncourseCode:\nThe courseCode is used to provide the ID used by the provider for this course.\nprovider:\nThe provider is the organization offering the course.\nThis property is from the CreativeWork supertype. In this case the provider may\nbe of type Organization or Person. For Ocean InfoHub these would be described in\nthe Experts and Institutions section.\nNote\nIn this case you can see we use a simple @id in the provider property. You can\nsee this same @id used in the Experts and Institutions section.\nBy doing this, we connect this provider to the Organization described by that document.\nAs such these will be connected in the graph. So there is no need to duplicate\nthe information here. This is a common graph pattern that allows us to simply\nconnect resources. If there was no existing Organization or Person resource you could\nsimply create one here. However, you may also find it useful to create a given\nresource and link to it in the graph.\nDetailed Course#\nThere are a wide range of properties that can be used to describe a course.\nMany of these can be seen at the Course type as\nthe properties from Course and properties\nfrom LearningResource.", "source": "https://book.oceaninfohub.org/thematics/training/index.html"}
{"id": "620f23f4014c-3", "text": "the properties from Course and properties\nfrom LearningResource.\nWe wont go into the details of each property here, but we will show a couple.\nThe example below present two.\n 1{\n 2 \"@context\": {\n 3 \"@vocab\": \"https://schema.org/\",\n 4 \"endDate\": {\n 5 \"@type\": \"http://www.w3.org/2001/XMLSchema#dateTime\"\n 6 },\n 7 \"startDate\": {\n 8 \"@type\": \"http://www.w3.org/2001/XMLSchema#dateTime\"\n 9 }\n10 },\n11 \"@id\": \"https://example.org/id/course/2\",\n12 \"@type\": \"Course\",\n13 \"courseCode\": \"SD100\",\n14 \"name\": \"Structured Data\",\n15 \"description\": \"An introduction to authoring JSON-LD documents for OIH\",\n16 \"teaches\": \"JSON-LD\",\n17 \"provider\": {\n18 \"@type\": \"Organization\",\n19 \"name\": \"Example University\",\n20 \"@id\": \"https://grid.ac/institutes/grid.475727.4\",\n21 \"description\": \"UN Department of Economic and Social Affairs Sustainable Development\"\n22 },\n23 \"hasCourseInstance\": [\n24 {", "source": "https://book.oceaninfohub.org/thematics/training/index.html"}
{"id": "620f23f4014c-4", "text": "22 },\n23 \"hasCourseInstance\": [\n24 {\n25 \"@type\": \"CourseInstance\",\n26 \"courseMode\": [\n27 \"MOOC1\",\n28 \"online\"\n29 ],\n30 \"endDate\": \"2019-03-21\",\n31 \"startDate\": \"2019-02-15\",\n32 \"attendee\": {\n33 \"@type\": \"Person\",\n34 \"name\": \"Jane Doe\",\n35 \"jobTitle\": \"Professor\",\n36 \"telephone\": \"(425) 123-4567\",\n37 \"url\": \"http://www.janedoe.com\",\n38 \"identifier\": {\n39 \"@id\": \"ID_value_string\",\n40 \"@type\": \"PropertyValue\",\n41 \"propertyID\": \"This can be text or URL for an ID like ORCID\",\n42 \"url\": \"https://foo.org/linkToPropertyIDPage\",\n43 \"description\": \"Optional description of the ID\"\n44 }\n45 }\n46 },\n47 {\n48 \"@type\": \"CourseInstance\",\n49 \"courseMode\": [\n50 \"MOOC2\",\n51 \"online\"\n52 ],\n53 \"endDate\": \"2019-05-21\",", "source": "https://book.oceaninfohub.org/thematics/training/index.html"}
{"id": "620f23f4014c-5", "text": "52 ],\n53 \"endDate\": \"2019-05-21\",\n54 \"startDate\": \"2019-04-15\"\n55 }\n56 ]\n57}\nimport json\nfrom pyld import jsonld\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/training/graphs/course1.json\") as dgraph:\n doc = json.load(dgraph)\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\njbutils.show_graph(compacted)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nLine 16 shows the teaches property. It\nshould be noted while this propery can point to simple text, it is", "source": "https://book.oceaninfohub.org/thematics/training/index.html"}
{"id": "620f23f4014c-6", "text": "should be noted while this propery can point to simple text, it is\nalso possible to leverage DefinedTerm. This\nmeans a controlled vocabulary can be used to describe what the course\nteaches. Ocean InfoHub provides some more information and links to further\ninformation on defined term in\nthe Keywords and Defined Terms section.\nLines 23-56 show using a hasCourseInstance\nproperty to show instances where this course is being taught. Also of note\nin this example are the lines 4-9 in the context where we can type the\nendDate and startDate as type dateTime. By doing this we must provide the\ndates in a format that is in line with the [XML Datatype] and in particular the\nISO 8601 Data and Time Formats.\nBy doing this we can then later conduct searches on the graph that use date ranges\nto allow us to find courses, or any resources, that are being taught in a\ngiven time period.\nReferences#\nRDA Education and Training on handling of research data IG\nDC Tabular Application Profiles (DC TAP) - Primer\nhttps://www.w3.org/TR/xmlschema11-2/\nUse YYYY-MM-DDThh:mm:ss or YYYY-MM-DD\nhttp://www.marinetraining.eu/\nExample page\nhttps://oceanexpert.org/\nExample page\nOCTO\nhttps://oceansummerschools.iode.org/", "source": "https://book.oceaninfohub.org/thematics/training/index.html"}
{"id": "620f23f4014c-7", "text": "Example page\nOCTO\nhttps://oceansummerschools.iode.org/\nhttps://octogroup.org/webinars/\nhttps://catalogue.odis.org/search/type=16\nhttps://clmeplus.org/", "source": "https://book.oceaninfohub.org/thematics/training/index.html"}
{"id": "8a5cdb3d240f-0", "text": "Languages#\nAbout#\nJSON-LD fully support the identification of the language types. For the canonical\nguide refernece JSON-LD 1.1 Language-indexing section.\nProperties such as label, description, keyword and others can be\nextended in the context with a container language attribute notation.\nFor example:\n{\n \"@context\": \"https://schema.org/\",\n \"@type\": \"Person\",\n \"name\": {\"@value\": \"Jane Doe\",\"@language\": \"en\"},\n \"jobTitle\": \"Professor\",\n \"telephone\": \"(425) 123-4567\",\n \"url\": \"http://www.janedoe.com\"\n}\nShows the name Jane Doe as typed english.\nUse standard language codes (fr, es, en, de, etc) to\nbe used when describing these properties. A list of codes can be seen\nat the [Online Browsing Platform (OBP)](https://www.iso.org/obp/ui/#search and)\nand Popular standards ISO 3166 Country Codes.\nAdditional use the 2-letter codes is demonstrated below.\n 1{\n 2 \"@context\": {\n 3 \"vocab\": \"http://example.com/vocab/\",\n 4 \"label\": {\n 5 \"@id\": \"vocab:label\",\n 6 \"@container\": \"@language\"", "source": "https://book.oceaninfohub.org/thematics/languages/languages.html"}
{"id": "8a5cdb3d240f-1", "text": "6 \"@container\": \"@language\"\n 7 }\n 8 },\n 9 \"@id\": \"http://example.com/queen\",\n10 \"label\": {\n11 \"en\": \"The Queen\",\n12 \"de\": [ \"Die K\u00f6nigin\", \"Ihre Majest\u00e4t\" ]\n13 }\n14 }\nimport json\nfrom pyld import jsonld\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/languages/graphs/language.json\") as dgraph:\n doc = json.load(dgraph)\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\njbutils.show_graph(compacted)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document", "source": "https://book.oceaninfohub.org/thematics/languages/languages.html"}
{"id": "8a5cdb3d240f-2", "text": "Fontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nIn graph space the resulting triples from the above are:\n \"Die K\u00f6nigin\"@de .\n \"Ihre Majest\u00e4t\"@de .\n \"The Queen\"@en .\nwith language encoding attributes in place. These can be used in\nsearching and result filters.\nNote, this can cause issues in query space since the concept of\n\"Semua orang dilahirkan merdeka dan mempunyai martabat dan hak-hak yang sama. \nMereka dikaruniai akal dan hati nurani dan hendaknya bergaul satu \nsama lain dalam semangat persaudaraan.\"\nand\n\"Semua orang dilahirkan merdeka dan mempunyai martabat \ndan hak-hak yang sama. Mereka dikaruniai akal dan hati nurani \ndan hendaknya bergaul satu sama lain dalam semangat persaudaraan.\"@id", "source": "https://book.oceaninfohub.org/thematics/languages/languages.html"}
{"id": "8a5cdb3d240f-3", "text": "are different and so care must be taken the creation of the SPARQL\nqueries not to accidentally imposed implicate filters through the use\nof language types.\nWhen trying to note the language of a distribution, the approach is a bit different.\nHere we are not noting the encoding of the literal value in a record. Rather, we are\nproviding information about a remote resource. So for example:\n\"distribution\": [\n {\n \"@type\": \"DataDownload\",\n \"contentUrl\": \"https://www.example-data-repository.org/dataset/3300/data/larval-krill.tsv\",\n \"encodingFormat\": \"text/tab-separated-values\",\n \"datePublished\": \"2010-02-03\",\n \"inLanguage\": \"de\"\t\n }\n ],\nThe above snippet is using the schema.org/inLanguage property to note the resources is in German.\nMultiple distributions with multiple languages would look like\n\"distribution\": [\n {\n \"@type\": \"DataDownload\",\n \"contentUrl\": \"https://www.example-data-repository.org/dataset/3300/data/larval-krill_de.tsv\",\n \"encodingFormat\": \"text/tab-separated-values\",\n \"datePublished\": \"2010-02-03\",\n \"inLanguage\": \"de\"\t\n },\n {", "source": "https://book.oceaninfohub.org/thematics/languages/languages.html"}
{"id": "8a5cdb3d240f-4", "text": "\"inLanguage\": \"de\"\t\n },\n {\n \"@type\": \"DataDownload\",\n \"contentUrl\": \"https://www.example-data-repository.org/dataset/3300/data/larval-krill_en.tsv\",\n \"encodingFormat\": \"text/tab-separated-values\",\n \"datePublished\": \"2010-02-03\",\n \"inLanguage\": \"en\"\t\n }\n ],\nThere is also the schema.org/knowsLanguage for use on other types like Person and Organization.\nThere you could use the short form like:\n\"knowsLanguage\" : \"de\"\nor a more detailed approach like:\n\"knowsLanguage\" : {\n \"@type\": \"Language\",\n \"name\": \"Spanish\",\n \"alternateName\": \"es\"\n }", "source": "https://book.oceaninfohub.org/thematics/languages/languages.html"}
{"id": "da55b7db904d-0", "text": "Licenses#\nSchema.org License#\nhttps://schema.org/license\nURL\nCreativeWork\nLicense as URL - Good#\n{\n \"@context\": \"https://schema.org/\",\n \"license\": \"https://creativecommons.org/licenses/by/4.0/\"\n}\nLicense as CreativeWork - Better?#\n{\n \"@context\": \"https://schema.org/\",\n \"license\": {\n \"@type\": \"CreativeWork\",\n \"name\": \"Creative Commons Attribution 4.0\",\n \"url\": \"https://creativecommons.org/licenses/by/4.0/\"\n }\n}\nLicense as SPDX URL - Best#\nUse a simple URL\nSPDX creates URLs for many licenses including those that don\u2019t have URLs\nFrom a source that harvesters can rely on (e.g. use URL to lookup more information about the license)\n{\n \"@context\": \"https://schema.org/\",\n \"license\": \"https://spdx.org/licenses/CC-BY-4.0\"\n}\nOR, include both the SPDX and the Creative Commons URLs in an array:\n{\n \"@context\": \"https://schema.org/\",\n \"license\": [\"https://spdx.org/licenses/CC-BY-4.0\", \"https://creativecommons.org/licenses/by/4.0/\"]\n}", "source": "https://book.oceaninfohub.org/thematics/license/index.html"}
{"id": "f0ccbd6bb72c-0", "text": "Spatial Geometry#\nAbout#\nFor spatial geometry Ocean InfoHub guidance will be to use the OGC GeoSPARQL\nvocabulary to express geometry using Well Known Text (WKT). The schema.org spatial types and propeties are not well\ndefined and difficult at times to reliably translate to geometries for use in more Open Geospatial Consortium (OGC)\nenvironments.\nSimple GeoSPARQL WKT#\nThe following is a simple example of how to embed a WKT string via GeoSPARQL into a JSON-LD record.\nWell Know Text (WKT) is a OGC standard referenced at: https://www.ogc.org/standards/wkt-crs.\nA more accessible description and set of examples can be found at WikiPedia:\nWell-known text representation of geometry.\n 1{\n 2 \"@context\": {\n 3 \"@vocab\": \"https://schema.org/\",\n 4 \"geosparql\": \"http://www.opengis.net/ont/geosparql#\"\n 5 },\n 6 \"@id\": \"https://example.org/id/XYZ\",\n 7 \"@type\": \"Dataset\",\n 8 \"name\": \"Data set name\",\n 9 \"geosparql:hasGeometry\": {\n10 \"@type\": \"http://www.opengis.net/ont/sf#Point\",", "source": "https://book.oceaninfohub.org/thematics/spatial/index.html"}
{"id": "f0ccbd6bb72c-1", "text": "10 \"@type\": \"http://www.opengis.net/ont/sf#Point\",\n11 \"geosparql:asWKT\": {\n12 \"@type\": \"http://www.opengis.net/ont/geosparql#wktLiteral\",\n13 \"@value\": \"POINT(-76 -18)\"\n14 },\n15 \"geosparql:crs\": {\n16 \"@id\": \"http://www.opengis.net/def/crs/OGC/1.3/CRS84\"\n17 }\n18 }\n19}\nLine 4 declare the GeoSPARQL prefix for the vocabulary that we will leverage in this document.\nLines 9-17 are the GeoSPARQL node and property definitions. In this case our type is a simple\npoint geometry. We then go on to declare the asWKT with a type and value. The value\nis our actual WKT string for our geometry. We can further\ndeclare the coordinate reference system (CRS) of the geometry using the crs property.\nimport json\nfrom pyld import jsonld\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils", "source": "https://book.oceaninfohub.org/thematics/spatial/index.html"}
{"id": "f0ccbd6bb72c-2", "text": "sys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/spatial/graphs/basic.json\") as dgraph:\n doc = json.load(dgraph)\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\njbutils.show_graph(compacted)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nWKT Bounding Box#\nNote that WKT doesn\u2019t directly have a bounding box, in that case you\nwould need to use a polygon. The following is an example of a WKT string:", "source": "https://book.oceaninfohub.org/thematics/spatial/index.html"}
{"id": "f0ccbd6bb72c-3", "text": "would need to use a polygon. The following is an example of a WKT string:\nPOLYGON((45.066730529474505 2.6430807905900235,47.395832091974505 2.6430807905900235,47.395832091974505 0.3588601145746598,45.066730529474505 0.3588601145746598,45.066730529474505 2.6430807905900235))\nThis following the pattern:\n'POLYGON(x1 y1, x1 y2, x2 y2, x2 y1, x1 y1)'\nClassic Schema.org#\nOcean InfoHub only recommends the use of Schema.org spatial geometries in\nthe case where a provider wishes to be properly indexed by Google and to have the\nspatial information used by Google for maps. Note, the lack of spatial information will\nnot prevent Google from indexing your resources.\nSchema.org spatial geometries are not well defined in comparison to OGC standards and\nrecommendations. Also, converting from Schema.org spatial to geometries in WKT or GeoJSON\ncan be problematic. There are inconsistencies with\nSchema.org guidance for textual geometry representation and that of Well\nKnown Text (WKT).\nThat said, if you desire to leverage Schema.org geometries an example follows. This", "source": "https://book.oceaninfohub.org/thematics/spatial/index.html"}
{"id": "f0ccbd6bb72c-4", "text": "That said, if you desire to leverage Schema.org geometries an example follows. This\nis a simple example of the existing Schema.org pattern for a lat long value. There is the\npending GeospatialGeometry which is a\ntype Intangible (and not Place referenced by spatialCoverage). This will be a\nsubtype of GeoShape.\nSchema.org spatial relations are guided by DE-9IM.\n 1{\n 2 \"@context\": {\n 3 \"@vocab\": \"https://schema.org/\"\n 4 },\n 5 \"@id\": \"https://example.org/id/XYZ\",\n 6 \"@type\": \"Dataset\",\n 7 \"name\": \"Data set name\",\n 8 \"spatialCoverage\": {\n 9 \"@type\": \"Place\",\n10 \"geo\": {\n11 \"@type\": \"GeoCoordinates\",\n12 \"latitude\": 39.3280,\n13 \"longitude\": 120.1633\n14 }\n15 }\n16}\nimport json\nfrom pyld import jsonld\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils", "source": "https://book.oceaninfohub.org/thematics/spatial/index.html"}
{"id": "f0ccbd6bb72c-5", "text": "sys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/spatial/graphs/sos.json\") as dgraph:\n doc = json.load(dgraph)\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\njbutils.show_graph(compacted)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nOption review, SOS Issue 105#\nThere are several approaches to expressing spatial geometries in JSON-LD.\nWhile Ocean InfoHub will recommend the use of GeoSPARQL, it is worth noting that there\nare alternative and solid cases for using them\nOne such case could be the case where your WKT geometry string are highly detailed and\nas a result quite long. These might result in both very large JSON-LD documents that are hard to", "source": "https://book.oceaninfohub.org/thematics/spatial/index.html"}
{"id": "f0ccbd6bb72c-6", "text": "read and maintain. It may also be that this imparts a performance penalty in your GeoSPARQL\nqueries.\nIt may be tha that you simplify your WKT geometry strings to a more basic form. Then link out\nto the detailed geometry in a separate document. The simplified WKT (or Schema.org spatial)\nmake the documents smaller and easier to read and could help query performance. The resource\ncan then point to a dereferencable URL for the detailed geometry.\nref Selfie: When linking out to complex geometries we recommend following: https://docs.ogc.org/per/20-067.html\nFrom the referenced SOS issue 105:\n 1{\n 2 \"@context\": {\n 3 \"@version\": 1.1,\n 4 \"geoblob\": {\n 5 \"@id\": \"http://example.com/vocab/json\",\n 6 \"@type\": \"@json\"\n 7 },\n 8 \"rdf\": \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\",\n 9 \"rdfs\": \"http://www.w3.org/2000/01/rdf-schema#\",\n10 \"xsd\": \"http://www.w3.org/2001/XMLSchema#\",\n11 \"description\": \"http://igsn.org/core/v1/description\",", "source": "https://book.oceaninfohub.org/thematics/spatial/index.html"}
{"id": "f0ccbd6bb72c-7", "text": "11 \"description\": \"http://igsn.org/core/v1/description\",\n12 \"geosparql\": \"http://www.opengis.net/ont/geosparql#\",\n13 \"schema\": \"https://schema.org/\"\n14 },\n15 \"@id\": \"https://samples.earth/id/do/bqs2dn2u6s73o70jdup0\",\n16 \"@type\": \"http://igsn.org/core/v1/Sample\",\n17 \"description\": \"A fake ID for testing\",\n18 \"schema:subjectOf\": [\n19 {\n20 \"schema:url\": \"https://samples.earth/id/do/bqs2dn2u6s73o70jdup0.geojson\",\n21 \"@type\": \"schema:DigitalDocument\",\n22 \"schema:format\": [\n23 \"application/vnd.geo+json\"\n24 ],\n25 \"schema:conformsTo\": \"https://igsn.org/schema/spatial.schema.json\"\n26 }\n27 ],\n28 \"geosparql:hasGeometry\": {\n29 \"@id\": \"_:N98e75cacc29f40deb555eb583cb162dc\",\n30 \"@type\": \"http://www.opengis.net/ont/sf#Point\",\n31 \"geosparql:asWKT\": {", "source": "https://book.oceaninfohub.org/thematics/spatial/index.html"}
{"id": "f0ccbd6bb72c-8", "text": "31 \"geosparql:asWKT\": {\n32 \"@type\": \"http://www.opengis.net/ont/geosparql#wktLiteral\",\n33 \"@value\": \"POINT(-76 -18)\"\n34 },\n35 \"geosparql:crs\": {\n36 \"@id\": \"http://www.opengis.net/def/crs/OGC/1.3/CRS84\"\n37 }\n38 },\n39 \"geoblob\": {\n40 \"type\": \"GeometryCollection\",\n41 \"geometries\": [{\n42 \"type\": \"Point\",\n43 \"coordinates\": [-76, -18]\n44 }]\n45 },\n46 \"schema:spatialCoverage\": {\n47 \"@type\": \"schema:Place\",\n48 \"schema:geo\": {\n49 \"@type\": \"schema:GeoCoordinates\",\n50 \"schema:latitude\": -18,\n51 \"schema:longitude\": -76\n52 }\n53 }\n54}\nimport json\nfrom pyld import jsonld\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils", "source": "https://book.oceaninfohub.org/thematics/spatial/index.html"}
{"id": "f0ccbd6bb72c-9", "text": "sys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/spatial/graphs/issue105.json\") as dgraph:\n doc = json.load(dgraph)\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\njbutils.show_graph(compacted)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nReferences#\nGeoAPI at GitHub\nScience on Schema Issue 105\nLeverages subjectOf to connect to a Thing / CreativeWork\nhttps://www.unsalb.org/\nhttps://www.un.org/geospatial/\nschema.org/spatial\nschema.org/GeospatialGeometry\nSOS patern follows:\nspatialCoverage -> Place -> geo -> GeoCoordinates OR GeoShape\nSome groups are using GeoNode\nschema.org issues\nICAN & Schema.org\nOGC SELFIE\nThink broad", "source": "https://book.oceaninfohub.org/thematics/spatial/index.html"}
{"id": "f0ccbd6bb72c-10", "text": "schema.org issues\nICAN & Schema.org\nOGC SELFIE\nThink broad\nScience on Schema spatial for dataset guidance", "source": "https://book.oceaninfohub.org/thematics/spatial/index.html"}
{"id": "aba36012010d-0", "text": "Service#\nAbout#\nThis section will provide information on the service type. This is not\none of the main OIH types. However, we will provide guidance here on describing\nservices using schema.org.\nIt should be noted that this might be a simple link to an OpenAPI or some\nother descriptor document. Also, schema.org is not rich enough for complex\ndescriptions and itself borrows from the Hydra\nvocabulary. It may be required to leverage Hydra if complex descriptions are\nneeded.\nThe graph describes a service than can be invoked with:\ncurl --data-binary \"@yourfile.jpg\" -X POST https://us-central1-top-operand-112611.cloudfunctions.net/function-1\nThis with POST a jpeg to the service and get back a simple text response with some information\nabout the image.\n 1{\n 2 \"@context\": {\n 3 \"@vocab\": \"https://schema.org/\"\n 4 },\n 5 \"@type\": \"Service\",\n 6 \"@id\": \"URL: Optional. A URL that resolves to *this* JSON-LD document, NOT the URL of the Service that this JSON-LD document describes. To link to the Service itself, please use 'url' and/or 'identifier')\",\n 7 \"aggregateRating\": {\"@type\": \"https://schema.org/aggregateRating\"},", "source": "https://book.oceaninfohub.org/thematics/services/index.html"}
{"id": "aba36012010d-1", "text": "8 \"areaServed\": [\n 9 \"Text: The geographic area where the service is provided.\",\n10 {\"@type\": \"https://schema.org/Place\"},\n11 {\"@type\": \"https://schema.org/GeoShape\"},\n12 {\"@type\": \"https://schema.org/AdministrativeArea\"}\n13 ],\n14 \"audience\": {\"@type\": \"https://schema.org/Audience\"},\n15 \"availableChannel\": {\"@type\": \"https://schema.org/ServiceChannel\"},\n16 \"award\": \"Text: An award won by or for this service.\",\n17 \"brand\": [\n18 \"Text: The brand(s) associated with the service, or the brand(s) maintained by an organization or business person.\",\n19 {\"@type\": \"https://schema.org/Brand\"},\n20 {\"@type\": \"https://schema.org/Organization\"}\n21 ],\n22 \"broker\": [\n23 {\"@type\": \"https://schema.org/Person\"},\n24 {\"@type\": \"https://schema.org/Organization\"}\n25 ],\n26 \"category\": [\n27 \"Text: A category for the service.\",\n28 \"URL\",\n29 {\"@type\": \"https://schema.org/CategoryCode\"},", "source": "https://book.oceaninfohub.org/thematics/services/index.html"}
{"id": "aba36012010d-2", "text": "29 {\"@type\": \"https://schema.org/CategoryCode\"},\n30 {\"@type\": \"https://schema.org/PhysicalActivityCategory\"},\n31 {\"@type\": \"https://schema.org/Thing\"}\n32 ],\n33 \"hasOfferCatalog\": \"https://schema.org/OfferCatalog\",\n34 \"hoursAvailable\": \"https://schema.org/OpeningHoursSpecification\",\n35 \"isRelatedTo\": [\n36 {\"@type\": \"https://schema.org/Product\"},\n37 {\"@type\": \"https://schema.org/Service\"}\n38 ] ,\n39 \"isSimilarTo\": [\n40 {\"@type\": \"https://schema.org/Product\"},\n41 {\"@type\": \"https://schema.org/Service\"}\n42 ] ,\n43 \"logo\": [\n44 {\"@type\": \"https://schema.org/ImageObject\"},\n45 \"URL\"\n46 ] ,\n47 \"offers\": [\n48 {\"@type\": \"https://schema.org/Demand\"},\n49 {\"@type\": \"https://schema.org/Offer\"}\n50 ] ,\n51 \"provider\": [\n52 \"Text: The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider.\",", "source": "https://book.oceaninfohub.org/thematics/services/index.html"}
{"id": "aba36012010d-3", "text": "53 {\"@type\": \"https://schema.org/Person\"},\n54 {\"@type\": \"https://schema.org/Organization\"}\n55 ],\n56 \"providerMobility\": \"Text: Indicates the mobility of a provided service (e.g. 'static', 'dynamic').\",\n57 \"review\": {\"@type\": \"https://schema.org/Review\"},\n58 \n59 \"serviceOutput\": {\"@type\": \"https://schema.org/Thing\"},\n60 \"serviceType\": [\n61 \"Text: Human-readable terms of service documentation\",\n62 {\"@type\": \"https://schema.org/GovernmentBenefitsType\"}\n63 ],\n64 \"slogan\": \"Text: A slogan or motto associated with the item.\",\n65 \"termsOfService\": [\n66 \"Text: Human-readable terms of service documentation\",\n67 {\"@type\": \"https://schema.org/Url\"}\n68 ],\n69\n70 \n71 \"additionalType\": [\n72 \"Text: An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax.\",\n73 \"URL\"\n74 ],\n75 \"alternateName\": \"Text: An alternative name for this Thing.\",\n76 \"description\": \"Text: Free text which describes this Thing.\",", "source": "https://book.oceaninfohub.org/thematics/services/index.html"}
{"id": "aba36012010d-4", "text": "76 \"description\": \"Text: Free text which describes this Thing.\",\n77 \"disambiguatingDescription\": \"Text: A sub property of description. A short description of the item used to disambiguate from other, similar items. Information from other properties (in particular, name) may be necessary for the description to be useful for disambiguation\",\n78 \"identifier\": [\n79 {\"@type\": \"https://schema.org/PropertyValue\"},\n80 \"Text - The identifier property represents any kind of identifier for any kind of Thing, such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See background notes for more details.\",\n81 \"URL\"\n82 ],\n83 \"image\": [\n84 \"URL\",\n85 {\"@type\": \"https://schema.org/ImageObject\"}\n86 ],\n87 \"mainEntityOfPage\": [\n88 \"URL\",\n89 {\"@type\": \"https://schema.org/CreativeWork\"}\n90 ],\n91 \"name\": \"Text: The name of the item.\",\n92 \"potentialAction\": {\"@type\": \"https://schema.org/Action\"},\n93 \"sameAs\": \"URL\",\n94 \"subjectOf\": \"URL\",", "source": "https://book.oceaninfohub.org/thematics/services/index.html"}
{"id": "aba36012010d-5", "text": "93 \"sameAs\": \"URL\",\n94 \"subjectOf\": \"URL\",\n95 \"url\": \"URL - the URL to the item described by this JSON-LD document\"\n96}\nimport json\nfrom pyld import jsonld\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/services/graphs/service.json\") as dgraph:\n doc = json.load(dgraph)\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\njbutils.show_graph(compacted)\n---------------------------------------------------------------------------\nNameError Traceback (most recent call last)\n/tmp/ipykernel_3668524/3307491376.py in \n 16 \n 17 compacted = jsonld.compact(doc, context)\n---> 18 jbutils.show_graph(compacted)\n~/src/Projects/OIH/odis-arch/bookRev1/lib/jbutils.py in show_graph(doc, size)\n 44 for edge in rdf:\n 45 subj = short_name(edge['subject'])\n---> 46 obj = short_name(edge['object'])", "source": "https://book.oceaninfohub.org/thematics/services/index.html"}
{"id": "aba36012010d-6", "text": "---> 46 obj = short_name(edge['object'])\n 47 pred = short_name(edge['predicate'])\n 48 if subj and obj and pred:\n~/src/Projects/OIH/odis-arch/bookRev1/lib/jbutils.py in short_name(value, max_length)\n 22 # If the URL is too long, hide it\n 23 if len(short_url) > max_length:\n---> 24 pieces = split_uri(short_url)\n 25 return join_uri(pieces[0], '...')\n 26 else:\nNameError: name 'split_uri' is not defined\nReferences#\nhttps://schema.org/docs/actions.html\nhttps://schema.org/Action\nhttps://www.w3.org/TR/web-share/\nhttps://www.hydra-cg.com/spec/latest/core/", "source": "https://book.oceaninfohub.org/thematics/services/index.html"}
{"id": "41d3c415a507-0", "text": "Experts and Institutions#\nAbout#\nThis thematic type provides a way to describe the experts and institutions.\nIn this case the following definitions are used:\nExpert: A person who has a deep understanding of a particular subject area.\nInstitution: A group of people working together to provide a particular service.\nExample: Person Graph#\nThe following graph present a basic record we might use for a person.\nWe will break down some of the key properties used in this graph.\nAs Ocean InfoHub is levergaing Schema.org we are\nusing schema.org/Person for this type.\nAny of the properties of Person seen there are valid to use in such a record.\nWhile publishers are free to use as many elements as they wish, our goal\nwith this documentation is provide a simple example that address some of the search\nand discovery goals of OIH along with those properties most useful in the linking\nof resources between OIH participants.\n 1{\n 2 \"@context\": {\n 3 \"@vocab\": \"https://schema.org/\"\n 4 },\n 5 \"@id\": \"https://example.org/id/x\",\n 6 \"@type\": \"Person\",\n 7 \"name\": \"Jane Doe\",\n 8 \"jobTitle\": \"Professor\",\n 9 \"workLocation\": {\n10 \"@type\": \"Place\",", "source": "https://book.oceaninfohub.org/thematics/expinst/index.html"}
{"id": "41d3c415a507-1", "text": "9 \"workLocation\": {\n10 \"@type\": \"Place\",\n11 \"address\": \"54 Ocean Drive, 23521 Ocean City, CountryName\",\n12 \"name\": \"Place name\"\n13 },\n14 \"telephone\": \"(425) 123-4567\",\n15 \"url\": \"http://www.janedoe.com\",\n16 \"knowsAbout\": [\n17 {\n18 \"@type\": \"Text\",\n19 \"description\": \"Invasive species in brackish water\"\n20 },\n21 {\n22 \"@type\": \"URL\",\n23 \"url\": \"https://www.wikidata.org/wiki/Q183368\"\n24 },\n25 {\n26 \"@id\": \"https://example.org/id/course/x\",\n27 \"@type\": \"Course\",\n28 \"description\": \"In this course ...\",\n29 \"url\": \"URL to the course\"\n30 }\n31 ],\n32 \"identifier\": {\n33 \"@id\": \"https://orcid.org/0000-0002-2257-9127\",\n34 \"@type\": \"PropertyValue\",\n35 \"propertyID\": \"https://registry.identifiers.org/registry/orcid\",", "source": "https://book.oceaninfohub.org/thematics/expinst/index.html"}
{"id": "41d3c415a507-2", "text": "35 \"propertyID\": \"https://registry.identifiers.org/registry/orcid\",\n36 \"url\": \"https://orcid.org/0000-0002-2257-9127\",\n37 \"description\": \"Optional description of this record...\"\n38 },\n39 \"nationality\": [\n40 {\n41 \"@type\": \"Country\",\n42 \"name\": \"Fiji\"\n43 },\n44 {\n45 \"@type\": \"DefinedTerm\",\n46 \"url\": \"https://unece.org/trade/cefact/unlocode-code-list-country-and-territory\",\n47 \"inDefinedTermSet\": \"UN/LOCODE Code List by Country and Territory\",\n48 \"name\": \"Fiji\",\n49 \"termCode\": \"FJ\"\n50 }\n51 ],\n52 \"knowsLanguage\": {\n53 \"@type\": \"Language\",\n54 \"name\": \"Spanish\",\n55 \"alternateName\": \"es\"\n56 }\n57}\nimport json\nfrom pyld import jsonld\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils", "source": "https://book.oceaninfohub.org/thematics/expinst/index.html"}
{"id": "41d3c415a507-3", "text": "sys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../book/thematics/expinst/graphs/person.json\") as dgraph:\n doc = json.load(dgraph)\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\njbutils.show_graph(compacted)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nDetails: Identifier#\nFor each profile there are a few key elements we need to know about. One\nkey element is what the authoritative reference or canonical identifier is for\na resource.\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))", "source": "https://book.oceaninfohub.org/thematics/expinst/index.html"}
{"id": "41d3c415a507-4", "text": "import os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/expinst/graphs/person.json\") as dgraph:\n doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@type\": \"Person\",\n \"identifier\": \"\"\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {", "source": "https://book.oceaninfohub.org/thematics/expinst/index.html"}
{"id": "41d3c415a507-5", "text": "{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://example.org/id/x\",\n \"@type\": \"Person\",\n \"identifier\": {\n \"@id\": \"https://orcid.org/0000-0002-2257-9127\",\n \"@type\": \"PropertyValue\",\n \"description\": \"Optional description of this record...\",\n \"propertyID\": \"https://registry.identifiers.org/registry/orcid\",\n \"url\": \"https://orcid.org/0000-0002-2257-9127\"\n }\n}\nDetails: nationality#\nNationality provide connections to languages a person is\nconnected with. The property, schema.org/nationality,\nis used to present that. In the OIH we need to state what the semantics of\nnationality are for our use case.\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils", "source": "https://book.oceaninfohub.org/thematics/expinst/index.html"}
{"id": "41d3c415a507-6", "text": "sys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/expinst/graphs/person.json\") as dgraph:\n doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@type\": \"Person\",\n \"nationality\": \"\"\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },", "source": "https://book.oceaninfohub.org/thematics/expinst/index.html"}
{"id": "41d3c415a507-7", "text": "\"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://example.org/id/x\",\n \"@type\": \"Person\",\n \"nationality\": [\n {\n \"@type\": \"Country\",\n \"name\": \"Fiji\"\n },\n {\n \"@type\": \"DefinedTerm\",\n \"inDefinedTermSet\": \"UN/LOCODE Code List by Country and Territory\",\n \"name\": \"Fiji\",\n \"termCode\": \"FJ\",\n \"url\": \"https://unece.org/trade/cefact/unlocode-code-list-country-and-territory\"\n }\n ]\n}\nNote\nThe visual above demonstrates an issue that can be seen in several of the graph. Where we\ndon\u2019t use an @id the graph will be represented as a \u201cblank node\u201d.\nThese will be uniquely identified in the graph, however, in the construction of the visual\nthis is a common blank node and results in the double arrows pointing to an underscore.\nThis is a visualization issue and not a proper representation of the graph structure.\nDetails: knowsLanguage#\nKnows about provide connections to languages a person is\nconnected with. The property, schema.org/knowsLanguage,\nis used to present that. Multiple languages can be expressed using the JSON", "source": "https://book.oceaninfohub.org/thematics/expinst/index.html"}
{"id": "41d3c415a507-8", "text": "is used to present that. Multiple languages can be expressed using the JSON\narray [] syntax.\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/expinst/graphs/person.json\") as dgraph:\n doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@type\": \"Person\",\n \"knowsLanguage\": \"\"\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)", "source": "https://book.oceaninfohub.org/thematics/expinst/index.html"}
{"id": "41d3c415a507-9", "text": "print(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://example.org/id/x\",\n \"@type\": \"Person\",\n \"knowsLanguage\": {\n \"@type\": \"Language\",\n \"alternateName\": \"es\",\n \"name\": \"Spanish\"\n }\n}\nDetails: Knows About#\nKnows about provide connections to resources a person is\nconnected with. The property, schema.org/knowsAbout,\ncan connect a Person or Organization to Text, URL or any Thing type.\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld", "source": "https://book.oceaninfohub.org/thematics/expinst/index.html"}
{"id": "41d3c415a507-10", "text": "from pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/expinst/graphs/person.json\") as dgraph:\n doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@type\": \"Person\",\n \"knowsAbout\": \"\"\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document", "source": "https://book.oceaninfohub.org/thematics/expinst/index.html"}
{"id": "41d3c415a507-11", "text": "Fontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://example.org/id/x\",\n \"@type\": \"Person\",\n \"knowsAbout\": [\n {\n \"@type\": \"Text\",\n \"description\": \"Invasive species in brackish water\"\n },\n {\n \"@type\": \"URL\",\n \"url\": \"https://www.wikidata.org/wiki/Q183368\"\n },\n {\n \"@id\": \"https://example.org/id/course/x\",\n \"@type\": \"Course\",\n \"description\": \"In this course ...\",\n \"url\": \"URL to the course\"\n }\n ]\n}\nExample: Institution Graph#\nHere we have an example of an data graph for type schema.org/Organization.\nFor the identifier we are using the a GRID, but this could also be something like a ROR.\n 1{\n 2 \"@context\": {\n 3 \"@vocab\": \"https://schema.org/\"\n 4 },\n 5 \"@id\": \"https://index.example.org/id/org/x\",", "source": "https://book.oceaninfohub.org/thematics/expinst/index.html"}
{"id": "41d3c415a507-12", "text": "5 \"@id\": \"https://index.example.org/id/org/x\",\n 6 \"@type\": \"Organization\",\n 7 \"address\": {\n 8 \"@type\": \"PostalAddress\",\n 9 \"addressLocality\": \"Paris, France\",\n10 \"postalCode\": \"F-75002\",\n11 \"streetAddress\": \"38 avenue de l'Opera\"\n12 },\n13 \"location\": {\n14 \"@type\": \"Place\",\n15 \"address\": \"38 avenue de l'Opera, F-75002, Paris, France\",\n16 \"name\": \"Paris\"\n17 },\n18 \"email\": \"secretariat(at)example.org\",\n19 \"name\": \"Organization X\",\n20 \"description\": \"Description of org ...\",\n21 \"telephone\": \"( 33 1) 42 68 53 00\",\n22 \"url\": \"https://example.org/\",\n23 \"member\": [\n24 {\n25 \"@id\": \"https://example.org/id/org/1\",\n26 \"@type\": \"Organization\",\n27 \"name\": \"Organization A\",\n28 \"description\": \"Org A is a potential parent organization of Org X\"\n29 },\n30 {", "source": "https://book.oceaninfohub.org/thematics/expinst/index.html"}
{"id": "41d3c415a507-13", "text": "29 },\n30 {\n31 \"@id\": \"https://orcid.org/0000-0002-2257-9127\",\n32 \"@type\": \"Person\"\n33 }\n34 ],\n35 \"identifier\": {\n36 \"@id\": \"https://grid.ac/institutes/grid.475727.4\",\n37 \"@type\": \"PropertyValue\",\n38 \"description\": \"UN Department of Economic and Social Affairs Sustainable Development\",\n39 \"propertyID\": \"https://registry.identifiers.org/registry/grid\",\n40 \"url\": \"https://grid.ac/institutes/grid.475727.4\"\n41 }\n42}\nOn the property membership#\nLine 18-29 show the inclusion of a schema.org/member\nproperty. There are issues to note here both for consumers (aggregators) and\nproviders (publishers). The Person type is show connected simply on a type and\nid. This provides the cleanest connection. If a member is added by type and id, as\nin the case of the \u201cOrganization A\u201d link, there is the problem of additional triples\nbeing added. Here, the name and description properties are going to add triples to the\nOIH KG. In so doing, we run the risk or adding potentially un-authoritative information.", "source": "https://book.oceaninfohub.org/thematics/expinst/index.html"}
{"id": "41d3c415a507-14", "text": "The aggregator doesn\u2019t know if triples here are or are not provided by an actor\nauthoritative for those properties. This could be addresses with framing or validation\nworkflows, or ignored. The prov elements stored could be leveraged to later track\ndown sources, but don\u2019t provide further information on the issue of authority.\nIt is recommended that best practice is to attempt to link only on ids (with a type in\nall cases) where possible. If you are connecting with a type, do not provide additional\nproperties. In cases where such an id can not be provided, you may wish to fill out\nbasic properties you can provide with confidence.\nimport json\nfrom pyld import jsonld\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/expinst/graphs/organization.json\") as dgraph:\n doc = json.load(dgraph)\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\njbutils.show_graph(compacted)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document", "source": "https://book.oceaninfohub.org/thematics/expinst/index.html"}
{"id": "41d3c415a507-15", "text": "Fontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nDetails: Indentifier#\nFor each profile there are a few key elements we need to know about. One\nkey element is what the authoritative reference or canonical identifier is for\na resource.\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/expinst/graphs/organization.json\") as dgraph:\n doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@requireAll\": \"true\",\n \"@type\": \"Organization\",\n \"identifier\": \"\"\n}\ncontext = {", "source": "https://book.oceaninfohub.org/thematics/expinst/index.html"}
{"id": "41d3c415a507-16", "text": "\"identifier\": \"\"\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://index.example.org/id/org/x\",\n \"@type\": \"Organization\",\n \"identifier\": {\n \"@id\": \"https://grid.ac/institutes/grid.475727.4\",\n \"@type\": \"PropertyValue\",\n \"description\": \"UN Department of Economic and Social Affairs Sustainable Development\",\n \"propertyID\": \"https://registry.identifiers.org/registry/grid\",", "source": "https://book.oceaninfohub.org/thematics/expinst/index.html"}
{"id": "41d3c415a507-17", "text": "\"propertyID\": \"https://registry.identifiers.org/registry/grid\",\n \"url\": \"https://grid.ac/institutes/grid.475727.4\"\n }\n}\nReferences#\nschema:Person\nscheme:Organization\nScience on Schema Repository\nhttps://oceanexpert.org/\nExample page expert\nExample page institution\nOcean Expert: reference: Adam Leadbetter", "source": "https://book.oceaninfohub.org/thematics/expinst/index.html"}
{"id": "193e34d54de9-0", "text": "Vessels#\nAbout#\nOIH is exploring how we might leverage schema.org to describe research vessels.\nNote that schema.org is a very broad vocabulary and as such specific concepts\nlike research vessel is not well aligned to current types.\nIn Schema.org the type Vehicle is described as a device that is designed\nor used to transport people or cargo over land, water, air, or through space.\nWe have used this broad scoping to cover research vessels. We could go on to\nconnect this type then to a descriptive property in a concept such as\nthe WikiData entry for Research Vessel, Q391022.\nWe may also wish to leverage some of the approaches in Keywords and Defined Terms.\nOur goal is to use schema.org as a simple upper level vocabulary that allows\nus to describe research vessels in a simple manner and then connect to more\ndetailed information on them.\nSo the goal here is to show how we can use schema.org as a discovery layer\nand then link more directly to detailed institutional metadata records.\nThis may also leverage the approaches similar to what is shown in\nthe Publishing Principles resources.\nObserving Infrastructure in general represents an interesting challenge. A\nspecified infrastructure could be referenced as a ResearchProject within Schema.org,\nthough other types would be explored. One could also build off the base Thing class,\nparent to all Schema.org types, then leverage the property schema.org/instrument, itself", "source": "https://book.oceaninfohub.org/thematics/vessels/index.html"}
{"id": "193e34d54de9-1", "text": "parent to all Schema.org types, then leverage the property schema.org/instrument, itself\nof type Thing. This approach provides an initial starting point to build out the\napproach.\nIt should be noted that schema.org/Observation also exists but can only\ncurrently be used with the property schema.org/diseaseSpreadStatistics.\nHowever, if seen useful, there is the potential to connect Observation back to a\ntype of Infrastructure that does not currently exist in Schema.org but could be\nproposed.\nAddressing the challenge of Observation Infrastructure, and\npotentially revisiting the current OIH type Vessel, may involve engagement with\nSchema.org itself, something they encourage.\n 1{\n 2 \"@context\": {\n 3 \"@vocab\": \"https://schema.org/\"\n 4 },\n 5 \"@id\": \"https://example.org/id/X\",\n 6 \"@type\": \"Vehicle\",\n 7 \"name\": \"JOIDES Resolution\",\n 8 \"identifier\": {\n 9 \"@id\": \"https://example.org/id/vessel/X\",\n10 \"@type\": \"PropertyValue\",\n11 \"propertyID\": \"https://en.wikipedia.org/wiki/IMO_number\",\n12 \"url\": \"https://example.org/id/vessel/X\",\n13 \"description\": \"Vessel ID \"\n14 },", "source": "https://book.oceaninfohub.org/thematics/vessels/index.html"}
{"id": "193e34d54de9-2", "text": "13 \"description\": \"Vessel ID \"\n14 },\n15 \"countryOfLastProcessing\": \"Angola\",\n16 \"countryOfOrigin\": {\n17 \"@type\": \"Country\",\n18 \"name\": \"Fiji\"\n19 },\n20 \"additionalProperty\": {\n21 \"@id\": \"ID_value_string\",\n22 \"@type\": \"PropertyValue\",\n23 \"propertyID\": \"https://en.wikipedia.org/wiki/IMO_number\",\n24 \"url\": \"https://foo.org/linkToPropertyIDPage\",\n25 \"description\": \"Any additional properties for the vessel\"\n26 },\n27 \"subjectOf\": {\n28 \"@type\": \"DataDownload\",\n29 \"name\": \"external-metadata.xml\",\n30 \"description\": \"Metadata describing the vessel\",\n31 \"encodingFormat\": [\n32 \"application/xml\",\n33 \"https://foo.org/ship01\"\n34 ],\n35 \"dateModified\": \"2019-06-12T14:44:15Z\"\n36 }\n37}\nimport json\nfrom pyld import jsonld\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils", "source": "https://book.oceaninfohub.org/thematics/vessels/index.html"}
{"id": "193e34d54de9-3", "text": "sys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/vessels/graphs/ship.json\") as dgraph:\n doc = json.load(dgraph)\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\njbutils.show_graph(compacted)\n---------------------------------------------------------------------------\nNameError Traceback (most recent call last)\n/tmp/ipykernel_3668912/1146838844.py in \n 17 \n 18 compacted = jsonld.compact(doc, context)\n---> 19 jbutils.show_graph(compacted)\n~/src/Projects/OIH/odis-arch/bookRev1/lib/jbutils.py in show_graph(doc, size)\n 45 subj = short_name(edge['subject'])\n 46 obj = short_name(edge['object'])\n---> 47 pred = short_name(edge['predicate'])\n 48 if subj and obj and pred:\n 49 # Apply different styles to the nodes based on whether they're\n~/src/Projects/OIH/odis-arch/bookRev1/lib/jbutils.py in short_name(value, max_length)\n 22 # If the URL is too long, hide it", "source": "https://book.oceaninfohub.org/thematics/vessels/index.html"}
{"id": "193e34d54de9-4", "text": "22 # If the URL is too long, hide it\n 23 if len(short_url) > max_length:\n---> 24 pieces = split_uri(short_url)\n 25 return join_uri(pieces[0], '...')\n 26 else:\nNameError: name 'split_uri' is not defined\nDetails: Indentifier#\nFor each profile there are a few key elements we need to know about. One\nkey element is what the authoritative reference or canonical identifier is for\na resource.\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/vessels/graphs/ship.json\") as dgraph:\n doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@requireAll\": \"true\",\n \"@type\": \"Vehicle\",", "source": "https://book.oceaninfohub.org/thematics/vessels/index.html"}
{"id": "193e34d54de9-5", "text": "\"@requireAll\": \"true\",\n \"@type\": \"Vehicle\",\n \"identifier\": \"\"\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://example.org/id/X\",\n \"@type\": \"Vehicle\",\n \"identifier\": {\n \"@id\": \"https://example.org/id/vessel/X\",\n \"@type\": \"PropertyValue\",\n \"description\": \"Vessel ID \",\n \"propertyID\": \"https://en.wikipedia.org/wiki/IMO_number\",", "source": "https://book.oceaninfohub.org/thematics/vessels/index.html"}
{"id": "193e34d54de9-6", "text": "\"propertyID\": \"https://en.wikipedia.org/wiki/IMO_number\",\n \"url\": \"https://example.org/id/vessel/X\"\n }\n}\nDetails: subjectOf#\nLike SOS, we are recommending the use of subjectOf to link a simple\nSchema.org type to a more detailed metadata description record. This\nallows us to use the easy discovery layer in Schema.org but connect to\ndomain specific metadata records.\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/vessels/graphs/ship.json\") as dgraph:\n doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@requireAll\": \"true\",\n \"@type\": \"Vehicle\",\n \"subjectOf\": \"\"\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}", "source": "https://book.oceaninfohub.org/thematics/vessels/index.html"}
{"id": "193e34d54de9-7", "text": "}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://example.org/id/X\",\n \"@type\": \"Vehicle\",\n \"subjectOf\": {\n \"@type\": \"DataDownload\",\n \"dateModified\": \"2019-06-12T14:44:15Z\",\n \"description\": \"Metadata describing the vessel\",\n \"encodingFormat\": [\n \"application/xml\",\n \"https://foo.org/ship01\"\n ],", "source": "https://book.oceaninfohub.org/thematics/vessels/index.html"}
{"id": "193e34d54de9-8", "text": "\"application/xml\",\n \"https://foo.org/ship01\"\n ],\n \"name\": \"external-metadata.xml\"\n }\n}\nReferences#\nICES\nPOGO\nEurOcean\nhttps://vocab.nerc.ac.uk/search_nvs/C17/\nSeaDataNet\nMarine Facilities Planner\nEuroFleets\nIdentifiers to use include NOCD Code, Call Sign, ICES Shipcode, MMSI Code, IMO Code", "source": "https://book.oceaninfohub.org/thematics/vessels/index.html"}
{"id": "46be8daf939d-0", "text": "Projects#\nAbout#\nProject: An enterprise (potentially individual but typically\ncollaborative), planned to achieve a particular aim. Use properties from\nOrganization, subOrganization/parentOrganization to indicate project sub-structures.\nResearch Project#\nThis is what a basic research project data graph might look like. We have\nthe full record below, but this shows some of the basics we would be\nlooking for.\nThis type is based on the Schema.org type Project which\nhas a sub-type of ResearchProject.\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/projects/graphs/proj.json\") as dgraph:\n doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@requireAll\": \"true\",\n \"@type\": \"ResearchProject\",\n \"legalName\": \"\",\n \"name\": \"\",", "source": "https://book.oceaninfohub.org/thematics/projects/index.html"}
{"id": "46be8daf939d-1", "text": "\"legalName\": \"\",\n \"name\": \"\",\n \"url\": \"\",\n \"description\": \"\",\n \"identifier\": {} \n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://example.org/id/resproj/X\",\n \"@type\": [\n \"ResearchProject\",\n \"PropertyValue\"\n ],\n \"description\": \"Repo description ... \",\n \"identifier\": {\n \"@id\": \"https://grid.ac/institutes/grid.475727.4\",", "source": "https://book.oceaninfohub.org/thematics/projects/index.html"}
{"id": "46be8daf939d-2", "text": "\"@id\": \"https://grid.ac/institutes/grid.475727.4\",\n \"@type\": \"PropertyValue\",\n \"description\": \"UN Department of Economic and Social Affairs Sustainable Development\",\n \"propertyID\": \"https://registry.identifiers.org/registry/grid\",\n \"url\": \"https://grid.ac/institutes/grid.475727.4\"\n },\n \"legalName\": \"Example Data Repository\",\n \"name\": \"ExDaRepo\",\n \"url\": [\n \"https://dio.org/id/XYZ\",\n \"https://www.example-data-repository.org\"\n ]\n}\nDetails: Identifier#\nFor each profile there are a few key elements we need to know about. One\nkey element is what the authoritative reference or canonical identifier is for\na resource.\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/projects/graphs/proj.json\") as dgraph:", "source": "https://book.oceaninfohub.org/thematics/projects/index.html"}
{"id": "46be8daf939d-3", "text": "doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@requireAll\": \"true\",\n \"@type\": \"ResearchProject\",\n \"identifier\": \"\"\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://example.org/id/resproj/X\",\n \"@type\": [\n \"ResearchProject\",\n \"PropertyValue\"\n ],\n \"identifier\": {", "source": "https://book.oceaninfohub.org/thematics/projects/index.html"}
{"id": "46be8daf939d-4", "text": "\"ResearchProject\",\n \"PropertyValue\"\n ],\n \"identifier\": {\n \"@id\": \"https://grid.ac/institutes/grid.475727.4\",\n \"@type\": \"PropertyValue\",\n \"description\": \"UN Department of Economic and Social Affairs Sustainable Development\",\n \"propertyID\": \"https://registry.identifiers.org/registry/grid\",\n \"url\": \"https://grid.ac/institutes/grid.475727.4\"\n }\n}\nFull Research Project#\nHere is what our full record looks like. We have added in several\nmore nodes to cover things like funding source, policy connections,\nspatial area served and parent organization.\n 1{\n 2 \"@context\": {\n 3 \"@vocab\": \"https://schema.org/\"\n 4 },\n 5 \"@type\": \"ResearchProject\",\n 6 \"@id\": \"https://example.org/id/resproj/X\",\n 7 \"legalName\": \"Example Data Repository\",\n 8 \"name\": \"ExDaRepo\",\n 9 \"url\": \"https://www.example-data-repository.org\",\n 10 \"description\": \"Repo description ... \",\n 11 \"logo\": {\n 12 \"@type\": \"ImageObject\",", "source": "https://book.oceaninfohub.org/thematics/projects/index.html"}
{"id": "46be8daf939d-5", "text": "11 \"logo\": {\n 12 \"@type\": \"ImageObject\",\n 13 \"url\": \"https://www.example-data-repository.org/logo.jpg\"\n 14 },\n 15 \"identifier\": {\n 16 \"@id\": \"https://grid.ac/institutes/grid.475727.4\",\n 17 \"@type\": \"PropertyValue\",\n 18 \"description\": \"UN Department of Economic and Social Affairs Sustainable Development\",\n 19 \"propertyID\": \"https://registry.identifiers.org/registry/grid\",\n 20 \"url\": \"https://grid.ac/institutes/grid.475727.4\"\n 21 },\n 22 \"contactPoint\": {\n 23 \"@id\": \"https://www.example-data-repository.org/about-us\",\n 24 \"@type\": \"ContactPoint\",\n 25 \"name\": \"Support\",\n 26 \"email\": \"info@example-data-repository.org\",\n 27 \"url\": \"https://www.example-data-repository.org/about-us\",\n 28 \"contactType\": \"customer support\"\n 29 },\n 30 \"funder\": {\n 31 \"@type\": \"FundingAgency\",\n 32 \"@id\": \"https://dx.doi.org/10.13039/10000001\",", "source": "https://book.oceaninfohub.org/thematics/projects/index.html"}
{"id": "46be8daf939d-6", "text": "33 \"name\": \"National Science Foundation\",\n 34 \"legalName\": \"National Science Foundation\",\n 35 \"alternateName\": \"NSF\",\n 36 \"url\": \"https://www.nsf.gov/\",\n 37 \"identifier\": {\n 38 \"@id\": \"https://example.org/id/resproj/X\",\n 39 \"@type\": \"PropertyValue\",\n 40 \"propertyID\": \"https://registry.identifiers.org/registry/doi\",\n 41 \"value\": \"DOI value expressed as doi:{doi}\",\n 42 \"url\": \"https://dio.org/id/XYZ\"\n 43 }\n 44 },\n 45 \"funding\": [\n 46 {\n 47 \"@id\": \"{odo:hasAward -> odo:osprey_page}\",\n 48 \"@type\": \"MonetaryGrant\",\n 49 \"url\": \"http://www.someinstitute.edu\",\n 50 \"name\": \"{odo:hasAward -> odo:hasAwardNumber}\",\n 51 \"identifier\": \"{odo:hasAward -> odo:hasAwardNumber}\",\n 52 \"funder\": [\n 53 {\n 54 \"@id\": \"https://dx.doi.org/10.13039/10000001\"\n 55 },\n 56 {", "source": "https://book.oceaninfohub.org/thematics/projects/index.html"}
{"id": "46be8daf939d-7", "text": "55 },\n 56 {\n 57 \"@type\": \"FundingAgency\",\n 58 \"name\": \"Some other org\",\n 59 \"url\": \"https://example.funder.org/\"\n 60 }\n 61 ]\n 62 }\n 63 ],\n 64 \"ethicsPolicy\": {\n 65 \"@type\": \"CreativeWork\",\n 66 \"@id\": \"https://example.org/id/XYZ\",\n 67 \"name\": \"Name or title of the document\",\n 68 \"description\": \"Description of the creative work \",\n 69 \"url\": \"https://www.foo.org/creativework/ethicsPolicy.pdf\"\n 70 },\n 71 \"diversityPolicy\": {\n 72 \"@type\": \"CreativeWork\",\n 73 \"@id\": \"https://example.org/id/ABC\",\n 74 \"name\": \"Name or title of the document\",\n 75 \"description\": \"Description of the creative work\",\n 76 \"url\": \"https://www.foo.org/creativework/diversityPolicy.pdf\"\n 77 },\n 78 \"areaServed\": [\n 79 {\n 80 \"@type\": \"Place\",\n 81 \"geo\": {", "source": "https://book.oceaninfohub.org/thematics/projects/index.html"}
{"id": "46be8daf939d-8", "text": "80 \"@type\": \"Place\",\n 81 \"geo\": {\n 82 \"@type\": \"GeoCoordinates\",\n 83 \"latitude\": 39.3280,\n 84 \"longitude\": 120.1633\n 85 },\n 86 \"description\": \"Description of the area served\"\n 87 },\n 88 {\n 89 \"@type\": \"Text\",\n 90 \"description\": \"Textual description of area served\"\n 91 },\n 92 {\n 93 \"@type\": \"AdministrativeArea\",\n 94 \"geo\": {\n 95 \"@type\": \"GeoCoordinates\",\n 96 \"latitude\": 39.3280,\n 97 \"longitude\": 120.1633\n 98 },\n 99 \"description\": \"Needs to be subset of Place, Review Place\"\n100 }\n101 ],\n102 \"parentOrganization\": {\n103 \"@type\": \"Organization\",\n104 \"@id\": \"http://www.someinstitute.edu\",\n105 \"legalName\": \"Some Institute\",\n106 \"name\": \"SI\",\n107 \"url\": \"http://www.someinstitute.edu\",\n108 \"address\": {\n109 \"@type\": \"PostalAddress\",", "source": "https://book.oceaninfohub.org/thematics/projects/index.html"}
{"id": "46be8daf939d-9", "text": "108 \"address\": {\n109 \"@type\": \"PostalAddress\",\n110 \"streetAddress\": \"234 Main St.\",\n111 \"addressLocality\": \"Anytown\",\n112 \"addressRegion\": \"ST\",\n113 \"postalCode\": \"12345\",\n114 \"addressCountry\": \"USA\"\n115 }\n116 }\n117}\nimport json\nfrom pyld import jsonld\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/projects/graphs/proj.json\") as dgraph:\n doc = json.load(dgraph)\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\njbutils.show_graph(compacted)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document", "source": "https://book.oceaninfohub.org/thematics/projects/index.html"}
{"id": "46be8daf939d-10", "text": "Fontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nReferences#\nhttps://schema.org/Project", "source": "https://book.oceaninfohub.org/thematics/projects/index.html"}
{"id": "cafb2f5ae649-0", "text": "Source and Prov Approaches#\nAbout#\nThis section will present an identifer discussion and then focus\non approaches publishers can use to provide more source and provenance\ninformation.This section is heavily influenced\nby [1] [2] and the reader is highly\nencouraged to read these references.\nIt is not uncommon for a single resource to be described at multiple locations.\nThe following items represent properties that can help address the\ndisambiguation of resources as the Ocean InfoHub graph grows.\nWe will look at the following seven properties:\nidentifier, provider, publisher, sameAs, isBasesOn, subjectOf and its\ninverse, about.\nIt should be noted that only subjectOf and sameAs can be used on type\nThing. That is, these properties can be used on any Schema.org type.\nThe others have their domain and range values listed. All these\nproperties work on CreativeWork. So they are all valid for that type\nand subtypes like Dataset and Map.\nExample Graph#\nThe following example graph shows some of the properties we can use\nto provide source and provenance information about a resource.\n 1{\n 2 \"@context\": {\n 3 \"@vocab\": \"https://schema.org/\"\n 4 },\n 5 \"@id\": \"https://example.org/id/XYZ\",\n 6 \"@type\": \"CreativeWork\",", "source": "https://book.oceaninfohub.org/thematics/identifier/id.html"}
{"id": "cafb2f5ae649-1", "text": "6 \"@type\": \"CreativeWork\",\n 7 \"url\": \"https://example.org/url/of/the/item\",\n 8 \"sameAs\": \"https://doi.org/10.5066/F7VX0DMQ\",\n 9 \"isBasedOn\": \"https://example.org/id/xyz\",\n10 \"identifier\": {\n11 \"@id\": \"https://doi.org/10.5066/F7VX0DMQ\",\n12 \"@type\": \"PropertyValue\",\n13 \"propertyID\": \"https://registry.identifiers.org/registry/doi\",\n14 \"url\": \"https://doi.org/10.5066/F7VX0DMQ\",\n15 \"value\": \"doi:10.5066/F7VX0DMQ\"\n16 },\n17 \"subjectOf\": {\n18 \"@type\": \"CreativeWork\",\n19 \"@id\": \"http://purl.unep.org/sdg/SDGIO_00020173\",\n20 \"url\": \"http://www.ontobee.org/ontology/SDGIO?iri=http://purl.unep.org/sdg/SDGIO_00020173\",\n21 \"name\": \"UNSD SDG indicator code:C140c01\",", "source": "https://book.oceaninfohub.org/thematics/identifier/id.html"}
{"id": "cafb2f5ae649-2", "text": "21 \"name\": \"UNSD SDG indicator code:C140c01\",\n22 \"description\": \"Number of countries making progress ... the oceans and their resources\"\n23 },\n24 \"provider\": {\n25 \"@id\": \"https://www.sample-data-repository.org\",\n26 \"@type\": \"Organization\",\n27 \"legalName\": \"Sample Data Repository Office\",\n28 \"name\": \"SDRO\",\n29 \"sameAs\": \"http://www.re3data.org/repository/r3dxxxxxxxxx\",\n30 \"url\": \"https://www.sample-data-repository.org\"\n31 },\n32 \"publisher\": {\n33 \"@id\": \"https://www.sample-data-repository.org\"\n34 }\n35}\nimport json\nfrom pyld import jsonld\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/identifier/graphs/creativework.json\") as dgraph:\n doc = json.load(dgraph)\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\njbutils.show_graph(compacted)", "source": "https://book.oceaninfohub.org/thematics/identifier/id.html"}
{"id": "cafb2f5ae649-3", "text": "compacted = jsonld.compact(doc, context)\njbutils.show_graph(compacted)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nidentifier#\nThis is the main subject of the start of this section. Please\nrefer there for details on this property.\nValues expected to be one of these types\nPropertyValue\nText\nURL\nUsed on these types\nThing\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/identifier/graphs/creativework.json\") as dgraph:", "source": "https://book.oceaninfohub.org/thematics/identifier/id.html"}
{"id": "cafb2f5ae649-4", "text": "doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@requireAll\": \"true\",\n \"@type\": \"CreativeWork\",\n \"identifier\": \"\"\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://example.org/id/XYZ\",\n \"@type\": \"CreativeWork\",\n \"identifier\": {", "source": "https://book.oceaninfohub.org/thematics/identifier/id.html"}
{"id": "cafb2f5ae649-5", "text": "\"@type\": \"CreativeWork\",\n \"identifier\": {\n \"@id\": \"https://doi.org/10.5066/F7VX0DMQ\",\n \"@type\": \"PropertyValue\",\n \"propertyID\": \"https://registry.identifiers.org/registry/doi\",\n \"url\": \"https://doi.org/10.5066/F7VX0DMQ\",\n \"value\": \"doi:10.5066/F7VX0DMQ\"\n }\n}\npropertyID#\nA commonly used identifier for the characteristic represented by the property, e.g. a manufacturer or a standard code for a property. propertyID can be (1) a prefixed string, mainly meant to be used with standards for product properties; (2) a site-specific, non-prefixed string (e.g. the primary key of the property or the vendor-specific id of the property), or (3) a URL indicating the type of the property, either pointing to an external vocabulary, or a Web resource that describes the property (e.g. a glossary entry). Standards bodies should promote a standard prefix for the identifiers of properties from their standards.\nvalue#\nThe value of the quantitative value or property value node. For PropertyValue,\nit can be \u2018Text;\u2019, \u2018Number\u2019, \u2018Boolean\u2019, or \u2018StructuredValue\u2019.\nurl (pointing to type URL)#\nURL of the item.", "source": "https://book.oceaninfohub.org/thematics/identifier/id.html"}
{"id": "cafb2f5ae649-6", "text": "url (pointing to type URL)#\nURL of the item.\nprovider#\nschema.org/provider\nThe service provider, service operator, or service performer; the goods\nproducer. Another party (a seller) may offer those services or goods on behalf\nof the provider. A provider may also serve as the seller.\nFor OIH this is the agent that is responsible for distributing the resource\nand the descriptive metadata. That is, the provider actually runs and supports\nthe services that presents the resource on the net or otherwise makes the\ndata available.\nValues expected to be one of these types\nOrganization\nPerson\nUsed on these types\nCreativeWork\nEducationalOccupationalProgram\nInvoice\nParcelDelivery\nReservation\nService\nTrip\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/identifier/graphs/creativework.json\") as dgraph:\n doc = json.load(dgraph)\nframe = {", "source": "https://book.oceaninfohub.org/thematics/identifier/id.html"}
{"id": "cafb2f5ae649-7", "text": "doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@requireAll\": \"true\",\n \"@type\": \"CreativeWork\",\n \"provider\": \"\"\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://example.org/id/XYZ\",\n \"@type\": \"CreativeWork\",\n \"provider\": {", "source": "https://book.oceaninfohub.org/thematics/identifier/id.html"}
{"id": "cafb2f5ae649-8", "text": "\"@type\": \"CreativeWork\",\n \"provider\": {\n \"@id\": \"https://www.sample-data-repository.org\",\n \"@type\": \"Organization\",\n \"legalName\": \"Sample Data Repository Office\",\n \"name\": \"SDRO\",\n \"sameAs\": \"http://www.re3data.org/repository/r3dxxxxxxxxx\",\n \"url\": \"https://www.sample-data-repository.org\"\n }\n}\npublisher#\nSee: schema.org/publisher\nThe publisher is defined as \u201cThe publisher of the creative work\u201d. This is\nviewed as the agent that is primarily responsible for making the content described\nby the structured metadata.\nValues expected to be one of these types\nOrganization\nPerson\nUsed on these types\nCreativeWork\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/identifier/graphs/creativework.json\") as dgraph:", "source": "https://book.oceaninfohub.org/thematics/identifier/id.html"}
{"id": "cafb2f5ae649-9", "text": "doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@requireAll\": \"true\",\n \"@type\": \"CreativeWork\",\n \"publisher\": \"\"\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://example.org/id/XYZ\",\n \"@type\": \"CreativeWork\",\n \"publisher\": {", "source": "https://book.oceaninfohub.org/thematics/identifier/id.html"}
{"id": "cafb2f5ae649-10", "text": "\"@type\": \"CreativeWork\",\n \"publisher\": {\n \"@id\": \"https://www.sample-data-repository.org\",\n \"@type\": \"Organization\",\n \"legalName\": \"Sample Data Repository Office\",\n \"name\": \"SDRO\",\n \"sameAs\": \"http://www.re3data.org/repository/r3dxxxxxxxxx\",\n \"url\": \"https://www.sample-data-repository.org\"\n }\n}\nsameAs#\nSee: schema.org/sameAs\nThe sameAs property links a Thing to a URL. It is expected that the\nURL is a resource that is the the most canonical URL for the original.\nIn cases where your resource is not the canonical URL, you can use the\nsameAs property to link to the canonical URL. This is useful when you wish\nto publish a resource and give credit to the original resource. Note,\nin this case the resource must not be altered, but actually be the same\nas the canonical URL resource.\nThe sameAs property should always point to only one resource. It is not\nlogically consistent to point to multiple sameAs resources.\nValues expected to be one of these types\nURL\nUsed on these types\nThing\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph", "source": "https://book.oceaninfohub.org/thematics/identifier/id.html"}
{"id": "cafb2f5ae649-11", "text": "from rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/identifier/graphs/creativework.json\") as dgraph:\n doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@requireAll\": \"true\",\n \"@type\": \"CreativeWork\",\n \"sameAs\": \"\"\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document", "source": "https://book.oceaninfohub.org/thematics/identifier/id.html"}
{"id": "cafb2f5ae649-12", "text": "Fontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://example.org/id/XYZ\",\n \"@type\": \"CreativeWork\",\n \"sameAs\": \"https://doi.org/10.5066/F7VX0DMQ\"\n}\nisBasedOn#\nSee: schema.org/isBasedOn\nWhere sameAs is used to link to the canonical URL of the resource, isBasedOn\nprovides a means to link derivative works to the original resource this new\nresources is based on.\nThe isBasedOn property can be used to link to multiple resources if more\nthan one was used in the generation of this new resource.\nValues expected to be one of these types\nCreativeWork\nProduct\nURL\nUsed on these types\nCreativeWork\nsubjectOf and inverse about#\nSee: schema.org/subjectOf\nThe property subjectOf of can be used to indicate a resource that is related to\nthe described resource, although not necessarily a part of it. The subjectOf\nproperty can be used in an educational framework to indicate the field(s) of\nscience or literature the dataset relates to.\nValues expected to be one of these types\nCreativeWork\nEvent", "source": "https://book.oceaninfohub.org/thematics/identifier/id.html"}
{"id": "cafb2f5ae649-13", "text": "Values expected to be one of these types\nCreativeWork\nEvent\nUsed on these types\nThing\nThe subjectOf property has an inverse-property about.\nThe property about can be used to:\nindicate the subject matter this thing is about\nValues expected to be one of these types\nThing\nUsed on these types\nCreativeWork\nEvent\nCommunicateAction\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/identifier/graphs/creativework.json\") as dgraph:\n doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@requireAll\": \"true\",\n \"@type\": \"CreativeWork\",\n \"subjectOf\": \"\"\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)", "source": "https://book.oceaninfohub.org/thematics/identifier/id.html"}
{"id": "cafb2f5ae649-14", "text": "}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://example.org/id/XYZ\",\n \"@type\": \"CreativeWork\",\n \"subjectOf\": {\n \"@id\": \"http://purl.unep.org/sdg/SDGIO_00020173\",\n \"@type\": \"CreativeWork\",\n \"description\": \"Number of countries making progress ... the oceans and their resources\",\n \"name\": \"UNSD SDG indicator code:C140c01\",", "source": "https://book.oceaninfohub.org/thematics/identifier/id.html"}
{"id": "cafb2f5ae649-15", "text": "\"name\": \"UNSD SDG indicator code:C140c01\",\n \"url\": \"http://www.ontobee.org/ontology/SDGIO?iri=http://purl.unep.org/sdg/SDGIO_00020173\"\n }\n}\nReferences#\n1\nOmar Benjelloun, Shiyu Chen, and Natasha Noy, editors. Google Dataset Search by the Numbers, 2020. URL: https://arxiv.org/abs/2006.06894.\n2\nGoogle search central dataset. https://developers.google.com/search/docs/advanced/structured-data/dataset. URL: https://developers.google.com/search/docs/advanced/structured-data/dataset.", "source": "https://book.oceaninfohub.org/thematics/identifier/id.html"}
{"id": "09719ba31016-0", "text": "Linking to documents and resources#\nLeveraging the ability to link between resources can serve many goals. We may\nwish to demonstrate connections between people and courses they have taken or\nor organizations they are connected with. We may be wishing to link documents\nto people or organizations.\nThis section will review two key thematic profiles and some examples of how to\nexpress links from them to other resources. Our goal will be different in various\ncases. The two profiles are type CreativeWork and type Organization.\nIn the case of Organization our purpose may be to express alignment to various\nprinciples and policies. These might provide people with an understanding of\nthe goals of an organization when they are searching for or assessing them.\nIn the case of CreativeWork we are looking to express connections to the\npublisher and provider of the creative work. This is mostly to connect these\nworks with the responsible party associated with them but may also serve to\nconnect to the principles they are associated with.\nOrganization link options#\nIn the following section we will look at three different options for expressing\nlinks between an organization and resources that describe the policy and\nprinciples of the subject organization.\nFirst we will see the full data graph. We have highlighted the sections we\nwe will review here. Namely the subjectOF and publishingPrinciples\npredicates.\n 1{\n 2 \"@context\": {", "source": "https://book.oceaninfohub.org/thematics/sdg/index.html"}
{"id": "09719ba31016-1", "text": "predicates.\n 1{\n 2 \"@context\": {\n 3 \"@vocab\": \"https://schema.org/\"\n 4 },\n 5 \"@id\": \"https://example.org/id/org/x\",\n 6 \"@type\": \"Organization\",\n 7 \"address\": {\n 8 \"@type\": \"PostalAddress\",\n 9 \"addressLocality\": \"Paris, France\",\n10 \"postalCode\": \"F-75002\",\n11 \"streetAddress\": \"38 avenue de l'Opera\"\n12 },\n13 \"email\": \"secretariat(at)example.org\",\n14 \"name\": \"Organization X\",\n15 \"description\": \"Description of org ...\",\n16 \"telephone\": \"( 33 1) 42 68 53 00\",\n17 \"member\": [\n18 {\n19 \"@type\": \"Organization\",\n20 \"name\": \"Organization A\",\n21 \"description\": \"Org A is a potential parent organization of Org X\"\n22 }\n23 ],\n24 \"identifier\": {\n25 \"@id\": \"https://grid.ac/institutes/grid.475727.4\",\n26 \"@type\": \"PropertyValue\",\n27 \"description\": \"UN Department of Economic and Social Affairs Sustainable Development\",", "source": "https://book.oceaninfohub.org/thematics/sdg/index.html"}
{"id": "09719ba31016-2", "text": "27 \"description\": \"UN Department of Economic and Social Affairs Sustainable Development\",\n28 \"propertyID\": \"https://registry.identifiers.org/registry/grid\",\n29 \"url\": \"https://grid.ac/institutes/grid.475727.4\"\n30 },\n31 \"subjectOf\": {\n32 \"@type\": \"CreativeWork\",\n33 \"@id\": \"http://purl.unep.org/sdg/SDGIO_00020173\",\n34 \"url\": \"http://www.ontobee.org/ontology/SDGIO?iri=http://purl.unep.org/sdg/SDGIO_00020173\",\n35 \"name\": \"UNSD SDG indicator code:C140c01\",\n36 \"description\": \"Number of countries making progress ... the oceans and their resources\"\n37 },\n38 \"publishingPrinciples\": [\n39 {\n40 \"@type\": \"CreativeWork\",\n41 \"@id\": \"https://sdgs.un.org/goals/goal14\",\n42 \"url\": \"https://sdgs.un.org/goals/goal14\",\n43 \"name\": \"Sustainable Development Goal 14\",\n44 \"description\": \"Conserve and sustainably use the oceans, seas and marine resources for sustainable development\"\n45 },\n46 {", "source": "https://book.oceaninfohub.org/thematics/sdg/index.html"}
{"id": "09719ba31016-3", "text": "45 },\n46 {\n47 \"@type\": \"CreativeWork\",\n48 \"@id\": \"https://dx.doi.org/10.1038/sdata.2016.18\",\n49 \"url\": \"https://www.nature.com/articles/sdata201618\",\n50 \"name\": \"FAIR data principles\",\n51 \"description\": \"FAIR Principles definition as referenced from: Wilkinson, M. D. et al. The FAIR Guiding Principles for scientific data management and stewardship.\"\n52 }\n53 ]\n54}\nimport json\nfrom pyld import jsonld\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/sdg/graphs/org.json\") as dgraph:\n doc = json.load(dgraph)\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\njbutils.show_graph(compacted)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document", "source": "https://book.oceaninfohub.org/thematics/sdg/index.html"}
{"id": "09719ba31016-4", "text": "Fontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nsubjectOf#\nValues expected to be one of these types\nEvent\nCreativeWork\nUsed on these types\nThing\nLets take a look at subjectOf. In this case we are using subjectOf to express\na connection to a UN SDG. This, subjectOf, could also be used to connect\ndocuments describing the policy and principles of an organization or additional\nmetadata for a creative work. When we look at subjectOf\nwe can see we are allowed are allowed to use it on any type Thing, but must point\nto a CreativeWork or Event.\nNote\nRecall that in the case of OIH types, the type CourseInstance or EducationEvent are both\nsubtype of Event. Given that we can use subjectOf to connect a Thing to these types\nas well. Also, Course is a subtype of CreativeWork, so we are good there too in the\ncontext of the range of subjectOf. Reference thematic type Training\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph", "source": "https://book.oceaninfohub.org/thematics/sdg/index.html"}
{"id": "09719ba31016-5", "text": "from rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/sdg/graphs/org.json\") as dgraph:\n doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@requireAll\": \"true\",\n \"@type\": \"Organization\",\n \"subjectOf\": \"\"\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document", "source": "https://book.oceaninfohub.org/thematics/sdg/index.html"}
{"id": "09719ba31016-6", "text": "Fontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://example.org/id/org/x\",\n \"@type\": \"Organization\",\n \"subjectOf\": {\n \"@id\": \"http://purl.unep.org/sdg/SDGIO_00020173\",\n \"@type\": \"CreativeWork\",\n \"description\": \"Number of countries making progress ... the oceans and their resources\",\n \"name\": \"UNSD SDG indicator code:C140c01\",\n \"url\": \"http://www.ontobee.org/ontology/SDGIO?iri=http://purl.unep.org/sdg/SDGIO_00020173\"\n }\n}\npublishingPrinciples#\nValues expected to be one of these types\nCreativeWork\nURL\nUsed on these types\nCreativeWork\nOrganization\nPerson\nLets take a look at publishingPrinciples. This can be used\nto connect CreativeWork, Organization, or Person to either of CreativeWork or URL. So this\nallows us to link a CreativeWork to a policy or principle statement. This has some very useful", "source": "https://book.oceaninfohub.org/thematics/sdg/index.html"}
{"id": "09719ba31016-7", "text": "use cases where resources can be grouped based on their connection to those principles and policies.\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/sdg/graphs/org.json\") as dgraph:\n doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@requireAll\": \"true\",\n \"@type\": \"Organization\",\n \"publishingPrinciples\": \"\"\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)", "source": "https://book.oceaninfohub.org/thematics/sdg/index.html"}
{"id": "09719ba31016-8", "text": "print(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://example.org/id/org/x\",\n \"@type\": \"Organization\",\n \"publishingPrinciples\": [\n {\n \"@id\": \"https://sdgs.un.org/goals/goal14\",\n \"@type\": \"CreativeWork\",\n \"description\": \"Conserve and sustainably use the oceans, seas and marine resources for sustainable development\",\n \"name\": \"Sustainable Development Goal 14\",\n \"url\": \"https://sdgs.un.org/goals/goal14\"\n },\n {\n \"@id\": \"https://dx.doi.org/10.1038/sdata.2016.18\",\n \"@type\": \"CreativeWork\",", "source": "https://book.oceaninfohub.org/thematics/sdg/index.html"}
{"id": "09719ba31016-9", "text": "\"@type\": \"CreativeWork\",\n \"description\": \"FAIR Principles definition as referenced from: Wilkinson, M. D. et al. The FAIR Guiding Principles for scientific data management and stewardship.\",\n \"name\": \"FAIR data principles\",\n \"url\": \"https://www.nature.com/articles/sdata201618\"\n }\n ]\n}\nSustainable Development Goals#\nThe following example provides an an approach to connecting\nSustainable Development Goals\n(SDGs) could be linked to via subjectOf.\nOther potential links could be made to things such\nas the UNDRR-ISC Hazard Definition & Classification\nAs this is a CreateWork, we can now use one more linking property, the\nSchema.org citation property. By comparison, the\npublishingPrinciples or\nsubjectOf\nconnections carry a bit more semantic meaning.\n 1{\n 2 \"@context\": {\n 3 \"@vocab\": \"https://schema.org/\"\n 4 },\n 5 \"@type\": \"CreativeWork\",\n 6 \"@id\": \"https://example.org/id/XYZ\",\n 7 \"name\": \"Name or title of the document\",\n 8 \"description\": \"Description of the resource to aid in searching\",\n 9 \"distribution\": {\n10 \"@type\": \"DataDownload\",", "source": "https://book.oceaninfohub.org/thematics/sdg/index.html"}
{"id": "09719ba31016-10", "text": "9 \"distribution\": {\n10 \"@type\": \"DataDownload\",\n11 \"contentUrl\": \"https://www.sample-data-repository.org/dataset/472032.tsv\",\n12 \"encodingFormat\": \"text/tab-separated-values\"\n13 },\n14 \"citation\": {\n15 \"@type\": \"CreativeWork\",\n16 \"@id\": \"http://purl.unep.org/sdg/SDGIO_00020173\",\n17 \"url\": \"http://www.ontobee.org/ontology/SDGIO?iri=http://purl.unep.org/sdg/SDGIO_00020173\",\n18 \"name\": \"UNSD SDG indicator code:C140c01\",\n19 \"description\": \"Number of countries making progress ... the oceans and their resources\"\n20 },\n21 \"maintainer\" : {\n22 \"@type\" : \"Organization\",\n23 \"@id\": \"https://ror.org/050bms902\",\n24 \"description\": \"UN Department of Economic and Social Affairs Sustainable Development\"\n25 }\n26}\nimport json\nfrom pyld import jsonld\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils", "source": "https://book.oceaninfohub.org/thematics/sdg/index.html"}
{"id": "09719ba31016-11", "text": "sys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/sdg/graphs/doc.json\") as dgraph:\n doc = json.load(dgraph)\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\njbutils.show_graph(compacted)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\ncitation#\nValues expected to be one of these types\nText\nCreativeWork\nUsed on these types\nCreativeWork\nSchema.org citation provides a way to link to another creative work.\nThis property can be pointed to either Text or CreativeWork. It should also be noted that citation\ncan only be used on type CreativeWork.\nDue to the limit to use on CreateWork only, this example is not seen in the\nabove examplewhich is of type Organization.", "source": "https://book.oceaninfohub.org/thematics/sdg/index.html"}
{"id": "09719ba31016-12", "text": "above examplewhich is of type Organization.\nThe actual semantics of citation is rather vague stating it is a method to\ncite or reference another creative work.\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/sdg/graphs/doc.json\") as dgraph:\n doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@requireAll\": \"true\",\n \"@type\": \"CreativeWork\",\n \"citation\": \"\"\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)", "source": "https://book.oceaninfohub.org/thematics/sdg/index.html"}
{"id": "09719ba31016-13", "text": "print(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://example.org/id/XYZ\",\n \"@type\": \"CreativeWork\",\n \"citation\": {\n \"@id\": \"http://purl.unep.org/sdg/SDGIO_00020173\",\n \"@type\": \"CreativeWork\",\n \"description\": \"Number of countries making progress ... the oceans and their resources\",\n \"name\": \"UNSD SDG indicator code:C140c01\",\n \"url\": \"http://www.ontobee.org/ontology/SDGIO?iri=http://purl.unep.org/sdg/SDGIO_00020173\"\n }\n}\nRefs#\nSDGs\nSDG targets\nSDG indicators", "source": "https://book.oceaninfohub.org/thematics/sdg/index.html"}
{"id": "664c4db4d866-0", "text": "Datasets#\nAbout#\nDatasets\nSee also\nFor OIH the focus is on generic documents which can scope reports, data and other resources.\nIn those cases where the resources being described are of type Dataset you may wish to review\npatterns developed for GeoScience Datasets by the ESIP\nScience on Schema community.\nDatasets#\nDocuments will include maps, reports,\nguidance and other creative works. Due to this OIH will focus on a generic example\nof schema.org/CreativeWork and then provide examples\nfor more focused creative work examples.\n 1{\n 2 \"@context\": {\n 3 \"@vocab\": \"https://schema.org/\"\n 4 },\n 5 \"@type\": \"Dataset\",\n 6 \"@id\": \"https://registry.org/permanentUrlToThisJsonDoc\",\n 7 \"name\": \"A concise but descriptive name of the dataset\",\n 8 \"description\": \"An extended, free-text description of what's in the dataset, who created it, and other attributes\",\n 9 \"url\": \"https://urlToTheDatasetOrLandingPage.org/\",\n10 \"sameAs\": [\n11 \"http://alternativeUrlToTheDatasetOrLandingPage.org\"\n12 ],", "source": "https://book.oceaninfohub.org/thematics/dataset/index.html"}
{"id": "664c4db4d866-1", "text": "12 ],\n13 \"license\": \"This work is licensed under a Creative Commons Attribution (CC-BY) 4.0 License\",\n14 \"citation\": [\n15 \"Citation to other work relevant to this dataset\",\n16 \"Citation to other work relevant to this dataset\",\n17 \"Citation to other work relevant to this dataset\"\n18 ],\n19 \"version\": \"2021-04-24T06:34:56.000Z\",\n20 \"keywords\": [\n21 \"Keyword 1\",\n22 \"Keyword 2\",\n23 \"Keyword 3\"\n24 ],\n25 \"measurementTechnique\": \"The URL to or text about the methods, technique or technology used to generate this Dataset\",\n26 \"variableMeasured\": [\n27 {\n28 \"@type\": \"PropertyValue\",\n29 \"name\": \"Name of a variable in the dataset\",\n30 \"description\": \"Extended description of this variable\"\n31 },\n32 {\n33 \"@type\": \"PropertyValue\",\n34 \"name\": \"Name of a variable in the dataset\",\n35 \"url\": \"http://ontology.org/uriToSemanticDescriptorOfThisVariable\",\n36 \"description\": \"Extended description of this variable?\"\n37 },\n38 {", "source": "https://book.oceaninfohub.org/thematics/dataset/index.html"}
{"id": "664c4db4d866-2", "text": "37 },\n38 {\n39 \"@type\": \"PropertyValue\",\n40 \"name\": \"SamplingDeviceApertureSurfaceArea\",\n41 \"url\": \"http://ontology.org/uriToSemanticDescriptorOfThisVariable\",\n42 \"description\": \"Extended description of this variable\"\n43 }\n44 ],\n45 \"includedInDataCatalog\": {\n46 \"@id\": \"https://registryOfCatalogs.org/permanentUrlIdentifiyingCatalog\",\n47 \"@type\": \"DataCatalog\",\n48 \"url\": \"https://urlOfDataCatalog.org\"\n49 },\n50 \"temporalCoverage\": \"2007/2007\",\n51 \"distribution\": {\n52 \"@type\": \"DataDownload\",\n53 \"contentUrl\": \"http://urlToDirectDownloadOfThisDataset.org/\",\n54 \"encodingFormat\": \"text/csv\"\n55 },\n56 \"spatialCoverage\": {\n57 \"@type\": \"Place\",\n58 \"geo\": {\n59 \"@type\": \"GeoShape\",\n60 \"polygon\": \"142.014 10.161667,142.014 18.033833,147.997833 18.033833,147.997833 10.161667,142.014 10.161667\"\n61 },\n62 \"additionalProperty\": {", "source": "https://book.oceaninfohub.org/thematics/dataset/index.html"}
{"id": "664c4db4d866-3", "text": "61 },\n62 \"additionalProperty\": {\n63 \"@type\": \"PropertyValue\",\n64 \"propertyID\": \"http://dbpedia.org/resource/Spatial_reference_system\",\n65 \"value\": \"http://www.w3.org/2003/01/geo/wgs84_pos#lat_long\"\n66 }\n67 },\n68 \"provider\": [\n69 {\n70 \"@type\": \"Organization\",\n71 \"legalName\": \"Legal Name of Organisation which generated the dataset\",\n72 \"name\": \"Other Name of Organisation which generated the dataset\",\n73 \"url\": \"https://organisationWebsite.org/\"\n74 }\n75 ],\n76 \"subjectOf\": {\n77 \"@type\": \"Event\",\n78 \"description\": \"Describe the event which is the subject of this dataset. For example, a cruise ID.\",\n79 \"name\": \"Concise and descriptive name of the Event\",\n80 \"potentialAction\": {\n81 \"@type\": \"Action\",\n82 \"name\": \"Concise but descriptive name of action that was part of an Event. For example, the name of a CTD cast\",\n83 \"agent\": [\n84 \"Name or permanent ID of person or thing that performed this action\",\n85 \"Name or permanent ID of person or thing that performed this action\",", "source": "https://book.oceaninfohub.org/thematics/dataset/index.html"}
{"id": "664c4db4d866-4", "text": "85 \"Name or permanent ID of person or thing that performed this action\",\n86 \"Name or permanent ID of person or thing that performed this action\"\n87 ],\n88 \"startTime\": \"2007-03-11T14:45UTC\",\n89 \"endTime\": \"2007-03-11T15:42UTC\",\n90 \"instrument\": {\n91 \"@type\": \"Thing\",\n92 \"name\": \"The name of the instrument used in the action. For example, the specific model of a CTD, a glider, a moored sensor\",\n93 \"url\": \"http://ontology.org/uriToSemanticDescriptorOfThisInstrument\",\n94 \"description\": \"Extended description of the sampling instrument\"\n95 }\n96 }\n97 }\n98}\nDemo area please ignore#\nThis area is being used to test out a new repository structure where the data graphs,\nframes and SHACL shapes are kept in a discrete location.\nimport warnings\nwith warnings.catch_warnings():\n warnings.filterwarnings(\"ignore\",category=DeprecationWarning)\n \nimport json\nfrom pyld import jsonld\nimport os, sys\nimport urllib\nimport contextlib\ndevnull = open(os.devnull, 'w')\ncontextlib.redirect_stderr(devnull)\ncurrentdir = os.path.dirname(os.path.abspath(''))", "source": "https://book.oceaninfohub.org/thematics/dataset/index.html"}
{"id": "664c4db4d866-5", "text": "contextlib.redirect_stderr(devnull)\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\n \nurl = \"https://raw.githubusercontent.com/iodepo/odis-in/master/dataGraphs/thematics/docs/graphs/map.json\"\ndgraph = urllib.request.urlopen(url)\ndoc = json.load(dgraph)\nfurl = \"https://raw.githubusercontent.com/iodepo/odis-in/master/frames/mapFrameID.json\"\nfgraph = urllib.request.urlopen(furl)\nframe = json.load(fgraph)\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document", "source": "https://book.oceaninfohub.org/thematics/dataset/index.html"}
{"id": "664c4db4d866-6", "text": "Fontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://example.org/id/XYZ\",\n \"@type\": \"Map\",\n \"identifier\": {\n \"@id\": \"https://doi.org/10.5066/F7VX0DMQ\",\n \"@type\": \"PropertyValue\",\n \"propertyID\": \"https://registry.identifiers.org/registry/doi\",\n \"url\": \"https://doi.org/10.5066/F7VX0DMQ\",\n \"value\": \"doi:10.5066/F7VX0DMQ\"\n }\n}", "source": "https://book.oceaninfohub.org/thematics/dataset/index.html"}
{"id": "d8afd6c8a721-0", "text": "Keywords and Defined Terms#\nAbout#\nThis section is looking at how the keywords could be connected\nwith Defined Terms that point to external vocabularies that follow\na vocabulary publishing patterns like at the W3C\nBest Practice Recipes for Publishing RDF Vocabularies.\nThe pattern breaks down a bit when attempting to connect with things like\nthe Global Change Master Directory keywords.\nThis impedance is caused by publishing approaches for the terms that don\u2019t align well with\nthe above publishing practices. This does not mean we can not use these terms, rather that\nwe may find multiple ways to connect them used by the community. This can result in some\nambiguity in linking in a community.\nA person could adapt the pattern to connect things like the Global Change Observing System\nor\nEARTH SCIENCE > OCEANS > OCEAN CHEMISTRY. The later of these does have a UUID (6eb3919b-85ce-4988-8b78-9d0018fd8089) but this is not a dereference-able PID.\nNote\nThis topic of keyword linking with DefinedTerms is under review at the Science on Schema\nwork at ESIP. Reference Describing a Dataset\nfor the latest on their recommendations.\nKeywords#\nThe Schema.org keywords property of CreativeWork can point to three different values.\nThese are: DefinedTerm, Text and URL.", "source": "https://book.oceaninfohub.org/thematics/terms/list.html"}
{"id": "d8afd6c8a721-1", "text": "These are: DefinedTerm, Text and URL.\nWe can see the three different approaches here to defining keywords. Here, Region X is a classic\ntext keyword. The other two are defined as a DefinedTerm.\n 1{\n 2 \"@context\": {\n 3 \"@vocab\": \"https://schema.org/\"\n 4 },\n 5 \"@type\": \"Map\",\n 6 \"@id\": \"https://example.org/id/XYZ\",\n 7 \"name\": \"Name or title of the document\",\n 8 \"description\": \"Description of the map to aid in searching\",\n 9 \"url\": \"https://www.sample-data-repository.org/creativework/map.pdf\",\n10 \"identifier\": {\n11 \"@id\": \"https://doi.org/10.5066/F7VX0DMQ\",\n12 \"@type\": \"PropertyValue\",\n13 \"propertyID\": \"https://registry.identifiers.org/registry/doi\",\n14 \"value\": \"doi:10.5066/F7VX0DMQ\",\n15 \"url\": \"https://doi.org/10.5066/F7VX0DMQ\"\n16 },\n17 \"keywords\": [\n18 \"Region X\",\n19 {", "source": "https://book.oceaninfohub.org/thematics/terms/list.html"}
{"id": "d8afd6c8a721-2", "text": "17 \"keywords\": [\n18 \"Region X\",\n19 {\n20 \"@id\": \"http://purl.org/dc/dcmitype/Image\",\n21 \"@type\": \"DefinedTerm\",\n22 \"inDefinedTermSet\": \"http://purl.org/dc/terms/DCMIType\",\n23 \"termCode\": \"Image\",\n24 \"name\": \"Image\"\n25 },\n26 {\n27 \"@id\": \"https://www.wikidata.org/wiki/Q350134\",\n28 \"@type\": \"URL\",\n29 \"url\": \"https://www.wikidata.org/wiki/Q350134\"\n30 }\n31 ]\n32}\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/terms/graphs/map.json\") as dgraph:\n doc = json.load(dgraph)\nframe = {", "source": "https://book.oceaninfohub.org/thematics/terms/list.html"}
{"id": "d8afd6c8a721-3", "text": "doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@requireAll\": \"true\",\n \"@type\": \"Map\",\n \"keywords\": \"\"\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nText#\nKeywords can be defined as a Text value. This is the most common approach though\nit doesn\u2019t provide some of the benefits of the other two approaches. For example, it doesn\u2019t allow for terms to\nbe dereferenced on the net or for connects in the graph to be made for common terms by their subject IRIs.\n{", "source": "https://book.oceaninfohub.org/thematics/terms/list.html"}
{"id": "d8afd6c8a721-4", "text": "{\n \"@context\": \"https://schema.org/\",\n \"keywords\": [\n \"nitrous oxide\", \n \"Central Pacific\", \n \"headspace equilibration\", \n \"SRI Greenhouse Gas Monitoring Gas Chromatograph\", \n \"CTD profiler\", \n \"Gas Chromatograph\"\n ]\n}\nNote\nBe sure to use the [] notation to define the keyword. This defined an array of items vs a single items. If you\nuse an approach like {\u201cterm1, term2, term4\u201d} you have only created a single text string with comma separated values. However\nthat is viewed as a single string in the graph. The [] notation creates an array of strings all connected to the subject IRI\nby the property keywords.\nURL#\nKeywords can also point to a URL. This provides a way to link to a vocabulary entry that defines the term. This approach\nhas some benefits of linking to more details but does easily provide an easy descriptive text for humans. There is nothing\npreventing putting in a text keyword followed up by another entry with a related URL.\nDefinedTerm#\nThis is the most complex approach. Keywords can point to a DefinedTerm as\ndefined in a DefinedTermSet pointed to by\nthe property inDefinedTermSet. It does offer the ability to present both a human", "source": "https://book.oceaninfohub.org/thematics/terms/list.html"}
{"id": "d8afd6c8a721-5", "text": "the property inDefinedTermSet. It does offer the ability to present both a human\nfocused textual name and description of the term. This is a great way to link to a vocabulary entry that defines the term.\nIt also allows for a URL to be used to link to the vocabulary entry. While this approach is the most comprehensive, it does\nincur a complexity during the query process to extract and present the information.\nDefined Terms#\nDuring generation of the structured data a provide may wish to\neither use or publish a set of controlled vocabulary terms or\na similar set.\nWithin schema.org this could be done by leveraging the \u201cDefinedTerm\u201d\namd \u201cDefinedTermSet\u201d types.\nThese types allow us both to define a set of terms and\nuse a set of terms in describing a thing.\nNote that DefinedTerm is an intangible and can connect to most\ntypes in Schema.org. So we can use them in places such as:\nCreativeWork -> keyword\nCreativeWork -> learningResourceType\nLearningResource -> teaches (and many others)\nLearningResource -> competencyRequired (and many others)\nPropertyValue -> valueReference\nThe following example is from the Schema.org DefinedTermSet\nreference.\n 1[\n 2 {\n 3 \"@context\": {\n 4 \"@vocab\": \"https://schema.org/\"\n 5 }\n 6 },", "source": "https://book.oceaninfohub.org/thematics/terms/list.html"}
{"id": "d8afd6c8a721-6", "text": "5 }\n 6 },\n 7 {\n 8 \"@type\": \"DefinedTermSet\",\n 9 \"@id\": \"http://openjurist.org/dictionary/Ballentine\",\n10 \"name\": \"Ballentine's Law Dictionary\",\n11 \"description\": \"A description of Ballentine's Law Dictionary Term Set\"\n12 },\n13 {\n14 \"@type\": \"DefinedTerm\",\n15 \"@id\": \"http://openjurist.org/dictionary/Ballentine/term/calendar-year\",\n16 \"name\": \"calendar year\",\n17 \"description\": \"The period from January 1st to December 31st, inclusive, of any year.\",\n18 \"inDefinedTermSet\": {\n19 \"@type\": \"DefinedTermSet\",\n20 \"@id\": \"http://openjurist.org/dictionary/Ballentine\"\n21 }\n22 },\n23 {\n24 \"@type\": \"DefinedTerm\",\n25 \"@id\": \"http://openjurist.org/dictionary/Ballentine/term/schema\",\n26 \"name\": \"schema\",\n27 \"description\": \"A representation of a plan or theory in the form of an outline or model.\",\n28 \"inDefinedTermSet\": {\n29 \"@type\": \"DefinedTermSet\",", "source": "https://book.oceaninfohub.org/thematics/terms/list.html"}
{"id": "d8afd6c8a721-7", "text": "29 \"@type\": \"DefinedTermSet\",\n30 \"@id\": \"http://openjurist.org/dictionary/Ballentine\"\n31 }\n32 }\n33]\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/terms/graphs/map.json\") as dgraph:\n doc = json.load(dgraph)\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\njbutils.show_graph(compacted)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document", "source": "https://book.oceaninfohub.org/thematics/terms/list.html"}
{"id": "d8afd6c8a721-8", "text": "Fontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nReferences#\nschema.org/DefinedTerm\nschema.org/DefinedTermSet", "source": "https://book.oceaninfohub.org/thematics/terms/list.html"}
{"id": "547b167cbd90-0", "text": "Essential Ocean Variables#\nThis section details initial documentation of approaches for describing elements of a\nschema:Dataset with a focus on approaches supporting Essential\nOcean Variables.\nA rough description of these links leveraging pseudo schema.org terms follows with a detailed\nand valid data graph as an example after that.\nReference image:\nThe image above details out some of the key points to be encoded. These include:\nLinks to and description of methods\nQA/QC references\nLinks to GOOS Specification sheets\nInformation on variables measured\nConnections to the event measured and potential associated instruments\nSpatial coverage\nTemporal coverage\nThe valid data graph follows the reference section and details follow that. The highlighted lines\nin the data graph represented the detailed sections.\nReferences:#\nGOOS reference\nGoos example spec sheet and\nOBIS examples\n 1{\n 2 \"@context\": {\n 3 \"@vocab\": \"https://schema.org/\"\n 4 },\n 5 \"@type\": \"Dataset\",\n 6 \"@id\": \"https://example.org/dataset/12345\",\n 7 \"name\": \"Example Vessel Surveys Jan-Apr 2007\",", "source": "https://book.oceaninfohub.org/thematics/variables/index.html"}
{"id": "547b167cbd90-1", "text": "7 \"name\": \"Example Vessel Surveys Jan-Apr 2007\",\n 8 \"description\": \"Original provider: HDR Environmental, Operations and Construction, Inc. Dataset credits: The U.S. Navy Marine Species Monitoring Program Abstract:Features in this feature class represent sightings from the NAVFAC MISTCS Vessel Surveys Jan-Apr 2007.\",\n 9 \"url\": \"https://obis.org/dataset/dcbb8f12-c869-4d31-aa8b-23abb27898ce\",\n 10 \"license\": \"This work is licensed under a Creative Commons Attribution (CC-BY) 4.0 License\",\n 11 \"citation\": \"Ampela, K. and G. Miller-Francisco. 2017. MIRC NAVFAC MISTCS Vessel Surveys Jan-Apr 2007. Data downloaded from OBIS-SEAMAP (http://seamap.env.duke.edu/dataset/1519) on yyyy-mm-dd.\",\n 12 \"version\": \"2021-04-24T06:34:56.000Z\",\n 13 \"keywords\": [\n 14 \"Sea State\",\n 15 \"Mariana Islands Range Complex\",\n 16 \"Oceanography\",\n 17 \"Marine Physics\"\n 18 ],", "source": "https://book.oceaninfohub.org/thematics/variables/index.html"}
{"id": "547b167cbd90-2", "text": "17 \"Marine Physics\"\n 18 ],\n 19 \"variableMeasured\": [\n 20 {\n 21 \"@type\": \"PropertyValue\",\n 22 \"name\": \"Sea State\",\n 23 \"description\": \"Sea State is the characterization of wave and swell, typically in terms of height, wavelength, period, and directional wave energy flux \",\n 24 \"propertyID\": [\n 25 \"http://purl.obolibrary.org/obo/ENVO_01001374\",\n 26 \"https://gcmd.earthdata.nasa.gov/KeywordViewer/scheme/all/11aca777-8a01-42ce-b076-b3059c3d8cae?gtm_keyword=SEA%20STATE>m_scheme=Earth%20Science\"\n 27 ]\n 28 },\n 29 {\n 30 \"@type\": \"PropertyValue\",\n 31 \"name\": \"Ocean Surface Stress\",\n 32 \"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.\",\n 33 \"propertyID\": \"http://purl.obolibrary.org/obo/ENVO_01001844\",\n 34 \"value\": 0.2,", "source": "https://book.oceaninfohub.org/thematics/variables/index.html"}
{"id": "547b167cbd90-3", "text": "34 \"value\": 0.2,\n 35 \"unitCode\": \"http://qudt.org/vocab/unit/N-PER-M2\"\n 36 }\n 37 ],\n 38 \"measurementTechnique\": [\n 39 \"http://dx.doi.org/10.1002/exampleMethodsSeaStateDOI.ch1\",\n 40 \"http://dx.doi.org/10.1002/exampleMethodsOceanStressDOI.ch1\"\n 41 ],\n 42 \"publishingPrinciples\": [\n 43 {\n 44 \"@type\": \"CreativeWork\",\n 45 \"url\": \"http://www.goosocean.org/components/com_oe/oe.php?task=download&id=34494&version=1.0&lang=1&format=1\",\n 46 \"name\": \"Ocean Observations Physics and Climate Panel (OOPC) Sea State GOOS EOV Specification Sheet\",\n 47 \"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. \"\n 48 },", "source": "https://book.oceaninfohub.org/thematics/variables/index.html"}
{"id": "547b167cbd90-4", "text": "48 },\n 49 {\n 50 \"@type\": \"CreativeWork\",\n 51 \"url\": \"http://www.goosocean.org/components/com_oe/oe.php?task=download&id=34507&version=1.0&lang=1&format=1\",\n 52 \"name\": \"Ocean Observations Physics and Climate Panel (OOPC) Ocean Surface Stress GOOS EOV Specification Sheet\",\n 53 \"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. \"\n 54 },\n 55 {\n 56 \"@type\": \"CreativeWork\",\n 57 \"url\": \"http://example.org/id/doc/ID\",\n 58 \"name\": \"QA/QC guidance\",", "source": "https://book.oceaninfohub.org/thematics/variables/index.html"}
{"id": "547b167cbd90-5", "text": "58 \"name\": \"QA/QC guidance\",\n 59 \"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. \"\n 60 }\n 61 ],\n 62 \"distribution\": {\n 63 \"@type\": \"DataDownload\",\n 64 \"contentUrl\": \"http://example.org/archive.do?r=zd_1519\",\n 65 \"encodingFormat\": \"application/zip\"\n 66 },\n 67 \"spatialCoverage\": {\n 68 \"@type\": \"Place\",\n 69 \"geo\": {\n 70 \"@type\": \"GeoShape\",\n 71 \"polygon\": \"142.014 10.161667,142.014 18.033833,147.997833 18.033833,147.997833 10.161667,142.014 10.161667\"\n 72 },\n 73 \"additionalProperty\": {\n 74 \"@type\": \"PropertyValue\",\n 75 \"propertyID\": \"http://dbpedia.org/resource/Spatial_reference_system\",", "source": "https://book.oceaninfohub.org/thematics/variables/index.html"}
{"id": "547b167cbd90-6", "text": "75 \"propertyID\": \"http://dbpedia.org/resource/Spatial_reference_system\",\n 76 \"value\": \"http://www.w3.org/2003/01/geo/wgs84_pos#lat_long\"\n 77 }\n 78 },\n 79 \"provider\": [\n 80 {\n 81 \"@id\": \"https://oceanexpert.org/institution/INSTITUTE_ID\",\n 82 \"@type\": \"Organization\",\n 83 \"legalName\": \"Example University\",\n 84 \"name\": \"Example University\",\n 85 \"url\": \"https://oceanexpert.org/institution/INSTITUTE_ID\"\n 86 }\n 87 ],\n 88 \"about\": {\n 89 \"@type\": \"Event\",\n 90 \"description\": \"describe the activity, might include name here too.\",\n 91 \"name\": \"Measurement of sea state\",\n 92 \"potentialAction\": [\n 93 {\n 94 \"@type\": \"Action\",\n 95 \"name\": \"Measurement of sea state\",\n 96 \"instrument\": {\n 97 \"@type\": \"Thing\",\n 98 \"name\": \"OceanWaveS WaMoS II 500 waves and surface current radar\",", "source": "https://book.oceaninfohub.org/thematics/variables/index.html"}
{"id": "547b167cbd90-7", "text": "99 \"url\": \"http://vocab.nerc.ac.uk/collection/L22/current/TOOL0999/\",\n100 \"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.\"\n101 }\n102 },\n103 {\n104 \"@type\": \"Action\",\n105 \"name\": \"Measurement of ocean stress\",\n106 \"instrument\": {\n107 \"@type\": \"Thing\",\n108 \"name\": \"Metek uSonic-3 Scientific {formerly: USA-1} ultrasonic anemometer\",\n109 \"url\": \"http://vocab.nerc.ac.uk/collection/L22/current/TOOL1402/\",", "source": "https://book.oceaninfohub.org/thematics/variables/index.html"}
{"id": "547b167cbd90-8", "text": "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. \"\n111 }\n112 }\n113 ]\n114 },\n115 \"datePublished\": \"2018-07-29\",\n116 \"dateModified\": \"2018-07-30T14:30Z\",\n117 \"temporalCoverage\": \"2012-09-20/2016-01-22\"\n118}\nlicense#\nAs licenses are an important cross-cutting item there is a separate section on licenses\nat: License chapter\nkeywords#\nAs keywords are an important cross-cutting item there is a separate section on keywords\nat: Keywords chapter\nvariableMeasured#\nA key section detailing approaches to describing variables. This property expects either of text or\nthe more detailed schema:PropertyValue.\nNote\nThere can be multiple links in the proertyID property. Preference should be given to those with semantic descriptions.\nNote", "source": "https://book.oceaninfohub.org/thematics/variables/index.html"}
{"id": "547b167cbd90-9", "text": "Note\nIn cases where a single value can be associated with a variable, or a min max value, this can be provided along with a\nunitCode property. In cases where a variable represents a large collection of data this can be omitted and the data obtained\nin a distribution reference.\nSee also\nSee also: Science on Schema variable\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/variables/graphs/obisData2.json\") as dgraph:\n doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@type\": \"Dataset\",\n \"variableMeasured\": \"\"\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)", "source": "https://book.oceaninfohub.org/thematics/variables/index.html"}
{"id": "547b167cbd90-10", "text": "framed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://example.org/dataset/12345\",\n \"@type\": \"Dataset\",\n \"variableMeasured\": [\n {\n \"@type\": \"PropertyValue\",\n \"description\": \"Sea State is the characterization of wave and swell, typically in terms of height, wavelength, period, and directional wave energy flux \",\n \"name\": \"Sea State\",\n \"propertyID\": [\n \"http://purl.obolibrary.org/obo/ENVO_01001374\",", "source": "https://book.oceaninfohub.org/thematics/variables/index.html"}
{"id": "547b167cbd90-11", "text": "\"https://gcmd.earthdata.nasa.gov/KeywordViewer/scheme/all/11aca777-8a01-42ce-b076-b3059c3d8cae?gtm_keyword=SEA%20STATE>m_scheme=Earth%20Science\"\n ]\n },\n {\n \"@type\": \"PropertyValue\",\n \"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.\",\n \"name\": \"Ocean Surface Stress\",\n \"propertyID\": \"http://purl.obolibrary.org/obo/ENVO_01001844\",\n \"unitCode\": \"http://qudt.org/vocab/unit/N-PER-M2\",\n \"value\": 0.2\n }\n ]\n}\nmeasurementTechnique#\nhttps://schema.org/measurementTechnique is used to provide either\ntext about or a URL to information about the techniques or technology used in a Dataset.\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)", "source": "https://book.oceaninfohub.org/thematics/variables/index.html"}
{"id": "547b167cbd90-12", "text": "parentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/variables/graphs/obisData2.json\") as dgraph:\n doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@type\": \"Dataset\",\n \"measurementTechnique\": \"\"\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"", "source": "https://book.oceaninfohub.org/thematics/variables/index.html"}
{"id": "547b167cbd90-13", "text": "{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://example.org/dataset/12345\",\n \"@type\": \"Dataset\",\n \"measurementTechnique\": [\n \"http://dx.doi.org/10.1002/exampleMethodsSeaStateDOI.ch1\",\n \"http://dx.doi.org/10.1002/exampleMethodsOceanStressDOI.ch1\"\n ]\n}\npublishingPrinciples#\nAs defined in the Linking to Principles\nsection on publishing principles, This can be used to connect CreativeWork, Organization, or Person to either of\nCreativeWork or URL. So this allows us to link a CreativeWork to a policy or principle statement.\nThis has some very useful use cases where resources can be grouped based on their connection to those principles and policies.\nFor this section on EOVs, it is used to link in the specification sheets for the measured variables. This can also be used to link\nin QA/QC documentation. There is no direct connection between the creative works linked here and the measured variables though convention\nwould be to keep the order the same if possible. Such order is not maintained through potential serialization of the JSON-LD records though\nlist order can be maintained with an @list keyword.\nimport json", "source": "https://book.oceaninfohub.org/thematics/variables/index.html"}
{"id": "547b167cbd90-14", "text": "list order can be maintained with an @list keyword.\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/variables/graphs/obisData2.json\") as dgraph:\n doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@type\": \"Dataset\",\n \"publishingPrinciples\": \"\"\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)", "source": "https://book.oceaninfohub.org/thematics/variables/index.html"}
{"id": "547b167cbd90-15", "text": "print(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://example.org/dataset/12345\",\n \"@type\": \"Dataset\",\n \"publishingPrinciples\": [\n {\n \"@type\": \"CreativeWork\",\n \"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. \",\n \"name\": \"Ocean Observations Physics and Climate Panel (OOPC) Sea State GOOS EOV Specification Sheet\",", "source": "https://book.oceaninfohub.org/thematics/variables/index.html"}
{"id": "547b167cbd90-16", "text": "\"url\": \"http://www.goosocean.org/components/com_oe/oe.php?task=download&id=34494&version=1.0&lang=1&format=1\"\n },\n {\n \"@type\": \"CreativeWork\",\n \"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. \",\n \"name\": \"Ocean Observations Physics and Climate Panel (OOPC) Ocean Surface Stress GOOS EOV Specification Sheet\",\n \"url\": \"http://www.goosocean.org/components/com_oe/oe.php?task=download&id=34507&version=1.0&lang=1&format=1\"\n },\n {\n \"@type\": \"CreativeWork\",\n \"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. \",", "source": "https://book.oceaninfohub.org/thematics/variables/index.html"}
{"id": "547b167cbd90-17", "text": "\"name\": \"QA/QC guidance\",\n \"url\": \"http://example.org/id/doc/ID\"\n }\n ]\n}\nspatialCoverage#\nMore details on spatial elements are found\nat: Spatial Geometry\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/variables/graphs/obisData2.json\") as dgraph:\n doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@type\": \"Dataset\",\n \"spatialCoverage\": \"\"\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)", "source": "https://book.oceaninfohub.org/thematics/variables/index.html"}
{"id": "547b167cbd90-18", "text": "jd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://example.org/dataset/12345\",\n \"@type\": \"Dataset\",\n \"spatialCoverage\": {\n \"@type\": \"Place\",\n \"additionalProperty\": {\n \"@type\": \"PropertyValue\",\n \"propertyID\": \"http://dbpedia.org/resource/Spatial_reference_system\",\n \"value\": \"http://www.w3.org/2003/01/geo/wgs84_pos#lat_long\"\n },\n \"geo\": {\n \"@type\": \"GeoShape\",", "source": "https://book.oceaninfohub.org/thematics/variables/index.html"}
{"id": "547b167cbd90-19", "text": "},\n \"geo\": {\n \"@type\": \"GeoShape\",\n \"polygon\": \"142.014 10.161667,142.014 18.033833,147.997833 18.033833,147.997833 10.161667,142.014 10.161667\"\n }\n }\n}\nabout#\nThis section is an attempt to leverage schema.org to link instrument information. This is done via the Event type with a\nconnected Action type.\nSee also\nSee also Identifier and Prov subjectOf and inverse about.\nschema:about connects the subject matter of the content.\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/variables/graphs/obisData2.json\") as dgraph:\n doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},", "source": "https://book.oceaninfohub.org/thematics/variables/index.html"}
{"id": "547b167cbd90-20", "text": "frame = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@type\": \"Dataset\",\n \"about\": \"\"\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://example.org/dataset/12345\",\n \"@type\": \"Dataset\",\n \"about\": {\n \"@type\": \"Event\",\n \"description\": \"describe the activity, might include name here too.\",", "source": "https://book.oceaninfohub.org/thematics/variables/index.html"}
{"id": "547b167cbd90-21", "text": "\"description\": \"describe the activity, might include name here too.\",\n \"name\": \"Measurement of sea state\",\n \"potentialAction\": [\n {\n \"@type\": \"Action\",\n \"instrument\": {\n \"@type\": \"Thing\",\n \"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.\",\n \"name\": \"OceanWaveS WaMoS II 500 waves and surface current radar\",\n \"url\": \"http://vocab.nerc.ac.uk/collection/L22/current/TOOL0999/\"\n },\n \"name\": \"Measurement of sea state\"\n },\n {\n \"@type\": \"Action\",\n \"instrument\": {\n \"@type\": \"Thing\",", "source": "https://book.oceaninfohub.org/thematics/variables/index.html"}
{"id": "547b167cbd90-22", "text": "\"instrument\": {\n \"@type\": \"Thing\",\n \"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. \",\n \"name\": \"Metek uSonic-3 Scientific {formerly: USA-1} ultrasonic anemometer\",\n \"url\": \"http://vocab.nerc.ac.uk/collection/L22/current/TOOL1402/\"\n },\n \"name\": \"Measurement of ocean stress\"\n }\n ]\n }\n}\ntemporalCoverage#\nRepresentation of temporal coverage follows ISO 8601 patterns. ESIP Science on Schema\nas has patterns for Deep Time (geologic time) patterns.\nSee also\nThis section is based on the\nScience on Schema Temporal Coverage\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys", "source": "https://book.oceaninfohub.org/thematics/variables/index.html"}
{"id": "547b167cbd90-23", "text": "from pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/variables/graphs/obisData2.json\") as dgraph:\n doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@type\": \"Dataset\",\n \"temporalCoverage\": \"\"\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document", "source": "https://book.oceaninfohub.org/thematics/variables/index.html"}
{"id": "547b167cbd90-24", "text": "Fontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://example.org/dataset/12345\",\n \"@type\": \"Dataset\",\n \"temporalCoverage\": \"2012-09-20/2016-01-22\"\n}\nScience on Schema temporalCoverage#\nExample from Science on Schema recommendations:\n 1{ \"@context\": {\n 2 \"@vocab\": \"https://schema.org/\",\n 3 \"time\": \"http://www.w3.org/2006/time#\"\n 4},\n 5\n 6\"@type\": \"Dataset\",\n 7 \"description\": \"Eruptive activity at Mt. St. Helens, Washington, March 1980 - January 1981\",\n 8 \"temporalCoverage\": [\"1980-03-27T19:36:00/1981-01-03T00:00:00Z\",\n 9 {\n10 \"@type\": \"time:ProperInterval\",\n11 \"time:hasBeginning\": {\n12 \"@type\": \"time:Instant\",", "source": "https://book.oceaninfohub.org/thematics/variables/index.html"}
{"id": "547b167cbd90-25", "text": "12 \"@type\": \"time:Instant\",\n13 \"time:inXSDDateTimeStamp\": \"1980-03-27T19:36:00Z\"\n14 },\n15 \"time:hasEnd\": {\n16 \"@type\": \"time:Instant\",\n17 \"time:inXSDDateTimeStamp\": \"1981-01-03T00:00:00Z\"\n18 }\n19 }]\n20}", "source": "https://book.oceaninfohub.org/thematics/variables/index.html"}
{"id": "bebedc8754f9-0", "text": "Spatial Maps#\nAbout#\nMap: A map represented by a static file or document\nThe schema.org type Map only offers one special property beyond\nthe parent CreativeWork. That is a mapType which is an\nenumeration of types that do not apply to OIH use cases. However, the use of the\nMap typing itself may aid in narrowing search requests later to a specific creative work.\nSchema.org type Map is a subtype of CreativeWork. As such, we can all the approaches\ndescribed in the Documents section for this type as well. The use\nof type Map would be focused on documenting files such as KML, GeoJSON or others as a\ncreative work that may be downloaded and used either in a workflow or directly.\nA map in this context would be a static file or document of some sort. Map services like\nthose described by an OGC Catalogue Service or other GIS service would be described as a\nservice. Potential approaches for doing can be seen the service type.\nNote\nIn the current context, schema.org Map typically references maps as a document.\nHere we are likely to reference a KML, Shapefile or GeoPackage. We may wish to then\nindicate the type of document it is through a mimetype via encoding.\n 1{\n 2 \"@context\": {\n 3 \"@vocab\": \"https://schema.org/\"\n 4 },", "source": "https://book.oceaninfohub.org/thematics/docs/maps.html"}
{"id": "bebedc8754f9-1", "text": "3 \"@vocab\": \"https://schema.org/\"\n 4 },\n 5 \"@type\": \"Map\",\n 6 \"@id\": \"https://example.org/id/XYZ\",\n 7 \"name\": \"Name or title of the document\",\n 8 \"description\": \"Description of the map to aid in searching\",\n 9 \"url\": \"https://www.sample-data-repository.org/creativework/map.pdf\",\n10 \"identifier\": {\n11 \"@id\": \"https://doi.org/10.5066/F7VX0DMQ\",\n12 \"@type\": \"PropertyValue\",\n13 \"propertyID\": \"https://registry.identifiers.org/registry/doi\",\n14 \"value\": \"doi:10.5066/F7VX0DMQ\",\n15 \"url\": \"https://doi.org/10.5066/F7VX0DMQ\"\n16 },\n17 \"keywords\": [\n18 {\n19 \"@id\": \"http://purl.org/dc/dcmitype/Image\",\n20 \"@type\": \"DefinedTerm\",\n21 \"inDefinedTermSet\": \"http://purl.org/dc/terms/DCMIType\",\n22 \"termCode\": \"Image\",\n23 \"name\": \"Image\"\n24 },\n25 \"Region X\",", "source": "https://book.oceaninfohub.org/thematics/docs/maps.html"}
{"id": "bebedc8754f9-2", "text": "23 \"name\": \"Image\"\n24 },\n25 \"Region X\",\n26 {\n27 \"@id\": \"https://www.wikidata.org/wiki/Q350134\",\n28 \"@type\": \"URL\",\n29 \"url\": \"https://www.wikidata.org/wiki/Q350134\",\n30 \"name\": \"North Atlantic Ocean\"\n31 }\n32 ]\n33}\nimport json\nfrom pyld import jsonld\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/docs/graphs/map.json\") as dgraph:\n doc = json.load(dgraph)\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\njbutils.show_graph(compacted)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document", "source": "https://book.oceaninfohub.org/thematics/docs/maps.html"}
{"id": "bebedc8754f9-3", "text": "Fontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nDetails: Identifier#\nFor each profile there are a few key elements we need to know about. One\nkey element is what the authoritative reference or canonical identifier is for\na resource.\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/docs/graphs/map.json\") as dgraph:\n doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@requireAll\": \"true\",\n \"@type\": \"Map\",\n \"identifier\": \"\"\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)", "source": "https://book.oceaninfohub.org/thematics/docs/maps.html"}
{"id": "bebedc8754f9-4", "text": "framed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://example.org/id/XYZ\",\n \"@type\": \"Map\",\n \"identifier\": {\n \"@id\": \"https://doi.org/10.5066/F7VX0DMQ\",\n \"@type\": \"PropertyValue\",\n \"propertyID\": \"https://registry.identifiers.org/registry/doi\",\n \"url\": \"https://doi.org/10.5066/F7VX0DMQ\",\n \"value\": \"doi:10.5066/F7VX0DMQ\"\n }\n}\nKeywords#", "source": "https://book.oceaninfohub.org/thematics/docs/maps.html"}
{"id": "bebedc8754f9-5", "text": "}\n}\nKeywords#\nWe can see three different approaches here to defining keywords.\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/docs/graphs/map.json\") as dgraph:\n doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@requireAll\": \"true\",\n \"@type\": \"Map\",\n \"keywords\": \"\"\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)", "source": "https://book.oceaninfohub.org/thematics/docs/maps.html"}
{"id": "bebedc8754f9-6", "text": "print(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://example.org/id/XYZ\",\n \"@type\": \"Map\",\n \"keywords\": [\n {\n \"@id\": \"http://purl.org/dc/dcmitype/Image\",\n \"@type\": \"DefinedTerm\",\n \"inDefinedTermSet\": \"http://purl.org/dc/terms/DCMIType\",\n \"name\": \"Image\",\n \"termCode\": \"Image\"\n },\n \"Region X\",\n {\n \"@id\": \"https://www.wikidata.org/wiki/Q350134\",\n \"@type\": \"URL\",\n \"name\": \"North Atlantic Ocean\",\n \"url\": \"https://www.wikidata.org/wiki/Q350134\"", "source": "https://book.oceaninfohub.org/thematics/docs/maps.html"}
{"id": "bebedc8754f9-7", "text": "\"url\": \"https://www.wikidata.org/wiki/Q350134\"\n }\n ]\n}\nReferences#\nFor dataset we can use SOS Dataset\nOBPS group is using JericoS3 API (ref: https://www.jerico-ri.eu/)\nTraditional knowledge points here\nsounds like they use dspace\nFor other document these are likely going to be some schema:CretiveWork with there being many subtypes we can explore. See also here Adam Leadbetter\u2019s work at Ocean best practices\nThis is a great start and perhaps helps to highlight why SHACL shapes are useful\nhttps://irishmarineinstitute.github.io/erddap-lint/\nhttps://github.com/earthcubearchitecture-project418/p419dcatservices/blob/master/CHORDS/DataFeed.jsonld\n*EMODnet (Coner Delaney)\nERDAP also\nAre we talking links from schema.org that link to OGC and ERDAP services\nAre these methods?\nSounds like may link to external metadata for interop they have developed in the community\nNOAA connected as well\nInterested in OGC assets\nERDAP data platform", "source": "https://book.oceaninfohub.org/thematics/docs/maps.html"}
{"id": "88a1579cdc2c-0", "text": "Documents#\nAbout#\nDocuments: These include datasets, reports or other documents\nSee also\nFor OIH the focus is on generic documents which can scope reports, data and other resources.\nIn those cases where the resources being described are of type Dataset you may wish to review\npatterns developed for GeoScience Datasets by the ESIP\nScience on Schema community.\nCreative works (documents)#\nDocuments will include maps, reports,\nguidance and other creative works. Due to this OIH will focus on a generic example\nof schema.org/CreativeWork and then provide examples\nfor more focused creative work examples.\n 1{\n 2 \"@context\": {\n 3 \"@vocab\": \"https://schema.org/\"\n 4 },\n 5 \"@type\": \"CreativeWork\",\n 6 \"@id\": \"https://example.org/id/XYZ\",\n 7 \"name\": \"Name or title of the document\",\n 8 \"description\": \"Description of the creative work to aid in searching\",\n 9 \"url\": \"https://www.sample-data-repository.org/creativework/report.pdf\",\n10 \"contributor\": {\n11 \"@type\": \"Organization\",\n12 \"@id\": \"http://www.foo.org/orgID\",\n13 \"legalName\": \"Some Institute\"\n14 },\n15 \"author\": {", "source": "https://book.oceaninfohub.org/thematics/docs/index.html"}
{"id": "88a1579cdc2c-1", "text": "14 },\n15 \"author\": {\n16 \"@id\": \"https://www.sample-data-repository.org/person/51317\",\n17 \"@type\": \"Person\",\n18 \"name\": \"Dr Uta Passow\",\n19 \"givenName\": \"Uta\",\n20 \"familyName\": \"Passow\",\n21 \"url\": \"https://www.sample-data-repository.org/person/51317\"\n22 },\n23 \"identifier\": {\n24 \"@id\": \"https://doi.org/10.5066/F7VX0DMQ\",\n25 \"@type\": \"PropertyValue\",\n26 \"propertyID\": \"https://registry.identifiers.org/registry/doi\",\n27 \"value\": \"doi:10.5066/F7VX0DMQ\",\n28 \"url\": \"https://doi.org/10.5066/F7VX0DMQ\"\n29 },\n30 \"keywords\": {\n31 \"@type\": \"DefinedTerm\",\n32 \"inDefinedTermSet\": {\n33 \"@type\": \"DefinedTermSet\",\n34 \"name\": \"Name of the set\",\n35 \"description\": \"Description of the set\",\n36 \"url\": \"url for the set\"\n37 },", "source": "https://book.oceaninfohub.org/thematics/docs/index.html"}
{"id": "88a1579cdc2c-2", "text": "36 \"url\": \"url for the set\"\n37 },\n38 \"termCode\": \"A code that identifies this DefinedTerm within a DefinedTermSet\"\n39 },\n40 \"provider\": {\n41 \"@id\": \"https://www.repositoryB.org\",\n42 \"@type\": \"Organization\",\n43 \"legalName\": \"Sample Data Repository Office\",\n44 \"name\": \"SDRO\",\n45 \"sameAs\": \"http://www.re3data.org/repository/r3dxxxxxxxxx\",\n46 \"url\": \"https://www.sample-data-repository.org\"\n47 },\n48 \"license\": \"http://spdx.org/licenses/CC0-1.0\",\n49 \"publisher\": {\n50 \"@id\": \"https://www.publishingrus.org\",\n51 \"@type\": \"Organization\",\n52 \"legalName\": \"Some Institute\"\n53 }\n54}\nimport json\nfrom pyld import jsonld\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/docs/graphs/creativework.json\") as dgraph:\n doc = json.load(dgraph)\ncontext = {", "source": "https://book.oceaninfohub.org/thematics/docs/index.html"}
{"id": "88a1579cdc2c-3", "text": "doc = json.load(dgraph)\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\njbutils.show_graph(compacted)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nDetails: Indentifier#\nFor each profile there are a few key elements we need to know about. One\nkey element is what the authoritative reference or canonical identifier is for\na resource.\nimport json\nfrom pyld import jsonld\nimport os, sys\nimport urllib\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nwith open(\"../../../odis-in/dataGraphs/thematics/docs/graphs/creativework.json\") as dgraph:\n doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},", "source": "https://book.oceaninfohub.org/thematics/docs/index.html"}
{"id": "88a1579cdc2c-4", "text": "frame = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@requireAll\": \"true\",\n \"@type\": \"CreativeWork\",\n \"identifier\": \"\"\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://example.org/id/XYZ\",\n \"@type\": \"CreativeWork\",\n \"identifier\": {\n \"@id\": \"https://doi.org/10.5066/F7VX0DMQ\",", "source": "https://book.oceaninfohub.org/thematics/docs/index.html"}
{"id": "88a1579cdc2c-5", "text": "\"@type\": \"PropertyValue\",\n \"propertyID\": \"https://registry.identifiers.org/registry/doi\",\n \"url\": \"https://doi.org/10.5066/F7VX0DMQ\",\n \"value\": \"doi:10.5066/F7VX0DMQ\"\n }\n}\nPublisher and provider#\nOur JSON-LD documents are graphs that can use framing to subset. In this case\nwe can look closer at the provider and publisher properties, which are both\nof type Organization.\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/docs/graphs/creativework.json\") as dgraph:\n doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@type\": \"CreativeWork\",\n \"provider\": {},\n \"publisher\": {}", "source": "https://book.oceaninfohub.org/thematics/docs/index.html"}
{"id": "88a1579cdc2c-6", "text": "\"provider\": {},\n \"publisher\": {}\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://example.org/id/XYZ\",\n \"@type\": \"CreativeWork\",\n \"provider\": {\n \"@id\": \"https://www.repositoryB.org\",\n \"@type\": \"Organization\",\n \"legalName\": \"Sample Data Repository Office\",\n \"name\": \"SDRO\",\n \"sameAs\": \"http://www.re3data.org/repository/r3dxxxxxxxxx\",", "source": "https://book.oceaninfohub.org/thematics/docs/index.html"}
{"id": "88a1579cdc2c-7", "text": "\"url\": \"https://www.sample-data-repository.org\"\n },\n \"publisher\": {\n \"@id\": \"https://www.publishingrus.org\",\n \"@type\": \"Organization\",\n \"legalName\": \"Some Institute\"\n }\n}\nAuthor type Person#\nOur JSON-LD documents are graphs that can use framing to subset. In this\ncase we can look closer at the author property which points to a type Person.\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/docs/graphs/creativework.json\") as dgraph:\n doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@type\": \"CreativeWork\",\n \"author\": \"\"\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}", "source": "https://book.oceaninfohub.org/thematics/docs/index.html"}
{"id": "88a1579cdc2c-8", "text": "}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://example.org/id/XYZ\",\n \"@type\": \"CreativeWork\",\n \"author\": {\n \"@id\": \"https://www.sample-data-repository.org/person/51317\",\n \"@type\": \"Person\",\n \"familyName\": \"Passow\",\n \"givenName\": \"Uta\",\n \"name\": \"Dr Uta Passow\",", "source": "https://book.oceaninfohub.org/thematics/docs/index.html"}
{"id": "88a1579cdc2c-9", "text": "\"name\": \"Dr Uta Passow\",\n \"url\": \"https://www.sample-data-repository.org/person/51317\"\n }\n}\nLicense#\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/thematics/docs/graphs/creativework.json\") as dgraph:\n doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\"},\n \"@explicit\": \"true\",\n \"@type\": \"CreativeWork\",\n \"license\": {}\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\njbutils.show_graph(framed)", "source": "https://book.oceaninfohub.org/thematics/docs/index.html"}
{"id": "88a1579cdc2c-10", "text": "print(jd)\njbutils.show_graph(framed)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@id\": \"https://example.org/id/XYZ\",\n \"@type\": \"CreativeWork\",\n \"license\": \"http://spdx.org/licenses/CC0-1.0\"\n}\nLicense as URL#\n{\n \"@context\": \"https://schema.org/\",\n \"license\": \"https://creativecommons.org/licenses/by/4.0/\"\n}\nLicense as CreativeWork#\n{\n \"@context\": \"https://schema.org/\",\n \"license\": {\n \"@type\": \"CreativeWork\",\n \"name\": \"Creative Commons Attribution 4.0\",\n \"url\": \"https://creativecommons.org/licenses/by/4.0/\"\n }\n}\nLicense as SPDX URL#", "source": "https://book.oceaninfohub.org/thematics/docs/index.html"}
{"id": "88a1579cdc2c-11", "text": "}\n}\nLicense as SPDX URL#\nUse a simple URL\nSPDX creates URLs for many licenses including those that don\u2019t have URLs\nFrom a source that harvesters can rely on (e.g. use URL to lookup more information about the license)\n{\n \"@context\": \"https://schema.org/\",\n \"license\": \"https://spdx.org/licenses/CC-BY-4.0\"\n}\nOR, include both the SPDX and the Creative Commons URLs in an array:\n{\n \"@context\": \"https://schema.org/\",\n \"license\": [\"https://spdx.org/licenses/CC-BY-4.0\", \"https://creativecommons.org/licenses/by/4.0/\"]\n}\nReferences#\nFor dataset we can use SOS Dataset\nOBPS group is using JericoS3 API (ref: https://www.jerico-ri.eu/)\nTraditional knowledge points here\nsounds like they use dspace\nFor other document these are likely going to be some schema:CretiveWork with there being many subtypes we can explore. See also here Adam Leadbetter\u2019s work at Ocean best practices\nThis is a great start and perhaps helps to highlight why SHACL shapes are useful\nhttps://irishmarineinstitute.github.io/erddap-lint/", "source": "https://book.oceaninfohub.org/thematics/docs/index.html"}
{"id": "88a1579cdc2c-12", "text": "https://irishmarineinstitute.github.io/erddap-lint/\nhttps://github.com/earthcubearchitecture-project418/p419dcatservices/blob/master/CHORDS/DataFeed.jsonld\n*EMODnet (Coner Delaney)\nERDAP also\nAre we talking links from schema.org that link to OGC and ERDAP services\nAre these methods?\nSounds like may link to external metadata for interop they have developed in the community\nNOAA connected as well\nInterested in OGC assets\nERDAP data platform", "source": "https://book.oceaninfohub.org/thematics/docs/index.html"}
{"id": "53b3b717a3a2-0", "text": "Validation#\nAbout#\nThis section contains some initial work on developing some validation\napproaches for OIH. The focus initially is not on validating approaches with\nthe full publishing guidance. Rather the focuses is on the the \u201cinfo hub\u201d as a\nsearch application and develops validation to support that.\nWell Formed JSON-LD#\nSDO Validator\nStructured data Linter\nJSON-LD Playground\nShape Validation#\nInitial approach:\nDevelop a base SHACL document that assess a data graph based on elements needed to support search\nSHACL\nLeverage SHACL Playground\nRDFShape at https://rdfshape.weso.es/ and https://rdfshape.herokuapp.com/\nTo support this will need an initial data graph to work with. The type is not\nimportant. All types will need to satisfy the search needs.\nExamples of these needs include:\nHave an @id\nHave a name\nHave a description\nHave a Distribution and contentURL\nReference authority", "source": "https://book.oceaninfohub.org/validation/index.html"}
{"id": "ed94a3609feb-0", "text": "SPARQL#\nIntroduction#\nThis notebook will go over some concepts for querying the graph that is generated by the Ocean InfoHub.\nThe product of the publishing and indexing process is a graph. This graph follows the W3C Resource Description\nFramework (RDF). RDF is a data model that can be represented in various text encodings. Among these\nis the JSON-LD format we have been using in the publishing process.\nNot all graph libraries and databases support JSON-LD yet, so as part of the aggregation process one step\nis to simply translate this format into a format that is supported by the graph database. Typically we\nuse something n-triples or turtle for this. There are many tools for translating RDF from one format to another.\nWe can load the graphs into a graph database and this was documented in the Aggregation section, so we will not\nrevisit it here. In this notebook, we will load the graph into a local graph database in the Python library\nthat also supports the same query language our graph databases use. This will make the demonstration easier and\nallow you to download and run this notebook on your own machine if you wish. The query language we will use\nis SPARQL.\nSPARQL#\nSPARQL (SPARQL Protocol and RDF Query Language) is the query language that is used to query RDF graphs. It", "source": "https://book.oceaninfohub.org/users/query.html"}
{"id": "ed94a3609feb-1", "text": "is a W3C recommendation documented at SPARQL 1.1 Query Language.\nLoad a Graph#\nFor this demonstration we will be using Python to load the graph and do our queries. However, there are many\nlanguages and libraries for working with graphs and SPARQL. Also, you can often query a graph using web UIs\ninfront of your graph database or even with simple direct HTTP requests. Examples of some of these can be\nfound in other sections of the OIH documentation.\nimport rdflib\ng = rdflib.Graph()\ng.parse(\"../tooling/notebooks/data/oceanexperts_graph.ttl\", format=\"ttl\")\n)>\nLet\u2019s define our first query#\nThis is a simple query that will return all the triples in the graph. Recall an RDF graph is make of triples defined by a subject, predicate and object. You can review RDF at the W3C RDF Primer (https://www.w3.org/TR/rdf11-concepts/). SPARQL allows us to do a type of pattern matching on the graph by defining a pattern we a relooking for.", "source": "https://book.oceaninfohub.org/users/query.html"}
{"id": "ed94a3609feb-2", "text": "Here we define ?s ?p ?o as the pattern we are looking for. The ? is a variable that can be used to match any value. In this case, we are looking for all the triples in the graph. We have used s, p and o to as simple names for our subject, predicate, object elements of the RDF triple.\nSince this would match ALL the values in the graph, which would be a lot, we have added a LIMIT option to reduce the number of resutls returned.\nYou could also try these queries at: https://oceans.collaborium.io/sparql.html\ns1 = \"\"\"\n SELECT ?s ?p ?o\n WHERE {\n ?s ?p ?o .\n }\n LIMIT 3\n\"\"\"\nRun the query#\nWe will run this query, and print out the results\nfrom icecream import ic\nfor row in g.query(s1):\n ic(row.asdict())\nic| row.asdict(): {'o': rdflib.term.Literal('2014-06-02'),\n 'p': rdflib.term.URIRef('https://schema.org/startDate'),\n 's': rdflib.term.BNode('n0dfe00a0174f48a7b9fb702b5f5b4ecdb236')}", "source": "https://book.oceaninfohub.org/users/query.html"}
{"id": "ed94a3609feb-3", "text": "ic| row.asdict(): {'o': rdflib.term.Literal(' Copenhagen Denmark '),\n 'p': rdflib.term.URIRef('https://schema.org/address'),\n 's': rdflib.term.BNode('n0dfe00a0174f48a7b9fb702b5f5b4ecdb496')}\nic| row.asdict(): {'o': rdflib.term.Literal('Introduction to Ocean Data Management for Students of the Environment Group II'),\n 'p': rdflib.term.URIRef('https://schema.org/name'),\n 's': rdflib.term.BNode('n0dfe00a0174f48a7b9fb702b5f5b4ecdb1745')}\nNicer formatting#\nWe can do a bit of formatting to see our results in a nicer way.\nfor row in g.query(s1):\n s = row[\"s\"].n3()\n p = row[\"p\"].n3()\n o = row[\"o\"].n3()\n ic(s, p, o)\nic| s: '_:n0dfe00a0174f48a7b9fb702b5f5b4ecdb236'\n p: ''\n o: '\"2014-06-02\"'", "source": "https://book.oceaninfohub.org/users/query.html"}
{"id": "ed94a3609feb-4", "text": "o: '\"2014-06-02\"'\nic| s: '_:n0dfe00a0174f48a7b9fb702b5f5b4ecdb496'\n p: ''\n o: '\" Copenhagen Denmark \"'\nic| s: '_:n0dfe00a0174f48a7b9fb702b5f5b4ecdb1745'\n p: ''\n o: ('\"Introduction to Ocean Data Management for Students of the Environment Group '\n 'II\"')\nKGLab#\nAs mentioned, this intro is based on the nice work done by KGLab (https://derwen.ai/docs/kgl/) both in their library and documentation. We wll import kglab here and take advantage of some of their nice features. In particular some nice functioons to load our graph and query it with results into a Dataframe.\nimport kglab\nnamespaces = {\n \"schema\": \"https://schema.org/\",\n }\nkg = kglab.KnowledgeGraph(\n name = \"Demonstration Graph\",\n base_uri = \"https://oceaninfohub.org/id/\",\n namespaces = namespaces,\n )", "source": "https://book.oceaninfohub.org/users/query.html"}
{"id": "ed94a3609feb-5", "text": "namespaces = namespaces,\n )\nkg.load_rdf(\"../tooling/notebooks/data/oceanexperts_graph.ttl\")\n/home/fils/.conda/envs/kglab/lib/python3.8/site-packages/owlrl/__init__.py:177: UserWarning: Code: dateTimeStamp is not defined in namespace XSD\n from . import DatatypeHandling, Closure\n/home/fils/.conda/envs/kglab/lib/python3.8/site-packages/owlrl/RDFSClosure.py:40: UserWarning: Code: dateTimeStamp is not defined in namespace XSD\n from owlrl.AxiomaticTriples import RDFS_Axiomatic_Triples, RDFS_D_Axiomatic_Triples\n/home/fils/.conda/envs/kglab/lib/python3.8/site-packages/owlrl/RDFSClosure.py:40: UserWarning: Code: length is not defined in namespace XSD\n from owlrl.AxiomaticTriples import RDFS_Axiomatic_Triples, RDFS_D_Axiomatic_Triples\n/home/fils/.conda/envs/kglab/lib/python3.8/site-packages/owlrl/RDFSClosure.py:40: UserWarning: Code: maxExclusive is not defined in namespace XSD\n from owlrl.AxiomaticTriples import RDFS_Axiomatic_Triples, RDFS_D_Axiomatic_Triples", "source": "https://book.oceaninfohub.org/users/query.html"}
{"id": "ed94a3609feb-6", "text": "/home/fils/.conda/envs/kglab/lib/python3.8/site-packages/owlrl/RDFSClosure.py:40: UserWarning: Code: maxInclusive is not defined in namespace XSD\n from owlrl.AxiomaticTriples import RDFS_Axiomatic_Triples, RDFS_D_Axiomatic_Triples\n/home/fils/.conda/envs/kglab/lib/python3.8/site-packages/owlrl/RDFSClosure.py:40: UserWarning: Code: maxLength is not defined in namespace XSD\n from owlrl.AxiomaticTriples import RDFS_Axiomatic_Triples, RDFS_D_Axiomatic_Triples\n/home/fils/.conda/envs/kglab/lib/python3.8/site-packages/owlrl/RDFSClosure.py:40: UserWarning: Code: minExclusive is not defined in namespace XSD\n from owlrl.AxiomaticTriples import RDFS_Axiomatic_Triples, RDFS_D_Axiomatic_Triples\n/home/fils/.conda/envs/kglab/lib/python3.8/site-packages/owlrl/RDFSClosure.py:40: UserWarning: Code: minInclusive is not defined in namespace XSD\n from owlrl.AxiomaticTriples import RDFS_Axiomatic_Triples, RDFS_D_Axiomatic_Triples", "source": "https://book.oceaninfohub.org/users/query.html"}
{"id": "ed94a3609feb-7", "text": "/home/fils/.conda/envs/kglab/lib/python3.8/site-packages/owlrl/RDFSClosure.py:40: UserWarning: Code: minLength is not defined in namespace XSD\n from owlrl.AxiomaticTriples import RDFS_Axiomatic_Triples, RDFS_D_Axiomatic_Triples\n/home/fils/.conda/envs/kglab/lib/python3.8/site-packages/owlrl/RDFSClosure.py:40: UserWarning: Code: pattern is not defined in namespace XSD\n from owlrl.AxiomaticTriples import RDFS_Axiomatic_Triples, RDFS_D_Axiomatic_Triples\n/home/fils/.conda/envs/kglab/lib/python3.8/site-packages/owlrl/OWLRL.py:53: UserWarning: Code: dateTimeStamp is not defined in namespace XSD\n from .XsdDatatypes import OWL_RL_Datatypes, OWL_Datatype_Subsumptions\n/home/fils/.conda/envs/kglab/lib/python3.8/site-packages/owlrl/OWLRLExtras.py:64: UserWarning: Code: dateTimeStamp is not defined in namespace XSD\n from .RestrictedDatatype import extract_faceted_datatypes\n\nPREFIX#", "source": "https://book.oceaninfohub.org/users/query.html"}
{"id": "ed94a3609feb-8", "text": "PREFIX#\nLet\u2019s do another query. We will use the PREFIX keyword to define a prefix for the namespace. This is a way to leverage namespace in our query. Note the use of schema:name vs the https://schema.org/location. The latter is a URI and the former is a prefix. The prefix is defined in the PREFIX keyword. The schema:name is the name of the property that we are querying, the prefix can expand it to a URI. The https://schema.org/location is the URI of the property directly, without use of a prefix. Both work, the prefix can simply make life easier for you and also help avoid hard to find typos where you may miss-type a URI.\nLet\u2019s do a query to see all the location names in our group for training.\ns2 = \"\"\"\nPREFIX schema: \nSELECT DISTINCT ?locname\n WHERE {\n ?s rdf:type .\n ?s ?location .\n ?location schema:name ?locname .\n }\n \"\"\"\nimport pandas as pd\npd.set_option(\"max_rows\", None)\ndf = kg.query_as_df(s2)\ndf.head(5)\nlocname\n0\nLima Peru\n1\nQingdao China\n2\nRussia\n3", "source": "https://book.oceaninfohub.org/users/query.html"}
{"id": "ed94a3609feb-9", "text": "0\nLima Peru\n1\nQingdao China\n2\nRussia\n3\nPlaya del Secreto Puerto Morelos, Mexico\n4\nUniversity of Ghent Ghent Belgium\nLocation Counts#\nThe above is nice, but it doesn\u2019t tell us much about the number of events in each location. We can modify our query to do this. We can leverage the COUNT and GROUP BY capacity of SPARQL to do this. We can then add in ORDER BY to sort the results.\ns3 = \"\"\"\nSELECT DISTINCT ?locname (COUNT(?locname) AS ?count)\n WHERE {\n ?s rdf:type .\n ?s ?location .\n ?location ?locname .\n }\n GROUP BY ?locname\n ORDER BY DESC(?count)\n \"\"\"\nimport pandas as pd\npd.set_option(\"max_rows\", None)\ndf = kg.query_as_df(s3)\ndf.head(5)\nlocname\ncount\n0\nUNESCO/IOC Project Office for IODE Wandelaark...\n28\n1\nRussia\n27\n2\nUNESCO/IOC Project Office for IODE Wandelaark...\n22\n3\nWandelaarkaai 7 8400 Oostende Belgium\n13\n4", "source": "https://book.oceaninfohub.org/users/query.html"}
{"id": "ed94a3609feb-10", "text": "Wandelaarkaai 7 8400 Oostende Belgium\n13\n4\nBelgium\n10\nFILTER#\nGraphs are great for showing relations between objects but our approaches to searching or selecting data can often leverage pattern matching on text strings. We do have some tools in SPARQL for this in the form of FILTER. We can use regex pattern in the FILTER to match text. Let\u2019s use this to find all the locations with \u201cPeru\u201d in the name.\nIn the following we will do a simple FILTER with a regular expression, but you can also do things like:\nSELECT DISTINCT ?s \n WHERE {\n ?s rdf:type .\n FILTER NOT EXISTS { ?s ?instance . } \n }\nwhich in a SPARQL query would require that a hasCourseInstance property is not defined for the Course. That is, Courses that have had no instances made yet.\ns4 = \"\"\"\nSELECT DISTINCT ?locname (COUNT(?locname) AS ?count)\n WHERE {\n ?s rdf:type .\n ?s ?location .\n ?location ?locname .", "source": "https://book.oceaninfohub.org/users/query.html"}
{"id": "ed94a3609feb-11", "text": "?location ?locname .\n FILTER regex(?locname, \".Peru.\", \"i\") .\n }\n GROUP BY ?locname\n \"\"\"\nimport pandas as pd\npd.set_option(\"max_rows\", None)\ndf4 = kg.query_as_df(s4)\ndf4.head(5)\nlocname\ncount\n0\nLima Peru\n1\n1\nDirecci\u00f3n Hidrograf\u00eda y Navegaci\u00f3n de la Arma...\n1\n2\nHotel Palmetto Lima Per\u00fa Peru\n1\nPERU#\nSo we see we have three entries in our graph that have Peru in the name. This is where connecting our group to a shared concept of what Peru is like the WikiData entry for Peru at https://www.wikidata.org/wiki/Q419 would help. That\u2019s a topic for another day.\nDates#\nLet\u2019s look at the dates that are available in the graph.\ns5 = \"\"\"\nSELECT DISTINCT ?sdate (COUNT(?sdate) AS ?count)\n WHERE {\n ?s rdf:type .\n ?s ?instance .\n ?instance ?sdate .\n }\n GROUP BY ?sdate\n \"\"\"", "source": "https://book.oceaninfohub.org/users/query.html"}
{"id": "ed94a3609feb-12", "text": "}\n GROUP BY ?sdate\n \"\"\"\nimport pandas as pd\npd.set_option(\"max_rows\", None)\ndf4 = kg.query_as_df(s5)\ndf4.head(5) # show some results\nsdate\ncount\n0\n2020-06-08\n1\n1\n2011-05-03\n1\n2\n2012-07-16\n1\n3\n2007-07-12\n1\n4\n2019-04-02\n1\nA bit of Pandas#\nHere we will mix in a bit of Pandas to convert our dates to Pandas dates, group and plot. This is not\nSPARQL but rather just some post processing in Pandas. It does still give us an idea of some of the\ninformation we can extract from our graph.\nAlso, when the graph is composed of multiple source we can still conduct the same search across\na shared concept like https://schema.org/Course with CourseInstance connected to a date via startDate.\nThis shared approach by Ocean InfoHub is developed to support the shared data and integration\ngoals among the participants.\ndf4['count'] = df4[\"count\"].astype(int) # convert count c to int\ndf4pd = df4.to_pandas() # convert cudf dataframe to pandas dataframe", "source": "https://book.oceaninfohub.org/users/query.html"}
{"id": "ed94a3609feb-13", "text": "df4pd = df4.to_pandas() # convert cudf dataframe to pandas dataframe\ndf4pd['sdate'] = pd.to_datetime(df4pd['sdate'], format='%Y-%m-%d') # convert date to datetime\ncourseByYear = df4pd.groupby(pd.Grouper(key='sdate', freq='Y')).size() # group by year\nax = courseByYear.plot.bar(rot=80, stacked=True, figsize=(15, 5)) # plot\nMore on Query#\nHere we have gone through an introdcution to the SPARQL query language and how to use it to query our graph.\nWe can look at the SPARQL we use on the larger Ocean Infohub graph.\nReferences#\nThis is a just a quick overview of the SPARQL language. You can find a large amount of information online.\nhttps://derwen.ai/docs/kgl/ex4_0/\nhttps://www.stardog.com/tutorials/getting-started-1/\nhttps://www.dataversity.net/introduction-to-sparql/\nhttps://www.slideshare.net/olafhartig/an-introduction-to-sparql", "source": "https://book.oceaninfohub.org/users/query.html"}
{"id": "8186b7e4d20a-0", "text": "OIH SPARQL#\nAbout#\nThis page will hold some information about the SPARQL queries we use and\nhow they connect with some of the profile guidance in this document. We will\nshow how this relates to and depends on the Gleaner prov as well as the\nAuthoritative Reference elements of the patterns. It is expected that the Gleaner\nprov will be present, though this can be made optional in case other\nindexing systems are used that do not provide this prov shape. The SPARQL will\nbe looking for both Gleaner prov and the Authroitative Reference elements.\nThis will be different for different patterns. For example, it might\nrelate to the publisher provider elements for Creativeworks, but to\nthe identity element for People and Organizations.\n 1prefix prov: \n 2PREFIX con: \n 3PREFIX luc: \n 4PREFIX con-inst: \n 5PREFIX rdfs: \n 6PREFIX schema: ", "source": "https://book.oceaninfohub.org/users/sparql.html"}
{"id": "8186b7e4d20a-1", "text": "6PREFIX schema: \n 7PREFIX schemaold: \n 8PREFIX rdf: \n 9\n10SELECT DISTINCT ?g ?s ?wat ?orgname ?domain ?type ?score ?name ?url ?lit ?description ?headline\n11WHERE {\n12 ?lit bds:search \"coral\" .\n13 ?lit bds:matchAllTerms \"false\" .\n14 ?lit bds:relevance ?score .\n15 graph ?g {\n16 ?s ?p ?lit .\n17 ?s rdf:type ?type . \n18 OPTIONAL { ?s schema:name ?name . }\n19 OPTIONAL { ?s schema:headline ?headline . }\n20 OPTIONAL { ?s schema:url ?url . }\n21 OPTIONAL { ?s schema:description ?description . }\n22 }\n23 ?sp prov:generated ?g .\n24 ?sp prov:used ?used .\n25 ?used prov:hadMember ?hm .\n26 ?hm prov:wasAttributedTo ?wat .\n27 ?wat rdf:name ?orgname .\n28 ?wat rdfs:seeAlso ?domai\n29}", "source": "https://book.oceaninfohub.org/users/sparql.html"}
{"id": "8186b7e4d20a-2", "text": "28 ?wat rdfs:seeAlso ?domai\n29}\n30ORDER BY DESC(?score)\n31LIMIT 30\n32OFFSET 0\nLines 12-14#\nIt should be noted that the above SPARQL is not standards compliant. It leverages some\nvender specific syntax that is not part of the SPARQL standard. This is not uncommon\nas groups will often add their own syntax to offer additional functionality.\nA common one is what is seen here where a full text index is leveraged to allow for more complex\nand faster searches than can be done with FILTER regex. These three lines will\nonly work in the current OIH triplestore (Blazegraph). Other triplestores like Jena\nand other do similar built in function extensions.\nLines 18-21#\nThese line demonstrate the use of the OPTIONAL keyword. These triples are not required\nto be present in a resource. If they are, they will be returned.\nLines 23-28#\nThese lines are standard SPARQL but are searching across triples not from the provider\ngraphs. Rather, they are looking at triples generated by the OIH indexing program\nused, Gleaner.\nNote, that Gleaner is not a dependency of this project and other\nindexing approaches and software could be used. As pointed out in the documentation,", "source": "https://book.oceaninfohub.org/users/sparql.html"}
{"id": "8186b7e4d20a-3", "text": "indexing approaches and software could be used. As pointed out in the documentation,\nthis approach is based on structured data on the web and web architecture approaches.\nSo, any indexing system following those approaches can be used.\nThese triples are used to track the indexing event and the sources indexed. It provides\nsome additional provenance to the information collected, but does not change or even\nextend what the providers are publishing.\nAs such, these statements could be removed and all that would be lost of indexing\nactivity information.\nLines 30-32#\nThese lines represent three specific SPARQL parameters.\nFirst is the ORDER BY directive. This is used to order the results by one of the\nreturned variables. In this case we are using the ?score variable which comes from\nthe vendor specific syntax noted in lines 11-13. This score is the ranking score\nfor a resource search against the full text index. However, this could be any\nvariable coming from standards compliant SPARQL calls too. Sorting can be done\non alphanumeric values in ascending (ASC) or descending (DESC) order.\nThe LIMIT is used to limit the number of results returned. We follow this with,\nOFFSET which is used to skip the first n results. These two are useful for pagination when\ncombined with the ORDER BY directive.", "source": "https://book.oceaninfohub.org/users/sparql.html"}
{"id": "c12c7c3437bb-0", "text": "Users#\nAbout#\nThe reference client is available at\nsearch.oceaninfohub.org.\nUsing OIH search in Chrome#\nIt is possible to set Ocean InfoHub as a search shortcut in Chrome.\nTo do this go to the Mange Search \u2026 section of your settings.\nThere you will see a button \u201cAdd\u201d in the Site Search section.\nYou can make an entry like: https://search.oceaninfohub.org/results/?search_text=%s&page=0\nThe shortcut, here oih can be used in the address bar to quickly invoke this search.\nSimple type: oih or whatever you set the shortcut to and then hit the tab key. The address bar will convert to a search mode where you can type your search and hit return.", "source": "https://book.oceaninfohub.org/users/index.html"}
{"id": "cdba6ddab30a-0", "text": "APIs#\nAbout#\nThe Ocean InfoHub graph is accessible through several approaches.\nThe graph is implemented in RDF and expressed through a standards compliant triplestore.\nThis triplestore exposes a SPARQL endpoint that can be queried using the SPARQL 1.1 Query Language.\nTo do this you can visit a web based query interface as discussed in other sections of this document.\nIt is also possible to access this service following RESTful principles.\nSPARQL HTTP Protocol#\nOne approach to this RESTful approach is to use the\nSPARQL 1.1 Graph Store HTTP Protocol.\nThis is a simple HTTP protocol that allows you to query the graph using SPARQL and obtain the results in JSON.\nThe OIH triplestore exposes the graph following this pattern for queries.\nExamples#\ncurl -X POST https://graph.collaborium.io/blazegraph/namespace/aquadocs/sparql --data-urlencode 'query=SELECT * { ?s ?p ?o } LIMIT 1' -H 'Accept:application/sparql-results+json'\nIf run this from the command line we will get something like the following.", "source": "https://book.oceaninfohub.org/users/apis.html"}
{"id": "cdba6ddab30a-1", "text": "If run this from the command line we will get something like the following.\n\u2717 curl -X POST https://graph.collaborium.io/blazegraph/namespace/aquadocs/sparql --data-urlencode 'query=SELECT * { ?s ?p ?o } LIMIT 1' -H 'Accept:application/sparql-results+json'\n{\n \"head\" : {\n \"vars\" : [ \"s\", \"p\", \"o\" ]\n },\n \"results\" : {\n \"bindings\" : [ {\n \"s\" : {\n \"type\" : \"uri\",\n \"value\" : \"https://hdl.handle.net/1834/10030\"\n },\n \"p\" : {\n \"type\" : \"uri\",\n \"value\" : \"https://schema.org/propertyID\"\n },\n \"o\" : {\n \"type\" : \"literal\",\n \"value\" : \"https://hdl.handle.net/\"\n }\n } ]\n }\n} \nWhile this is unlikely how you will want to interact with the graph,\nit desmonstrates the HTTP based access API that can be used in tools, notebooks\nor other applications.\nThis is the same basic approach the used in the web client. There the", "source": "https://book.oceaninfohub.org/users/apis.html"}
{"id": "cdba6ddab30a-2", "text": "This is the same basic approach the used in the web client. There the\naxios library (https://axios-http.com/) is used with a code snippet like:\n axios.get(url.toString())\n .then(function (response) {\n // handle success\n console.log(response);\n const el = document.querySelector('#container2');\n render(showresults(response), el);\n })\n .catch(function (error) {\n // handle error\n console.log(error);\n })\n .then(function () {\n // always executed\n });", "source": "https://book.oceaninfohub.org/users/apis.html"}
{"id": "554917a6d282-0", "text": "References#\nA broad collection of references.\nGeneral#\nScience on Schema\nBioSchemas\nOcean Best Practices on Schema\nPID policy for European Open Science Cloud\nDCAT Schema.org mappings\nDCAT US Data.gov reference\nFAIR Semantics\nDeveloper References#\nSchema.org releases\nSchema.org RDF graph (turtle format)\nJSON-LD Playground\nGoogle Developers Search Gruid\nGoogle Developers Fact Check\nStructured Data Testing Tool\nRich Results Testing Tool\nJSON-LD\nRuby JSON-LD\nschema.org Java\nPerl classes for schema.org markup\nContent Management and Web Server support#\nDrupal Support\nWordpress Claim Review\nOrganizations#\nGoogle Open Source\nDataCommons & DataCommons REST\nIndexers#\nGleaner\nBMUSE\nGraph tools#\nWikipedia SPARQL implementation list\nRDFlib\nAny23\nrdfjs\nshemaram\nvalidatingrdf\nStructured Data Linter\nBlogs and Press Releases#\nYandex: What is Scheme.org\nBing: Fact Check Label\nBing: Contextual Awareness\nFacebook: Marketing API\nFacebook: fact checking\nAmazon: Alex skills\nGoogle Developers mail invoice\nNot Categorized Yet#\nLighthouse Plugins\nLighthouse\nScience on Schema\nBioSchemas\nCodeMeta\nLinter Structured Data\nJSON-LD Playground\nJSON-LD.org\nSHACL playground\nGoogle Structured Data testing tool (", "source": "https://book.oceaninfohub.org/appendix/references.html"}
{"id": "554917a6d282-1", "text": "JSON-LD.org\nSHACL playground\nGoogle Structured Data testing tool (\nGoogle Dataset for developers\nPress article\nRich results\nSchemaApp.com\nYandex\nSchema dev\nChromeextension\nGoogle Rich Results\nDatashapes\nACL Web Alexa Meaning Representation Language\nhash.aio Volcano schema\nYoast Structured Data Guide\nSchema App\nSpringer: Scigraph\niPhylo Biodiversity KG\nozymandias\nRDA group meeting notes\nRDA Plenary meeting", "source": "https://book.oceaninfohub.org/appendix/references.html"}
{"id": "3040e42791b6-0", "text": "Registries#\nDocuments and Datasets#\nDOI\nA not-for-profit membership organization that is the governance and management body for the federation of Registration Agencies providing Digital Object Identifier (DOI) services and registration, and is the registration authority for the ISO standard (ISO 26324) for the DOI system. The DOI system provides a technical and social infrastructure for the registration and use of persistent interoperable identifiers, called DOIs, for use on digital networks.\nDatacite\nLocate, identify, and cite research data with the leading global provider of DOIs for research data.\nArchival Resource Key or ARK: and\nN2T ARKs and Names to Thinkgs\nPeople#\nOrcid\nORCID\u2019s mission is to enable transparent and trustworthy connections between researchers, their contributions, and their affiliations by providing a unique, persistent identifier for individuals to use as they engage in research, scholarship, and innovation activities.\nOrganizations#\nre3data\nA registry of research data repositories\nROR\nROR is a community-led project to develop an open, sustainable, usable, and unique identifier for every research organization in the world.\nGrid\nGRID is a free and openly available global database of research-related organisations, cataloging research-related organisations and providing each with a unique and persistent identifier. With GRID you have over 99,609 carefully curated records at hand, enabling you to identify and distinguish research-related institutions worldwide.", "source": "https://book.oceaninfohub.org/appendix/registries.html"}
{"id": "3040e42791b6-1", "text": "Physical Samples#\nIGSN\nThe objective of the IGSN e.V. is to implement and promote standard methods for identifying, citing, and locating physical samples with confidence by operating an international IGSN registration service.", "source": "https://book.oceaninfohub.org/appendix/registries.html"}
{"id": "bd71fec2c110-0", "text": "Known Issues#\nAbout#\nThis document will collect some of the various issues we have encounter in publishing\nthe JSON-LD documents.\ncontrol characters in URL string for sitemap or in the JSON-LD documents#\nMake sure there are no control characters such as new line, carriage returns,\ntabs or others in the document. These can be problematic both for processing and\ndisplay.\ncontext is a map (changed from 1.0)#\nBe sure to use a context style like:\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\nThe context section must be a map starting in JSON-LD 1.1\ndata graphs need @id#\nBe sure to include an @id in your graph that points to the identifier or the\nweb address of the resource providing the metadata. This is not the material the\nmetadata is about, but rather the metadata record itself.\nstring literals must be valid#\nThe string literals must be sure to not have quotation marks or other invalid\ncharacters without escaping or encoding them.", "source": "https://book.oceaninfohub.org/appendix/annoyances.html"}
{"id": "35c1a258e4b9-0", "text": "Appendix#\nAbout#\nA collection of items related to the OIH development. Mostly related\nto examples around representing concepts in the graph such as\ndate and time, language etc.\nAs these develop they may be moved into other sections of the book.", "source": "https://book.oceaninfohub.org/appendix/index.html"}
{"id": "85c9df515d07-0", "text": "Controlled Vocabularies#\nAbout#\nSee also: ODIS-ARCH Vocabularies\nA list of possible controlled vocabularies to use in the schema.org documents.\nMany such resources can be found by searching at BARTOC.org\nor the UNESCO Thesaurus.\nNote, at present this is an exploration and there is not yet a recommendation\nfor use in OIH.\nList#\nEssential Climate Variables\nVocabulary based on DFG\u2019S Classification of Subject Area, Review Board, Research Area and Scientific Discipline (2016 - 2019)\nNature Subjects Ontology", "source": "https://book.oceaninfohub.org/appendix/vocabularies.html"}
{"id": "7c050f97c830-0", "text": "Indexing with Gleaner#\nGleaner (app)#\nThe Gleaner applications performs the retrieval and loading of JSON-LD documents\nfrom the web following structured data on the web patterns. Gleaner is available for Linux, Mac OS X and Windows.\nWhile Gleaner is a stand alone app, it needs to interact with\nan object store to support data storage and other operations. These dependencies are met within the\nGleaner Indexing Services or Data Service Docker compose files.\nWarning\nThis documentation is in development. The primary testing environments are Linux and other UNIX based platforms\nsuch as Mac OS X. If you are on Windows, there may be some issues. If you can use a Linux subsystem on Windows,\nyou may experience better results. We will test with Windows eventually and update documentation as needed.\nQuick Start steps#\nThis quick start guide is focused on setting up and testing Gleaner in a local environnement. It is similar to\nhow you might run Gleaner in a production environment but lacks the routing and other features likely desired for\nsuch a situation.\nNote\nThis documentation assumes a basic understanding of Docker and experience with basic Docker activities like\nstarting and stopping containers. It also assumes an understanding of using a command line interface and\nediting configuration files in the YAML format.\nCommand\nFrom this point down, the documentation will attempt to put all commands", "source": "https://book.oceaninfohub.org/indexing/qstart.html"}
{"id": "7c050f97c830-1", "text": "Command\nFrom this point down, the documentation will attempt to put all commands\nyou should issue in this admonition style box.\nIn the end, this is the table of applications and config files you will need. In this guide we will go through\ndownloading, setting them up and running Gleaner to index documents from the web.\nTable 1 Required Applications and Their Config Files#\nGleaner\nDocker\nMinio Client\nconfig.yaml\nsetenv.sh \nload2blaze.sh\nschemaorg-current-https.jsonld\ngleaner-DS-NoRouter.yml\nGrab Gleaner and the support files we need#\nWe will need to get the Gleaner binary for your platform and also the Gleaner configuration file\ntemplate. To do this, visit the Gleaner Releases page \nand pick the release Ocean InfoHubdev rc1. Under the Assets drop down you should see the files we need. Get:\nGleaner for your platform\nGleaner config template: template_v2.0.yaml\nGleaner indexing service compose file: gleaner-IS.yml\nHelper environment setup script: setenvIS.sh\nFor this demonstration, we will be running on linux, so this would look something like:\nCommand\ncurl -L -O https://github.com/earthcubearchitecture-project418/gleaner/releases/download/2.0.25/gleaner", "source": "https://book.oceaninfohub.org/indexing/qstart.html"}
{"id": "7c050f97c830-2", "text": "curl -L -O https://github.com/earthcubearchitecture-project418/gleaner/releases/download/2.0.25/gleaner-IS.yml\ncurl -L -O https://github.com/earthcubearchitecture-project418/gleaner/releases/download/2.0.25/setenvIS.sh\ncurl -L -O https://github.com/earthcubearchitecture-project418/gleaner/releases/download/2.0.25/template_v2.0.yaml\nNote\nYou can download these with any tool you wish or through the browser. Above we downloaded used the command\nline curl tool. For GitHub, be sure to add the -L to inform curl to follow redirects to the object to download.\nCommand\nYou may need to change the permission on your gleaner file to ensure it can be run. On Linux this would\nlook something like the following.\nchmod 755 gleaner\nWe then need to visit Schema.org for Developers to pull down the\nappropriate JSON-LD context. For this work we will want to pull down the schemaorg-current-https in JSON-LD format.\nIt also should work to do something similar to the following:\nCommand\ncurl -O https://schema.org/version/latest/schemaorg-current-https.jsonld\nAbout the compose file(s)#\nThe above steps have collected the resources for the indexer. We now want to set up the services that", "source": "https://book.oceaninfohub.org/indexing/qstart.html"}
{"id": "7c050f97c830-3", "text": "Gleaner will use to perform the indexing. To do that we use Docker or an appropriate run time alternative like\nPodman or others. For this example, we will assume you are using the Docker client.\nAs noted, a basic understanding of Docker and the ability to issue Docker cli commands to start and stop\ncontainers is required. If you are new do Docker, we recommend you visit and read:\nGet Started with Docker.\nWe need to select the type of services we wish to run. The various versions of these Docker compose\nfile can be found in the Gleaner-compose deployment directory.\nWhy pick one over the other?\nChoose Gleaner IS if you simply wish to retrieve the JSON-LD into a data warehouse to use in your own workflows\nChoose Gleaner DS if you wish to build out a graph and want to use the default contains used by Gleaner.\nNote\nWe wont look at this file in detail here since there will hopefully be no\nrequired edits. You can see the file in detail in the Index Services\nsection.\nEdit environment variables setup script#\nWe have Docker and the appropriate compose file. The compose files require a set of environment variables\nto be populated to provide the local hosts information needed to run. You can set these yourself or\nuse or reference the setenv.sh file in the Gleaner-compose repository in the\nGleaner-compose deployment directory.", "source": "https://book.oceaninfohub.org/indexing/qstart.html"}
{"id": "7c050f97c830-4", "text": "Gleaner-compose deployment directory.\nYou may also need to visit information about permissions at\nPost-installation steps for Linux if you are\nhaving permission issues.\nLet\u2019s take a look at the script.\n 1#!/bin/bash\n 2\n 3# Object store keys\n 4export MINIO_ACCESS_KEY=worldsbestaccesskey\n 5export MINIO_SECRET_KEY=worldsbestsecretkey\n 6\n 7# local data volumes\n 8export GLEANER_BASE=/tmp/gleaner/\n 9mkdir -p ${GLEANER_BASE}\n10export GLEANER_OBJECTS=${GLEANER_BASE}/datavol/s3\n11export GLEANER_GRAPH=${GLEANER_BASE}/datavol/graph\nYou may wish to edit file to work better with your environment. By default it will attempt to\nuse localhost to resolve with and host local runtime data in a /tmp/gleaner directory.\nSpin up the containers#\nLoad our environment variables to the shell:\nCommand\nsource setenv.sh\nThen start the containers:\nCommand\ndocker-compose -f gleaner-IS.yml up -d\nIf all has gone well, you should be able to see your running containers with\nCommand\ndocker ps\nand see results similar to:\nCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES", "source": "https://book.oceaninfohub.org/indexing/qstart.html"}
{"id": "7c050f97c830-5", "text": "CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\nc4b7097f5e06 nawer/blazegraph \"docker-entrypoint.s\u2026\" 8 seconds ago Up 7 seconds 0.0.0.0:9999->9999/tcp test_triplestore_1\nca08c24963a0 minio/minio:latest \"/usr/bin/docker-ent\u2026\" 8 seconds ago Up 7 seconds 0.0.0.0:9000->9000/tcp test_s3system_1\n24274eba0d34 chromedp/headless-shell:latest \"/headless-shell/hea\u2026\" 8 seconds ago Up 7 seconds 0.0.0.0:9222->9222/tcp test_headless_1\nEdit Gleaner config file#\nWe have all the files we need and we have our support services running. The next and\nfinal step is to edit our Gleaner configuration file. This will let Gleaner know\nthe location of the support services, the JSON-LD context file and the locations\nof the resources we wish to index.\nLet\u2019s take a look at the full configuration file first and then break down each section.\n 1---\n 2minio:", "source": "https://book.oceaninfohub.org/indexing/qstart.html"}
{"id": "7c050f97c830-6", "text": "1---\n 2minio:\n 3 address: 0.0.0.0\n 4 port: 9000\n 5 accessKey: worldsbestaccesskey \n 6 secretKey: worldsbestsecretkey \n 7 ssl: false\n 8 bucket: gleaner\n 9gleaner:\n10 runid: oih # this will be the bucket the output is placed in...\n11 summon: true # do we want to visit the web sites and pull down the files\n12 mill: true\n13context:\n14 cache: true\n15contextmaps:\n16- prefix: \"https://schema.org/\"\n17 file: \"./jsonldcontext.json\" # wget http://schema.org/docs/jsonldcontext.jsonld\n18- prefix: \"http://schema.org/\"\n19 file: \"./jsonldcontext.json\" # wget http://schema.org/docs/jsonldcontext.jsonld\n20summoner:\n21 after: \"\" # \"21 May 20 10:00 UTC\" \n22 mode: full # full || diff: If diff compare what we have currently in gleaner to sitemap, get only new, delete missing\n23 threads: 1", "source": "https://book.oceaninfohub.org/indexing/qstart.html"}
{"id": "7c050f97c830-7", "text": "23 threads: 1\n24 delay: 0 # milliseconds (1000 = 1 second) to delay between calls (will FORCE threads to 1) \n25 headless: http://0.0.0.0:9222 # URL for headless see docs/headless\n26millers:\n27 graph: true\n28 #geojson: false\n29sitegraphs:\n30- name: aquadocs\n31 url: https://oih.aquadocs.org/aquadocs.json \n32 headless: false\n33 pid: https://www.re3data.org/repository/aquadocs\n34 properName: AquaDocs\n35 domain: https://aquadocs.org \n36sources:\n37- name: samplesearth\n38 url: https://samples.earth/sitemap.xml\n39 headless: false\n40 pid: https://www.re3data.org/repository/samplesearth\n41 properName: Samples Earth (DEMO Site)\n42 domain: https://samples.earth \n43- name: marinetraining\n44 url: https://www.marinetraining.eu/sitemap.xml\n45 headless: false\n46 pid: https://www.re3data.org/repository/marinetraining\n47 properName: Marine Training EU", "source": "https://book.oceaninfohub.org/indexing/qstart.html"}
{"id": "7c050f97c830-8", "text": "47 properName: Marine Training EU\n48 domain: https://marinetraining.eu/\n49- name: marineie\n50 url: http://data.marine.ie/geonetwork/srv/eng/portal.sitemap\n51 headless: true\n52 pid: https://www.re3data.org/repository/marineie\n53 properName: Marine Institute Data Catalogue\n54 domain: http://data.marine.ie\n55- name: oceanexperts\n56 url: https://oceanexpert.org/assets/sitemaps/sitemapTraining.xml\n57 headless: false\n58 pid: https://www.re3data.org/repository/oceanexpert\n59 properName: OceanExpert UNESCO/IOC Project Office for IODE \n60 domain: https://oceanexpert.org/\n61# - name: obis\n62# url: https://obis.org/sitemap/sitemap_datasets.xml\n63# headless: false\n64# pid: https://www.re3data.org/repository/obis\n65# properName: Ocean Biodiversity Information System\n66# domain: https://obis.org \nObject store#\n1minio:\n2 address: 0.0.0.0\n3 port: 9000\n4 accessKey: worldsbestaccesskey", "source": "https://book.oceaninfohub.org/indexing/qstart.html"}
{"id": "7c050f97c830-9", "text": "3 port: 9000\n4 accessKey: worldsbestaccesskey \n5 secretKey: worldsbestsecretkey \n6 ssl: false\n7 bucket: gleaner\nThe minio section defines the IP and port of the object store. For this case, we are\nusing minio and these are the IP and port from our docker compose steps above. Note,\nif you were to use Ceph or AWS S3, this section is still labeled minio. You simply\nneed to update the property values.\nGleaner#\n1gleaner:\n2 runid: oih # this will be the bucket the output is placed in...\n3 summon: true # do we want to visit the web sites and pull down the files\n4 mill: true\nThis passes a few high level concpets.\nrunid:\nsummon\nmill\nContext sections#\n1context:\n2 cache: true\n3contextmaps:\n4- prefix: \"https://schema.org/\"\n5 file: \"./jsonldcontext.json\" # wget http://schema.org/docs/jsonldcontext.jsonld\n6- prefix: \"http://schema.org/\"\n7 file: \"./jsonldcontext.json\" # wget http://schema.org/docs/jsonldcontext.jsonld\nComments for the context sections\nSummoner section#\n1summoner:", "source": "https://book.oceaninfohub.org/indexing/qstart.html"}
{"id": "7c050f97c830-10", "text": "Comments for the context sections\nSummoner section#\n1summoner:\n2 after: \"\" # \"21 May 20 10:00 UTC\" \n3 mode: full # full || diff: If diff compare what we have currently in gleaner to sitemap, get only new, delete missing\n4 threads: 1\n5 delay: 0 # milliseconds (1000 = 1 second) to delay between calls (will FORCE threads to 1) \n6 headless: http://0.0.0.0:9222 # URL for headless see docs/headless\nComments for the summoner sections\nMillers section#\n1millers:\n2 graph: true\n3 #geojson: false\nComments for the miller sections\nSite graphs section#\n1sitegraphs:\n2- name: aquadocs\n3 url: https://oih.aquadocs.org/aquadocs.json \n4 headless: false\n5 pid: https://www.re3data.org/repository/aquadocs\n6 properName: AquaDocs\n7 domain: https://aquadocs.org \nComments for the sitegrpah sections\nSources section#\n 1sources:\n 2- name: samplesearth\n 3 url: https://samples.earth/sitemap.xml", "source": "https://book.oceaninfohub.org/indexing/qstart.html"}
{"id": "7c050f97c830-11", "text": "3 url: https://samples.earth/sitemap.xml\n 4 headless: false\n 5 pid: https://www.re3data.org/repository/samplesearth\n 6 properName: Samples Earth (DEMO Site)\n 7 domain: https://samples.earth \n 8- name: marinetraining\n 9 url: https://www.marinetraining.eu/sitemap.xml\n10 headless: false\n11 pid: https://www.re3data.org/repository/marinetraining\n12 properName: Marine Training EU\n13 domain: https://marinetraining.eu/\n14- name: marineie\n15 url: http://data.marine.ie/geonetwork/srv/eng/portal.sitemap\n16 headless: true\n17 pid: https://www.re3data.org/repository/marineie\n18 properName: Marine Institute Data Catalogue\n19 domain: http://data.marine.ie\n20- name: oceanexperts\n21 url: https://oceanexpert.org/assets/sitemaps/sitemapTraining.xml\n22 headless: false\n23 pid: https://www.re3data.org/repository/oceanexpert\n24 properName: OceanExpert UNESCO/IOC Project Office for IODE \n25 domain: https://oceanexpert.org/\n26# - name: obis", "source": "https://book.oceaninfohub.org/indexing/qstart.html"}
{"id": "7c050f97c830-12", "text": "25 domain: https://oceanexpert.org/\n26# - name: obis\n27# url: https://obis.org/sitemap/sitemap_datasets.xml\n28# headless: false\n29# pid: https://www.re3data.org/repository/obis\n30# properName: Ocean Biodiversity Information System\n31# domain: https://obis.org \nComments for the sources sections\nRun gleaner#\nFor this example we are going to run Gleaner directly. In a deployed instance you may\nrun Gleaner via a script or cron style service. We will document that elsewhere.\nWe can do a quick test of the setup.\nCommand\n ./gleaner -cfg template_v2.0 -setup\nFor now, we are ready to run Gleaner. Try:\nCommand\n ./gleaner -cfg template_v2.0\nNote\nLeave the suffix like .yaml off the name of the config file. The config system can also read\njson and other formats. So simply leave the suffix off and let the config code inspect the\ncontents.\nLoad results to a graph and test#\nYou have set up the server environment and Gleaner and done your run. Things look good\nbut you don\u2019t have a graph you can work with yet. You need to load the JSON-LD into", "source": "https://book.oceaninfohub.org/indexing/qstart.html"}
{"id": "7c050f97c830-13", "text": "the triplestore in order to start playing.\nMinio Object store#\nTo view the object store you could use your browser and point it on the default minio\nport at 9000. This typically something like localhost:9000.\nIf you wish to continue to use the command line you can use the Minio client at\nMinio Client Quickstart guide.\nOnce you have it installed and working, you can write an entry for our object store with:\nCommand\n ./mc alias set minio http://0.0.0.0:9000 worldsbestaccesskey worldsbestsecretkey\nLoad Triplestore#\nWe now want to load these objects, which are JSON-LD files holding RDF based graph\ndata, into a graph database. We use the term, triplestore, to define a graph database\ndesigned to work with the RDF data model and provide SPARQL query support over that\ngraph data.\nSimple script loading\nNabu\nTry out a simple SPARQL query\nReferences#\nThe following are some reference which may provide more information on the various\ntechnologies used in this approach.\nGoogle: Understanding how structured data works\nGoogle Dataset Search By the Numbers\nGoogle Dataset Search: Building a search engine for datasets in an open Web ecosystem\nW3C SPARQL\nSHACL\nTriplestores", "source": "https://book.oceaninfohub.org/indexing/qstart.html"}
{"id": "1b0b0d30f2fa-0", "text": "Interfaces#\nAbout#\nIn the end the goal is to provide use of the generated index. There are several\npossible used for an index.\nWeb UI such as the reference client at oceans.collaborium.io\nA variation on this is the development of web components that can be easily included in\ndomain sites to perform operations on the OIH index\ngraph access via SPARQL\naccess to the graph and objects via workflows like Jupyter notebooks\nGleaner Web UI (WUI)#\nThe user of the index may take several forms. A user may be a software developer creating a web based\ninterface to the generated index. It may also be an end user accessing the index (indexes) through notebooks\nor special clients.\nThose wishing to run a web site can augemnt the compose files to run their\npreferred web server, object server (to serve files from the object store) or\nsoftware such as node or others to support their deployment pattern.\nFig. 6 Gleaner Optional Web UI#", "source": "https://book.oceaninfohub.org/indexing/user.html"}
{"id": "7783e6c3ea0b-0", "text": "Alternatives#\nOptions#\nWhile Gleaner will be used during initial OIH development it is not\nthe only or required approach. The web architecture foundation means there are many other tools that\ncan be used and might be leveraged in a production environment including:\nExtrunct\nBioSchemas Tools\nLDSpider\nStormCrawler\nSquirrel\nNutch (Apache)\nLaundromat\nDataArchiver\nOD Archiver\nThese different tools may better fit into the workflow and available\nskill sets for a group.", "source": "https://book.oceaninfohub.org/indexing/alternatives.html"}
{"id": "59e41016c7af-0", "text": "Graph First Approach#\nAbout#\nDuring the early adopters meetings and in discussion with others an alternative publication pattern came up. This is the pattern where it is not possible to update the web resources with the metadata content. This may be due to access or technical issues. Regardless, what was possible was to generate the metadata in bulk locally and make the resulting document available.\nThis approach is not ideal since it is a non-standard pattern and makes the data and information more obscure to other users. However, it is one the OIH architecture can adapt to and is preferable to the option of excluding those partners in this activity.\nAs such, we are making some changes to allow for this pattern. This means documenting the published graph structure based on the existing thematic patterns and some updates in the indexing workflow to obtain and integrate these graphs into the OIH graph.\nWarning\nAnti-pattern:\nUsing the approach here is not in alignment with\nGoogle guidance nor with W3C patterns for structured\ndata on the web.\nIt is documented here for edge cases\nwhere this is the minimum viable approach. The hope is it\ncould act as a gateway to a more standards aligned implementation later.\nGraph Only#\nThere are cases where it is only possible to generate the graph\nbased on the metadata. Access to the HTML pages is either difficult or the process of inserting the\ndata into the pages is not supportable.", "source": "https://book.oceaninfohub.org/indexing/graphpub.html"}
{"id": "59e41016c7af-1", "text": "data into the pages is not supportable.\nFor this case the goal is to create a simple graph in JSON-LD. To do this we need a collection\napproach that is valid for a range of Things.\nFor this it is proposed to use ItemList which can be used on a list of type Thing, ie anything\ntype in the Schema.org vocabulary.\nThis would define a ListItem with item of any type. Below is an example for a CreativeWork (map)\nand a Course. Once you are in a \u201citem\u201d any of the details from the other thematic type descriptions\ncan be used.\n{\n \"@context\": \"https://schema.org/\",\n \"@type\": [\"ItemList\", \"CreativeWork\"],\n \"@id\": \"https://example.org/id/graph/X\",\n \"name\": \"Resource collection for site X\",\n \"author\": \"Creator of the list\",\n \"itemListOrder\": \"https://schema.org/ItemListUnordered\",\n \"numberOfItems\": 2,\n \"itemListElement\": [\n {\n \"@type\": \"ListItem\",\n \"item\": {\n \"@id\": \"ID_for_this_metadata_record1\",\n \"@type\": \"Map\",\n \"@id\": \"https://example.org/id/XYZ\",\n \"name\": \"Name or title of the document\",", "source": "https://book.oceaninfohub.org/indexing/graphpub.html"}
{"id": "59e41016c7af-2", "text": "\"name\": \"Name or title of the document\",\n \"description\": \"Description of the map to aid in searching\",\n \"url\": \"https://www.sample-data-repository.org/creativework/map.pdf\"\n }\n },\n {\n \"@type\": \"ListItem\",\n \"item\": {\n \"@id\": \"ID_for_this_metadata_record2\",\n \"@type\": \"Course\",\n \"courseCode\": \"F300\",\n \"name\": \"Physics\",\n \"provider\": {\n \"@type\": \"CollegeOrUniversity\",\n \"name\": \"University of Bristol\",\n \"url\": {\n \"@id\": \"/provider/324/university-of-bristol\"\n }\n }\n }\n }\n ]\n}\nIn the case of schema:Dataset one might use schema:DataCatlogue for the following approach. However,\nsince OIH is addressing a wide range of types a more generic collection of Things or CreativeWorks\napproach is needed.\nItem Catalogue Page#\nIt\u2019s not hard to generate a simple HTMl page based on the structured metadata file. This doesn\u2019t\nalter the content of the graph, just builds an automated HTMl page around it.\nPublishing and referencing#\nTesting#", "source": "https://book.oceaninfohub.org/indexing/graphpub.html"}
{"id": "59e41016c7af-3", "text": "Publishing and referencing#\nTesting#\nSince we are now dealing with a graph that is pulled as a complete entity there are a few thoughts.\nHow do ensure a connection between a record in the list and a resolvable URL? Do we need\nto:\nensure each record has a IRI it is subject of\nin the case where IRI is or can be URL, do a validation of at least a 200 on it\nHow do we publish this?\nentry in robots.txt (might be able due to reasons above?)\npublished and provided to OIH\nNeed guidance on format and structure", "source": "https://book.oceaninfohub.org/indexing/graphpub.html"}
{"id": "97fdd8a44773-0", "text": "Data Services#\nThe typical functional goal of this work is the development and use of a Graph that can be accessed via a triplestore (Graph Database). To do that we need a set of additional containers to support this and expose these services on the web through a single domain with https support.\nObject Store \nAn S3 compliant object store supporting S3 APIs including S3Select. For open source this is best satisfied with the Minio Object Store. For commercial cloud AWS S3 or hosted Ceph services will work.\nGraph Database\nWeb Router (technically optional)\nGleaner Data Services (DS)#\nIf you wish to work with a triplestore and wish to use the default app used by OIH\nyou can use the compose file that sets up the Gleaner Data Services environment.\nThis adds the Blazegraph triplestore to the configuration along with the object store.\nThe details of the OIH data services are found in the\nData Services section.\nFig. 3 Gleaner Data Service Activity Workflow#\nTypically, a user would wish to run the full Gleaner DS stack which supports\nboth the indexing process and the serving of the resulting data warehouse and graph\ndatabase capacity.\nCombined, these would then look like the following where the indexing and\ndata services shared a common object store.\nFig. 4 Gleaner Indexing and Data Service Combined#\nObject store pattern#", "source": "https://book.oceaninfohub.org/indexing/dataservices.html"}
{"id": "97fdd8a44773-1", "text": "Fig. 4 Gleaner Indexing and Data Service Combined#\nObject store pattern#\nWithin in the object store the following digital object pattern is used.\nThis is based on the work of the RDA Digital Fabric working group.\nFig. 5 Gleaner Digital Object Pattern#\nAt this point the graph and data warehouse (object store) can be exposed to the net for use by clients such as jupyter notebooks or direct client calls to the S3 object APIs and SPARQL endpoint.\nGleaner Data Services (DS) Environment Variables\nThe Docker Compose file used to launch the Gleaner DS has a set of configurable elements that can be set and passed to the orchestration system with environment variables.\nThese can be set manually or through the command line. A simple script to set the variables could look like:\n\u2013 Environment Var settings script\nThe actual services can be deployed via a Docker Compose file (also works with Podman). An example of that file and details about it follow.\nLet\u2019s take a look at this.\n 1#!/bin/bash\n 2\n 3# domains \n 4export GLEANER_ADMIN_DOMAIN=admin.local.dev\n 5export GLEANER_OSS_DOMAIN=oss.local.dev\n 6export GLEANER_GRAPH_DOMAIN=graph.local.dev\n 7export GLEANER_WEB_DOMAIN=web.local.dev", "source": "https://book.oceaninfohub.org/indexing/dataservices.html"}
{"id": "97fdd8a44773-2", "text": "7export GLEANER_WEB_DOMAIN=web.local.dev\n 8export GLEANER_WEB2_DOMAIN=web2.local.dev\n 9\n10# Object store keys\n11export MINIO_ACCESS_KEY=worldsbestaccesskey\n12export MINIO_SECRET_KEY=worldsbestsecretkey\n13\n14# local data volumes\n15export GLEANER_BASE=/tmp/gleaner/\n16export GLEANER_TRAEFIK=${GLEANER_BASE}/config\n17export GLEANER_OBJECTS=${GLEANER_BASE}/datavol/s3\n18export GLEANER_GRAPH=${GLEANER_BASE}/datavol/graph\n19\n\u2013 Break down the compose file here\n 1version: '3'\n 2\n 3# ${GLEANER_ADMIN_DOMAIN}\n 4# ${GLEANER_OSS_DOMAIN}\n 5# ${GLEANER_GRAPH_DOMAIN}\n 6# ${GLEANER_WEB_DOMAIN} \n 7# ${GLEANER_WEB2_DOMAIN}\n 8# ${MINIO_ACCESS_KEY} \n 9# ${MINIO_SECRET_KEY}\n 10#\n 11# ${GLEANER_TRAEFIK}\n 12# ${GLEANER_OBJECTS}\n 13# ${GLEANER_GRAPH}\n 14\n 15services:\n 16 triplestore:", "source": "https://book.oceaninfohub.org/indexing/dataservices.html"}
{"id": "97fdd8a44773-3", "text": "14\n 15services:\n 16 triplestore:\n 17 image: nawer/blazegraph \n 18 environment:\n 19 JAVA_XMS: 2g\n 20 JAVA_XMX: 8g\n 21 JAVA_OPTS: -Xmx6g -Xms2g --XX:+UseG1GC\n 22 ports:\n 23 - 9999:9999\n 24 labels:\n 25 - \"traefik.enable=true\"\n 26 - \"traefik.http.routers.triplestore.entrypoints=http\"\n 27 - \"traefik.http.routers.triplestore.rule=Host(`${GLEANER_GRAPH_DOMAIN}`)\"\n 28 - \"traefik.http.middlewares.triplestore-https-redirect.redirectscheme.scheme=https\"\n 29 - \"traefik.http.routers.triplestore.middlewares=triplestore-https-redirect\"\n 30 - \"traefik.http.routers.triplestore-secure.entrypoints=https\"\n 31 - \"traefik.http.routers.triplestore-secure.rule=Host(`${GLEANER_GRAPH_DOMAIN}`)\"\n 32 - \"traefik.http.routers.triplestore-secure.tls=true\"", "source": "https://book.oceaninfohub.org/indexing/dataservices.html"}
{"id": "97fdd8a44773-4", "text": "33 - \"traefik.http.routers.triplestore-secure.tls.certresolver=http\"\n 34 - \"traefik.http.routers.triplestore-secure.service=triplestore\"\n 35 - \"traefik.http.middlewares.triplestore-secure.headers.accesscontrolallowmethods=GET,OPTIONS,PUT,POST\"\n 36 - \"traefik.http.middlewares.triplestore-secure.headers.accesscontrolalloworigin=*\"\n 37 - \"traefik.http.middlewares.triplestore-secure.headers.accesscontrolmaxage=200\"\n 38 - \"traefik.http.middlewares.triplestore-secure.headers.addvaryheader=true\"\n 39 - \"traefik.http.middlewares.triplestore-secure.headers.accesscontrolallowcredentials=true\"\n 40 - \"traefik.http.middlewares.triplestore-secure.headers.accesscontrolallowheaders=Authorization,Origin,Content-Type,Accept\"\n 41 - \"traefik.http.middlewares.triplestore-secure.headers.customresponseheaders.Access-Control-Allow-Headers=Authorization,Origin,Content-Type,Accept\"\n 42 - \"traefik.http.routers.triplestore-secure.middlewares=triplestore-secure@docker\" \n 43 - \"traefik.http.services.triplestore.loadbalancer.server.port=9999\"", "source": "https://book.oceaninfohub.org/indexing/dataservices.html"}
{"id": "97fdd8a44773-5", "text": "44 - \"traefik.docker.network=traefik_default\"\n 45 volumes:\n 46 - ${GLEANER_GRAPH}:/var/lib/blazegraph\n 47 networks:\n 48 - traefik_default\n 49\n 50 s3system:\n 51 image: minio/minio:latest\n 52 ports:\n 53 - 9000:9000\n 54 labels:\n 55 - \"traefik.enable=true\"\n 56 - \"traefik.http.routers.s3system.entrypoints=http\"\n 57 - \"traefik.http.routers.s3system.rule=Host(`${GLEANER_OSS_DOMAIN}`)\"\n 58 - \"traefik.http.middlewares.s3system-https-redirect.redirectscheme.scheme=https\"\n 59 - \"traefik.http.routers.s3system.middlewares=s3system-https-redirect\"\n 60 - \"traefik.http.routers.s3system-secure.entrypoints=https\"\n 61 - \"traefik.http.routers.s3system-secure.rule=Host(`${GLEANER_OSS_DOMAIN}`)\"\n 62 - \"traefik.http.routers.s3system-secure.tls=true\"", "source": "https://book.oceaninfohub.org/indexing/dataservices.html"}
{"id": "97fdd8a44773-6", "text": "63 - \"traefik.http.routers.s3system-secure.tls.certresolver=http\"\n 64 - \"traefik.http.routers.s3system-secure.service=s3system\"\n 65 - \"traefik.http.services.s3system.loadbalancer.server.port=9000\"\n 66 - \"traefik.docker.network=traefik_default\"\n 67 volumes:\n 68 - ${GLEANER_OBJECTS}:/data\n 69 environment:\n 70 - MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY}\n 71 - MINIO_SECRET_KEY=${MINIO_SECRET_KEY}\n 72 networks:\n 73 - traefik_default\n 74 command: [\"server\", \"/data\"]\n 75\n 76 features:\n 77 image: fils/grow-general:latest\n 78 ports:\n 79 - 8080:8080\n 80 environment:\n 81 - S3ADDRESS=s3system:9000\n 82 - S3BUCKET=sites\n 83 - S3PREFIX=domain\n 84 - DOMAIN=https://${GLEANER_WEB_DOMAIN}/\n 85 - S3KEY=${MINIO_ACCESS_KEY}\n 86 - S3SECRET=${MINIO_SECRET_KEY}\n 87 labels:", "source": "https://book.oceaninfohub.org/indexing/dataservices.html"}
{"id": "97fdd8a44773-7", "text": "86 - S3SECRET=${MINIO_SECRET_KEY}\n 87 labels:\n 88 - \"traefik.enable=true\"\n 89 - \"traefik.http.routers.features.entrypoints=http\"\n 90 - \"traefik.http.routers.features.rule=Host(`${GLEANER_WEB_DOMAIN}`, `${GLEANER_WEB2_DOMAIN}`)\"\n 91 - \"traefik.http.middlewares.features-https-redirect.redirectscheme.scheme=https\"\n 92 - \"traefik.http.routers.features.middlewares=features-https-redirect\"\n 93 - \"traefik.http.routers.features-secure.entrypoints=https\"\n 94 - \"traefik.http.routers.features-secure.rule=Host(`${GLEANER_WEB_DOMAIN}`,`${GLEANER_WEB2_DOMAIN}`)\"\n 95 - \"traefik.http.routers.features-secure.tls=true\"\n 96 - \"traefik.http.routers.features-secure.tls.certresolver=http\"\n 97 - \"traefik.http.routers.features-secure.service=features\"\n 98 - \"traefik.http.services.features.loadbalancer.server.port=8080\"\n 99 - \"traefik.docker.network=traefik_default\"", "source": "https://book.oceaninfohub.org/indexing/dataservices.html"}
{"id": "97fdd8a44773-8", "text": "99 - \"traefik.docker.network=traefik_default\"\n100 - \"traefik.http.middlewares.features.headers.accesscontrolallowmethods=GET,OPTIONS,PUT,POST\"\n101 - \"traefik.http.middlewares.features.headers.accesscontrolalloworigin=*\"\n102 - \"traefik.http.middlewares.features.headers.accesscontrolmaxage=100\"\n103 - \"traefik.http.middlewares.features.headers.addvaryheader=true\"\n104 - \"traefik.http.middlewares.features-secure.headers.accesscontrolallowheaders=*\"\n105 - \"traefik.http.middlewares.features-secure.headers.customresponseheaders.Access-Control-Allow-Headers=*\"\n106 networks:\n107 - traefik_default\n108\n109networks:\n110 traefik_default:\n111\nNOTE: DS also needs the object -> graph sync (via Nabu)\nNOTE: Should also add in (here or to the side) the ELT local Data Lake to Data Warehouse path (ala CSDCO VaultWalker)", "source": "https://book.oceaninfohub.org/indexing/dataservices.html"}
{"id": "520d74852df3-0", "text": "Indexing Services#\nGleaner can not run alone and relies on a couple of Open Container Initiative (OCI) containers to support it. For this document, we will assume you are using Docker but this will work with Podman or other OCI compliant orchestration environments. These Gleaner Indexing Services are necessary to use Gleaner. The exception to this would be if you are using a 3rd party objects store like AWS S3 or Wasabi.\nObject Store \nAn S3 compliant object store supporting S3 APIs including S3Select. For open source this is best satisfied with the Minio Object Store. For commercial cloud AWS S3 or hosted Ceph services will work.\nHeadless Chrome (technically optional) \nThis is only needed where you expect the sources you index to use Javascript to include the JSON-LD in the pages. If you know your sources do not use this publishing pattern and rather include the JSON-LD in the static page, then you don\u2019t need this container running.\nIS represent the minimum required services to support Gleaner. With IS you have an object\nstore in the form of Minio and a headless chrome server in the form of\nchromedp/headless-shell.\nAs shown in the figure below, and support the basic harvesting of resources with Gleaner\nand loading the JSON-LD objects into Minio.", "source": "https://book.oceaninfohub.org/indexing/indexingservices.html"}
{"id": "520d74852df3-1", "text": "and loading the JSON-LD objects into Minio.\nIt does not result in these objects ending up in a graph / triplestore. You would use\nthis option if you intend to work on the JSON-LD objects yourself. Perhaps loading\nthem into a alternative graphdb like Janus or working on them with python tooling.\nFig. 2 Basic Gleaner Indexing Service Activity Workflow#\nGleaner Indexing Services (IS) Environment Variables\nThe Docker Compose file used to launch the Gleaner IS has a set of configurable elements that can be set and passed to the orchestration system with environment variables.\nThese can be set manually or through the command line. A simple script to set the variables could look like:\n#!/bin/bash\n# domains \nexport GLEANER_ADMIN_DOMAIN=admin.local.dev\nexport GLEANER_OSS_DOMAIN=oss.local.dev\nexport GLEANER_GRAPH_DOMAIN=graph.local.dev\nexport GLEANER_WEB_DOMAIN=web.local.dev\nexport GLEANER_WEB2_DOMAIN=web2.local.dev\n# Object store keys\nexport MINIO_ACCESS_KEY=worldsbestaccesskey\nexport MINIO_SECRET_KEY=worldsbestsecretkey\n# local data volumes\nexport GLEANER_BASE=/tmp/gleaner/\nexport GLEANER_TRAEFIK=${GLEANER_BASE}/config", "source": "https://book.oceaninfohub.org/indexing/indexingservices.html"}
{"id": "520d74852df3-2", "text": "export GLEANER_TRAEFIK=${GLEANER_BASE}/config\nexport GLEANER_OBJECTS=${GLEANER_BASE}/datavol/s3\nexport GLEANER_GRAPH=${GLEANER_BASE}/datavol/graph\nThe actual services can be deployed via a Docker Compose file (also works with Podman). An example of that file and details about it follow.\n\u2013 Break down the compose files here link to them", "source": "https://book.oceaninfohub.org/indexing/indexingservices.html"}
{"id": "54190d287ba9-0", "text": "Aggregator#\nIntoduction#\nThis section introduces the the OIH approach to indexing. Currently, OIH is\nusing the Gleaner software to do the indexing and leverages the Gleaner IO\ngleaner-compose Docker\nCompose files for the server side architecture. For more information on Docker Compose files visit the\nOveriew of Docker Compose. The gleaner-compose repository holds Docker compose files that can set up\nvarious environments that Gleaner needs.\nThe figure below gives a quick overview of the various compose options for setting up\nthe supporting architecture for Gleaner. A fully configured system where all the indexing\nand data services are running and exposing services to the net, a total of five containers are run. In many case\nyou may run fewer than this.\nFig. 1 The various compose options for Gleaner#\nContainer overview#\nS3 (Minio / AWS): This is the only container that is required in all cases to run. Gleaner needs an S3 compatible object store. By default\nwe use the Minio object store\nChrome Headless: In cases where providers place the JSON-LD documents into the pages with Javascript, we need to render the page before\nreading and accessing the DOM. This is done using Chrome Headless", "source": "https://book.oceaninfohub.org/indexing/index.html"}
{"id": "54190d287ba9-1", "text": "reading and accessing the DOM. This is done using Chrome Headless\nGraph data base: Gleaner extracts JSON-LD documents from resources. These JSON-LD documents are representations of the RDF data mode. To\nqueries on them at scale, it easiest to load the triples into a compatible graph database. Sometimes we call this a triplestore. For OIH we\nuse the Blazgraph triplestore.\nRouter: If we wish to deploy this setup onto the net, we will route to route all the services through a single domain. To do this network routing\nwe use Traefik. This router is not required for local use and alternative routers like Caffdy\nor nginx are also valid options.\nWeb Server: If you wish to serve a web UI for the index, then you can also leverage this setup to serve that. Again, this is optional and your web site\nmay be hosted elswhere and simply call to the index in compliance with CORS settings. There is an example web server that leverages the object store\navailable in this setup.\nGleaner#\nAs mentioned Gleaner is a single binary app (ie, one file). It can be run on Linux, Mac OS X or Windows. It does\nnot need to be run on the same machine as the supporting services as it can connect to them", "source": "https://book.oceaninfohub.org/indexing/index.html"}
{"id": "54190d287ba9-2", "text": "not need to be run on the same machine as the supporting services as it can connect to them\nover the network. So, for example, they could be hosted in commercial cloud services or\non remote servers.\nYou can download and compile the code from the previously mentioned github repository or\nthe releases page.\nA single configuration file provides the settings Gleaner needs. Additionally, a local\ncopy of the current schema.org context file should be downloaded and available to the app. This file is needed\nfor many operations and access it over the net is slow and often rate limited depending on the\nsource. You can download the file at the Schema.org for Developers page.\nThis setup show in the above figure is the typical setup for Gleaner and is\ndetailed in the Quick Start section.\nIndexing Services#\nThis is the basic indexing service requirements. At a minimum we need the object store and the Chrome headless containers\nscoped in the Indexing Sevices box above. More details on this set can be found in Indexing Servives.\nData Services#\nA more expanded set of services is defined in the Data Services section. This section discussion a setup more\ndesigned to address a server setup tht will support indexing and also present the resulting indexes to the broader internet.\nWeb UI#", "source": "https://book.oceaninfohub.org/indexing/index.html"}
{"id": "54190d287ba9-3", "text": "Web UI#\nAs mentioned, if you wish to serve a web UI for the index, then you can leverage this setup to serve that. Again, this is optional and your web site\ncan be hosted elsewhere and simply call to the index in compliance with CORS settings. Some tailes on this can be found in the Interfaces section.\nAlternatives#\nNote, the Gleaner ecosystem is not a requirement. OIH follows the structured data on the web and data on the web best practices patterns. Being web architecture based, there are many open source tools and scripting solutions you might use. You may wish to explore the Alternative Approaches section for more on this.\nWhat follows is a bit more detail on the setup used by Gleaner. Experienced users will\nsee where they can swap out elements for their own preference. Like a different\ntriplestore, or wish to leverage a commercial object store? Simply modify the architecture\nto do so.\nODIS Catalog as Index Source#\nBefore we discuss indexing source a key question is what source will be indexed.\nOIH is not a web crawl in that it doesn\u2019t move from source to source based on\nthe content of those sources.\nRather, the OIH index is based on a list of sources selected ahead of time. At\nthis time that set of sources if based on those partners engaged in the", "source": "https://book.oceaninfohub.org/indexing/index.html"}
{"id": "54190d287ba9-4", "text": "this time that set of sources if based on those partners engaged in the\ndevelopment phase of OIH. As the work moves to a more routine operation\nthe sources will come from the ODIS Catalog.\nThe ODIS Catalog will then act as a curated source of domains for inclusion\nin the Ocean InfoHub. This will provide a level of curation and vetted of sources\nand ensure sources are aware of the technical requirements for inclusion in the\nOIH index.", "source": "https://book.oceaninfohub.org/indexing/index.html"}
{"id": "01db2915df94-0", "text": "Gleaner CLI Docker#\nAbout#\nThis is a new approach for quick starts with Gleaner. It is a script that exposes\na containerized version of Gleaner as a CLI interface.\nYou can use the -init flag to pull down all the support files you need including\nthe Docker Compose file for setting up the object store, a triplestore and\nthe support for headless indexing.\nPrerequisites#\nYou need Docker installed. Later, to work with the results and load them into a\ntriplestore, you will also need an S3 compatible client. We will use the Minio\nclient, mc, for this.\nSteps#\nDownload the script gleanerDocker.sh from https://github.com/earthcubearchitecture-project418/gleaner/tree/master/docs/cliDocker You may need to make it run-able with\ncurl -O https://raw.githubusercontent.com/earthcubearchitecture-project418/gleaner/master/docs/cliDocker/gleanerDocker.sh\nchmod 755 gleanerDocker.sh\nNext you can run the script with the -init flag to pull down all the support files you need.\n./gleanerDocker.sh -init\nThis will also download the needed docker image and the support files.\nYour directory should look like this now:\nfils@ubuntu:~/clidocker# ls -lt\ntotal 1356", "source": "https://book.oceaninfohub.org/indexing/cliDocker/index.html"}
{"id": "01db2915df94-1", "text": "fils@ubuntu:~/clidocker# ls -lt\ntotal 1356\n-rw-r--r-- 1 fils fils 1281 Aug 15 14:07 gleaner-IS.yml\n-rw-r--r-- 1 fils fils 290 Aug 15 14:07 setenvIS.sh\n-rw-r--r-- 1 fils fils 1266 Aug 15 14:07 demo.yaml\n-rw-r--r-- 1 fils fils 1371350 Aug 15 14:07 schemaorg-current-https.jsonld\n-rwxr-xr-x 1 fils fils 1852 Aug 15 14:06 gleanerDocker.sh\nLet\u2019s see if we can setup our support infrastructure for Gleaner. The\nfile gleaner-IS.yml is a docker compose file that will set up the object store,\nand a triplestore.\nTo do this we need to set up a few environment variables. To do this we can\nleverage the setenvIS.sh script. This script will set up the environment we need.\nNote you can also use a .env file or other approaches. You can references\nthe Environment variables in Compose documentation.\nroot@ubuntu:~/clidocker# source setenvIS.sh \nroot@ubuntu:~/clidocker# docker-compose -f gleaner-IS.yml up -d", "source": "https://book.oceaninfohub.org/indexing/cliDocker/index.html"}
{"id": "01db2915df94-2", "text": "root@ubuntu:~/clidocker# docker-compose -f gleaner-IS.yml up -d\nCreating network \"clidocker_traefik_default\" with the default driver\nCreating clidocker_triplestore_1 ... done\nCreating clidocker_s3system_1 ... done\nCreating clidocker_headless_1 ... done\nNote: In a fresh run all the images will be pulled down. This may take a while.\nIn the end, you should be able to see these images running:\nroot@ubuntu:~/clidocker# docker ps\nCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\na26f7c945479 nawer/blazegraph \"docker-entrypoint.s\u2026\" About a minute ago Up About a minute 0.0.0.0:9999->9999/tcp clidocker_triplestore_1\nf3a4197c42be minio/minio:latest \"/usr/bin/docker-ent\u2026\" About a minute ago Up About a minute 0.0.0.0:9000->9000/tcp, 0.0.0.0:54321->54321/tcp clidocker_s3system_1", "source": "https://book.oceaninfohub.org/indexing/cliDocker/index.html"}
{"id": "01db2915df94-3", "text": "062f029462b1 chromedp/headless-shell:latest \"/headless-shell/hea\u2026\" About a minute ago Up About a minute 0.0.0.0:9222->9222/tcp \nAt this point we should be able to do a run. During the init process a\nworking config file was downloaded.\nNote: This config file will change\u2026 it\u2019s pointing to an OIH partner\nand I will not do that for the release. I have a demo site I will use.\nNext we need to setup our object for Gleaner. Gleaner itself can do this\ntask so we will use\nroot@ubuntu:~/clidocker# ./gleanerDocker.sh -setup -cfg demo\nmain.go:35: EarthCube Gleaner\nmain.go:110: Setting up buckets\ncheck.go:58: Gleaner Bucket gleaner not found, generating\nmain.go:117: Buckets generated. Object store should be ready for runs\nNote: Here is where we go off the rails. The config file uses 0.0.0.0 as the\nlocation and this is not working. You need to edit the config file with the\n\u201creal\u201d IP of the host machine. In may case is this 192.168.122.77. This is", "source": "https://book.oceaninfohub.org/indexing/cliDocker/index.html"}
{"id": "01db2915df94-4", "text": "obviously still a local network IP but it does work. I am still investigating\nthis issue.\nWe can now do a run with the example template file.\nNote: Best to delete the \u201csitegraph\u201d node, I will do that soon. It should\nwork, but is currently slow and gives little feedback\nIf everything goes well, you should see something like the following:\nroot@ubuntu:~/clidocker# ./gleanerDocker.sh -cfg demo\nmain.go:35: EarthCube Gleaner\nmain.go:122: Validating access to object store\ncheck.go:39: Validated access to object store: gleaner.\norg.go:156: Building organization graph (nq)\norg.go:163: {samplesearth https://samples.earth/sitemap.xml false https://www.re3data.org/repository/samplesearth Samples Earth (DEMO Site) https://samples.earth}\nmain.go:154: Sitegraph(s) processed\nsummoner.go:16: Summoner start time: 2021-08-15 14:34:08.907152656 +0000 UTC m=+0.067250623 \nresources.go:74: samplesearth : 202", "source": "https://book.oceaninfohub.org/indexing/cliDocker/index.html"}
{"id": "01db2915df94-5", "text": "resources.go:74: samplesearth : 202\n 100% |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| (202/202, 20 it/s) \nsummoner.go:34: Summoner end time: 2021-08-15 14:34:20.36804137 +0000 UTC m=+11.528139340 \nsummoner.go:35: Summoner run time: 0.191015 \nwebfeed.go:37: 1758\nmillers.go:26: Miller start time: 2021-08-15 14:34:20.368063453 +0000 UTC m=+11.528161421 \nmillers.go:40: Adding bucket to milling list: summoned/samplesearth\nmillers.go:51: Adding bucket to prov building list: prov/samplesearth\n 100% |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| (202/202, 236 it/s)", "source": "https://book.oceaninfohub.org/indexing/cliDocker/index.html"}
{"id": "01db2915df94-6", "text": "graphng.go:77: Assembling result graph for prefix: summoned/samplesearth to: milled/samplesearth\ngraphng.go:78: Result graph will be at: results/runX/samplesearth_graph.nq\npipecopy.go:16: Start pipe reader / writer sequence\ngraphng.go:84: Pipe copy for graph done\nmillers.go:80: Miller end time: 2021-08-15 14:34:21.84702814 +0000 UTC m=+13.007126109 \nmillers.go:81: Miller run time: 0.024649 \nWorking with results#\nIf all has gone well, at this point you have downloaded the JSON-LD documents into Minio or\nsome other object store.Next we will install a client that we can use to work with these objects.\nNote, there is a web interface exposed on the port mapped in the Docker compose file.\nIn the case of these demo that is 9000. You can access it at\nhttp://localhost:9000/ with the credentials set in the environment variable file.\nHowever, to work with these objects it would be better to use a command line tool, like mc.\nThe Minio Client, can be installed\nfollowing their Minio Client Quickstate Guide.\nBe sure to place it somewhere where it can be seen from the command line, ie, make sure it", "source": "https://book.oceaninfohub.org/indexing/cliDocker/index.html"}
{"id": "01db2915df94-7", "text": "is in your PATH variable.\nIf you are on Linux this might look something like:\nwget https://dl.min.io/client/mc/release/linux-amd64/mc\nchmod +x mc\n./mc --help\nThere is also a Minio Client Docker image\nthat you can use as well but it will be more difficult to use with the following scripts due\nto container isolation.\nTo man an entry in the mc config use:\nmc alias set oih http://localhost:9000 worldsbestaccesskey worldsbestsecretkey\nWe should now be able to list our object store. We have set it up using the alias oih.\nuser@ubuntu:~/clidocker# mc ls oih\n[2021-08-15 14:31:20 UTC] 0B gleaner/\nuser@ubuntu:~/clidocker# mc ls oih/gleaner\n[2021-08-19 13:36:04 UTC] 0B milled/\n[2021-08-19 13:36:04 UTC] 0B orgs/\n[2021-08-19 13:36:04 UTC] 0B prov/\n[2021-08-19 13:36:04 UTC] 0B results/", "source": "https://book.oceaninfohub.org/indexing/cliDocker/index.html"}
{"id": "01db2915df94-8", "text": "[2021-08-19 13:36:04 UTC] 0B summoned/\nYou can explore mc and see how to copy and work with the object store.\nLoading to the triplestore#\nAs part of our Docker compose file we also spun up a triplestore. Let\u2019s use that now.\nNow Download the minio2blaze.sh script.\ncurl -O https://raw.githubusercontent.com/earthcubearchitecture-project418/gleaner/master/scripts/minio2blaze.sh\nchmod 755 minio2blaze.sh \nThe content we need to load into the triplestore needs to be in RDF for Blazegraph. We also need\nto tell the triplestore how we have encoded that RDF. If look in the object store at\nmc ls oih/gleaner/milled\n[2021-08-19 13:26:52 UTC] 0B samplesearth/\nWe should see a bucket that is holding the RDF data converted from the JSON-LD. Let\u2019s use this\nin our test. We can pass this path to the minio2blaze.sh script. This script will go looking\nfor the mc command we installed above, so be sure it is in a PATH location that script can see.\n./minio2blaze.sh oih/gleaner/milled/samplesearth", "source": "https://book.oceaninfohub.org/indexing/cliDocker/index.html"}
{"id": "01db2915df94-9", "text": "./minio2blaze.sh oih/gleaner/milled/samplesearth\n... lots of results removed \nIf all has gone well, we should have RDF in the triplestore. We started our triplestore as part of\nthe docker-compose.yml file. You can visit the triplestore at http://localhost:9999/blazegraph/#splash\nNote, you may have to try other addresses other than localhost if your networking is a bit different with\nDocker. For me, I had to use a real local IP address for my network, you might also try 0.0.0.0.\nHopefully you will see something like the following.\nWe loaded into the default kb namespace, so we should be good there. We can see that is listed\nas the active namespace at the Current Namespace: kb report.\nLet\u2019s try a simple SPARQL query. Click on the Query tab to get to the query user interfaced. We\ncan use something like:\nselect * \nwhere \n{ \n ?s ?p ?o\n}\nLIMIT 10\nA very simple SPARQL to give us the first 10 results from the triplestore. If all has gone well,\nwe should see something like:\nYou can explore more about SPARQL and the wide range of queries you can do with it", "source": "https://book.oceaninfohub.org/indexing/cliDocker/index.html"}
{"id": "01db2915df94-10", "text": "You can explore more about SPARQL and the wide range of queries you can do with it\nat the W3C SPARQL 1.1 Query Language reference.\nConclusion#\nWe have attempted here to give a quick introduction to the use of Gleaner in a Docker\nenvironment. This is a very simple example, but it should give you an idea of the approach\nused. This approach can then be combined with other approaches documented to establish a\nmore production oriented implementation. Most of this documentation will be located\nat the Gleaner.io GitHub repository and Gleaner repository.\nNote: The plan is to merge the Gleaner.io GitHub repository into the first.", "source": "https://book.oceaninfohub.org/indexing/cliDocker/index.html"}
{"id": "50dcb198a291-0", "text": "Prov#\nAbout#\nThis is the start of some discussion on issues around prov tracking in OIH.\nThis may take two paths. One would be the prov tracking indexers might do\nand the other prov that providers would encode to provide specific prov\nthe community requests.\nGleaner Prov#\nThe Gleaner application generates a prov graph of the activity of accessing\nand indexing provider resources. The main goal of this prov is to connect\nan indexed URL to the digital object stored in the object store. This\ndigital object should be the JSON-LD data graph presented by the provider.\nBy contrast, the authoritative reference in the various profiles will connect\nthe the data graph ID, or in the absence of that the data graph URL or the\nreferenced resources URL by gleaner, to another reference. This may be\nan organization ID or a PID of the connected resource.\n 1{\n 2 \"@context\": {\n 3 \"rdf\": \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\",\n 4 \"prov\": \"http://www.w3.org/ns/prov#\",\n 5 \"rdfs\": \"http://www.w3.org/2000/01/rdf-schema#\"\n 6 },\n 7 \"@graph\": [\n 8 {", "source": "https://book.oceaninfohub.org/indexing/prov/index.html"}
{"id": "50dcb198a291-1", "text": "6 },\n 7 \"@graph\": [\n 8 {\n 9 \"@id\": \"https://www.re3data.org/repository/obis\",\n10 \"@type\": \"prov:Organization\",\n11 \"rdf:name\": \"Ocean Biodiversity Information System\",\n12 \"rdfs:seeAlso\": \"https://obis.org\"\n13 },\n14 {\n15 \"@id\": \"https://obis.org/dataset/9381239f-3d64-48b4-80c9-b9ebb674edc2\",\n16 \"@type\": \"prov:Entity\",\n17 \"prov:wasAttributedTo\": {\n18 \"@id\": \"https://www.re3data.org/repository/obis\"\n19 },\n20 \"prov:value\": \"https://obis.org/dataset/9381239f-3d64-48b4-80c9-b9ebb674edc2\"\n21 },\n22 {\n23 \"@id\": \"https://gleaner.io/id/collection/7c1eaa1aaed95861330109026c42e57a31ecae55\",\n24 \"@type\": \"prov:Collection\",\n25 \"prov:hadMember\": {", "source": "https://book.oceaninfohub.org/indexing/prov/index.html"}
{"id": "50dcb198a291-2", "text": "25 \"prov:hadMember\": {\n26 \"@id\": \"https://obis.org/dataset/9381239f-3d64-48b4-80c9-b9ebb674edc2\"\n27 }\n28 },\n29 {\n30 \"@id\": \"urn:gleaner:milled:obis:7c1eaa1aaed95861330109026c42e57a31ecae55\",\n31 \"@type\": \"prov:Entity\",\n32 \"prov:value\": \"7c1eaa1aaed95861330109026c42e57a31ecae55.jsonld\"\n33 },\n34 {\n35 \"@id\": \"https://gleaner.io/id/run/7c1eaa1aaed95861330109026c42e57a31ecae55\",\n36 \"@type\": \"prov:Activity\",\n37 \"prov:endedAtTime\": {\n38 \"@value\": \"2021-04-20\",\n39 \"@type\": \"http://www.w3.org/2001/XMLSchema#dateTime\"\n40 },\n41 \"prov:generated\": {", "source": "https://book.oceaninfohub.org/indexing/prov/index.html"}
{"id": "50dcb198a291-3", "text": "40 },\n41 \"prov:generated\": {\n42 \"@id\": \"urn:gleaner:milled:obis:7c1eaa1aaed95861330109026c42e57a31ecae55\"\n43 },\n44 \"prov:used\": {\n45 \"@id\": \"https://gleaner.io/id/collection/7c1eaa1aaed95861330109026c42e57a31ecae55\"\n46 }\n47 }\n48 ]\n49}\nimport json\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph\nfrom rdflib.extras.external_graph_libs import rdflib_to_networkx_graph\nfrom pyld import jsonld\nimport graphviz\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/indexing/prov/graphs/gleaner.json\") as dgraph:\n doc = json.load(dgraph)\nframe = {\n \"@context\": {\"@vocab\": \"https://schema.org/\",\n \"prov\": \"http://www.w3.org/ns/prov#\"},\n \"@explicit\": \"false\",", "source": "https://book.oceaninfohub.org/indexing/prov/index.html"}
{"id": "50dcb198a291-4", "text": "\"@explicit\": \"false\",\n \"@type\": \"prov:Activity\",\n \"prov:generated\": {},\n \"prov:endedAtTime\": {},\n \"prov:used\": {}\n}\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n \"prov\": \"http://www.w3.org/ns/prov#\"\n}\ncompacted = jsonld.compact(doc, context)\nframed = jsonld.frame(compacted, frame)\njd = json.dumps(framed, indent=4)\nprint(jd)\n{\n \"@context\": {\n \"@vocab\": \"https://schema.org/\",\n \"prov\": \"http://www.w3.org/ns/prov#\"\n },\n \"@id\": \"https://gleaner.io/id/run/7c1eaa1aaed95861330109026c42e57a31ecae55\",\n \"@type\": \"prov:Activity\",\n \"prov:endedAtTime\": {\n \"@type\": \"http://www.w3.org/2001/XMLSchema#dateTime\",\n \"@value\": \"2021-04-20\"\n },\n \"prov:generated\": {\n \"@id\": \"urn:gleaner:milled:obis:7c1eaa1aaed95861330109026c42e57a31ecae55\",", "source": "https://book.oceaninfohub.org/indexing/prov/index.html"}
{"id": "50dcb198a291-5", "text": "\"@type\": \"prov:Entity\",\n \"prov:value\": \"7c1eaa1aaed95861330109026c42e57a31ecae55.jsonld\"\n },\n \"prov:used\": {\n \"@id\": \"https://gleaner.io/id/collection/7c1eaa1aaed95861330109026c42e57a31ecae55\",\n \"@type\": \"prov:Collection\",\n \"prov:hadMember\": {\n \"@id\": \"https://obis.org/dataset/9381239f-3d64-48b4-80c9-b9ebb674edc2\",\n \"@type\": \"prov:Entity\",\n \"prov:value\": \"https://obis.org/dataset/9381239f-3d64-48b4-80c9-b9ebb674edc2\",\n \"prov:wasAttributedTo\": {\n \"@id\": \"https://www.re3data.org/repository/obis\",\n \"@type\": \"prov:Organization\",\n \"http://www.w3.org/1999/02/22-rdf-syntax-ns#name\": \"Ocean Biodiversity Information System\",\n \"http://www.w3.org/2000/01/rdf-schema#seeAlso\": \"https://obis.org\"\n }", "source": "https://book.oceaninfohub.org/indexing/prov/index.html"}
{"id": "50dcb198a291-6", "text": "}\n }\n }\n}\nNano Prov#\nThis is a basic nanoprov example. Note, this is a draft and\nthe ID connections and examples have not been made yet.\n 1{\n 2 \"@context\": {\n 3 \"gleaner\": \"https://voc.gleaner.io/id/\",\n 4 \"np\": \"http://www.nanopub.org/nschema#\",\n 5 \"prov\": \"http://www.w3.org/ns/prov#\",\n 6 \"xsd\": \"http://www.w3.org/2001/XMLSchema#\"\n 7 },\n 8 \"@set\": [\n 9 {\n10 \"@id\": \"gleaner:nanopub/XID\",\n11 \"@type\": \"np:NanoPublication\",\n12 \"np:hasAssertion\": {\n13 \"@id\": \"gleaner:nanopub/XID#assertion\"\n14 },\n15 \"np:hasProvenance\": {\n16 \"@id\": \"gleaner:nanopub/XID#provenance\"\n17 },\n18 \"np:hasPublicationInfo\": {\n19 \"@id\": \"gleaner:nanopub/XID#pubInfo\"\n20 }\n21 },\n22 {", "source": "https://book.oceaninfohub.org/indexing/prov/index.html"}
{"id": "50dcb198a291-7", "text": "20 }\n21 },\n22 {\n23 \"@id\": \"gleaner:nanopub/XID#assertion\",\n24 \"@graph\": {\n25 \"@id\": \"DataSetURI\",\n26 \"@type\": \"schema:Dataset\",\n27 \"description\": \"This is where you would put corrections or annotations\",\n28 \"identifier\": [\n29 {\n30 \"@type\": \"schema:PropertyValue\",\n31 \"name\": \"GraphSHA\",\n32 \"description\": \"A SHA256 sha stamp on the harvested data graph from a URL\",\n33 \"value\": \"{{SHA256 HASH HERE}}\"\n34 },\n35 {\n36 \"@type\": \"schema:PropertyValue\",\n37 \"name\": \"ProviderID\",\n38 \"description\": \"The id provided with the data graph by the provider\",\n39 \"value\": \"{{re3 or URL noted in config}}\"\n40 },\n41 {\n42 \"@type\": \"schema:PropertyValue\",\n43 \"name\": \"URL\",\n44 \"description\": \"The URL harvested by gleaner\",\n45 \"value\": \"{{The URL the JSON-LD came from}}\"\n46 }\n47 ]\n48 }\n49 },\n50 {", "source": "https://book.oceaninfohub.org/indexing/prov/index.html"}
{"id": "50dcb198a291-8", "text": "46 }\n47 ]\n48 }\n49 },\n50 {\n51 \"@id\": \"gleaner:nanopub/XID#provenance\",\n52 \"@graph\": {\n53 \"@id\": \"URIforprovondataset\",\n54 \"prov:wasGeneratedAtTime\": {\n55 \"@value\": \"dateDone\",\n56 \"@type\": \"xsd:dateTime\"\n57 },\n58 \"prov:wasDerivedFrom\": {\n59 \"@id\": \"IDHERE\"\n60 },\n61 \"prov:wasAttributedTo\": {\n62 \"@id\": \"IDHERE\"\n63 }\n64 }\n65 },\n66 {\n67 \"@id\": \"gleaner:nanopub/XID#pubInfo\",\n68 \"@graph\": {\n69 \"@id\": \"IDHERE\",\n70 \"prov:wasAttributedTo\": {\n71 \"@id\": \"gleaner:tool/gleaner\"\n72 },\n73 \"prov:generatedAtTime\": {\n74 \"@value\": \"2019-10-23T14:38:00Z\",\n75 \"@type\": \"xsd:dateTime\"\n76 }\n77 }\n78 }\n79 ]\n80}\nimport json", "source": "https://book.oceaninfohub.org/indexing/prov/index.html"}
{"id": "50dcb198a291-9", "text": "77 }\n78 }\n79 ]\n80}\nimport json\nfrom pyld import jsonld\nimport os, sys\ncurrentdir = os.path.dirname(os.path.abspath(''))\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\nfrom lib import jbutils\nwith open(\"../../../odis-in/dataGraphs/indexing/prov/graphs/nanoprov.json\") as dgraph:\n doc = json.load(dgraph)\ncontext = {\n \"@vocab\": \"https://schema.org/\",\n}\ncompacted = jsonld.compact(doc, context)\njbutils.show_graph(compacted)\nFontconfig error: \"/etc/fonts/conf.d/30-0-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/60-open-sans.conf\", line 1: Extra content at the end of the document\nFontconfig error: \"/etc/fonts/conf.d/62-google-crosextra-caladea-fonts.conf\", line 1: Extra content at the end of the document\nRefs#\nNanopubs Guidance", "source": "https://book.oceaninfohub.org/indexing/prov/index.html"}
{"id": "d9bc403bf7a7-0", "text": "Tooling#\nAbout#\nThe tooling section is a collection of tools, scripts, notebooks and other software that could\nbe of use to the various personas of Ocean InfoHub\nOpenRefine#\nIn this section you will find some details around\nthe Open Refine project and how to use it to\ngenerate JSON-LD documents.\nNotebooks#\nIn this section you will find some Jupyter Notebooks\nthat demonstrate working with JSON-LD in various\nways. These can be copied and used locally to\nexplore or implement workflows.\nOn-line tooling#\nSchema.org Validator\njson-ld playgroud\nSHACL Playground\njson-lint\nf-uji\nDev#\njson-ld\nf-uji dev\njq\njello (python) and\nPractical JSON at the command line using jello\nPython Extruct", "source": "https://book.oceaninfohub.org/tooling/index.html"}
{"id": "a23d8448763a-0", "text": "Personas#\nAbout#\nDuring the design process of the Ocean InfoHub (OIH), many of the design approached leverage three\npersonas that help define the various archtypes of people who engage with OIH. It should not be assumed\nthese scope all the potential persona or that a person or organization scope only one. It is quite possible\nto many. These are simply design approaches representing potential models or characters. They\nare tools used in the design process of OIH.\nPublisher: A key persona whose activities are covered in detail in Publishing patterns for OIH\nAggregator: Leverages web architecture to retrieve structured data on the web and generate usable indexes.\nUser: The end user of the publishing and aggregation activities. May leverage\nthe web for discovery or tools such as Jupyter for analytics and visualization.\nPersona: Publisher#\nIn OIH the Publisher is engaged authoring the JSON-LD documents and publishing them\nto the web. This persona is focused on describing and presenting structured data on the web\nto aid in the discovery and use the resources they manage.\nDetails on this persona can be found in the Publisher section.\nAdditionally, this persona would be leveraging this encoding described in the JSON-LD Foundation section and the\nprofiles described in the Thematic Patterns.\nPersona: Aggregator#\nIn OIH the Aggregator is a person or organization who is indexing resources on the", "source": "https://book.oceaninfohub.org/personas/persona.html"}
{"id": "a23d8448763a-1", "text": "In OIH the Aggregator is a person or organization who is indexing resources on the\nweb using the structured data on the web patterns described in this documentation.\nTheir goal is to efficiently and efficiently index the resources exposed by the Publisher\npersona and generate usable indexes. Further, they would work to exposed these indexes in\na manner that is usable by the User persona.\nDetails on the approach used by OIH and potential alternatives can be found in the\nAggregator section.\nPersona: User#\nThe user is the individual or community who wished to leverage the indexes generated\nas a result of the publishing and aggregation activities. The user may be using the\ndeveloped knowledge graph or some web interface built on top of the knowledge graph or\nother index. They may also use query languages like SPARQL or other APIs or even\ndirectly work with the underlying data warehouse of collected data graphs.\nUser tools may be web sites or scientific notebooks. Some examples of these\nuser experiences are described in the User section.", "source": "https://book.oceaninfohub.org/personas/persona.html"}