id stringlengths 14 15 | text stringlengths 5 1.57k | source stringlengths 40 64 |
|---|---|---|
ed94a3609feb-3 | ic| row.asdict(): {'o': rdflib.term.Literal(' Copenhagen Denmark '),
'p': rdflib.term.URIRef('https://schema.org/address'),
's': rdflib.term.BNode('n0dfe00a0174f48a7b9fb702b5f5b4ecdb496')}
ic| row.asdict(): {'o': rdflib.term.Literal('Introduction to Ocean Data Management for Studen... | https://book.oceaninfohub.org/users/query.html |
ed94a3609feb-4 | o: '"2014-06-02"'
ic| s: '_:n0dfe00a0174f48a7b9fb702b5f5b4ecdb496'
p: '<https://schema.org/address>'
o: '" Copenhagen Denmark "'
ic| s: '_:n0dfe00a0174f48a7b9fb702b5f5b4ecdb1745'
p: '<https://schema.org/name>'
o: ('"Introduction to Ocean Data Management for Students of the Environment Group '
'I... | https://book.oceaninfohub.org/users/query.html |
ed94a3609feb-5 | namespaces = namespaces,
)
kg.load_rdf("../tooling/notebooks/data/oceanexperts_graph.ttl")
/home/fils/.conda/envs/kglab/lib/python3.8/site-packages/owlrl/__init__.py:177: UserWarning: Code: dateTimeStamp is not defined in namespace XSD
from . import DatatypeHandling, Closure
/home/fils/.conda/envs/kglab/lib/pytho... | https://book.oceaninfohub.org/users/query.html |
ed94a3609feb-6 | /home/fils/.conda/envs/kglab/lib/python3.8/site-packages/owlrl/RDFSClosure.py:40: UserWarning: Code: maxInclusive is not defined in namespace XSD
from owlrl.AxiomaticTriples import RDFS_Axiomatic_Triples, RDFS_D_Axiomatic_Triples
/home/fils/.conda/envs/kglab/lib/python3.8/site-packages/owlrl/RDFSClosure.py:40: UserWa... | https://book.oceaninfohub.org/users/query.html |
ed94a3609feb-7 | /home/fils/.conda/envs/kglab/lib/python3.8/site-packages/owlrl/RDFSClosure.py:40: UserWarning: Code: minLength is not defined in namespace XSD
from owlrl.AxiomaticTriples import RDFS_Axiomatic_Triples, RDFS_D_Axiomatic_Triples
/home/fils/.conda/envs/kglab/lib/python3.8/site-packages/owlrl/RDFSClosure.py:40: UserWarni... | https://book.oceaninfohub.org/users/query.html |
ed94a3609feb-8 | PREFIX#
Letβs 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 s... | https://book.oceaninfohub.org/users/query.html |
ed94a3609feb-9 | 0
Lima Peru
1
Qingdao China
2
Russia
3
Playa del Secreto Puerto Morelos, Mexico
4
University of Ghent Ghent Belgium
Location Counts#
The above is nice, but it doesnβt 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... | https://book.oceaninfohub.org/users/query.html |
ed94a3609feb-10 | Wandelaarkaai 7 8400 Oostende Belgium
13
4
Belgium
10
FILTER#
Graphs 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 FI... | https://book.oceaninfohub.org/users/query.html |
ed94a3609feb-11 | ?location <https://schema.org/name> ?locname .
FILTER regex(?locname, ".Peru.", "i") .
}
GROUP BY ?locname
"""
import pandas as pd
pd.set_option("max_rows", None)
df4 = kg.query_as_df(s4)
df4.head(5)
locname
count
0
Lima Peru
1
1
DirecciΓ³n HidrografΓa y NavegaciΓ³n de la Arma...
1
2
Hotel Palmetto Lima PerΓΊ ... | https://book.oceaninfohub.org/users/query.html |
ed94a3609feb-12 | }
GROUP BY ?sdate
"""
import pandas as pd
pd.set_option("max_rows", None)
df4 = kg.query_as_df(s5)
df4.head(5) # show some results
sdate
count
0
2020-06-08
1
1
2011-05-03
1
2
2012-07-16
1
3
2007-07-12
1
4
2019-04-02
1
A bit of Pandas#
Here we will mix in a bit of Pandas to convert our dates to Pandas dates, group a... | https://book.oceaninfohub.org/users/query.html |
ed94a3609feb-13 | df4pd = df4.to_pandas() # convert cudf dataframe to pandas dataframe
df4pd['sdate'] = pd.to_datetime(df4pd['sdate'], format='%Y-%m-%d') # convert date to datetime
courseByYear = df4pd.groupby(pd.Grouper(key='sdate', freq='Y')).size() # group by year
ax = courseByYear.plot.bar(rot=80, stacked=True, figsize=(15, 5)) # ... | https://book.oceaninfohub.org/users/query.html |
8186b7e4d20a-0 | OIH SPARQL#
About#
This page will hold some information about the SPARQL queries we use and
how they connect with some of the profile guidance in this document. We will
show how this relates to and depends on the Gleaner prov as well as the
Authoritative Reference elements of the patterns. It is expected that the G... | https://book.oceaninfohub.org/users/sparql.html |
8186b7e4d20a-1 | 6PREFIX schema: <https://schema.org/>
7PREFIX schemaold: <http://schema.org/>
8PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
9
10SELECT DISTINCT ?g ?s ?wat ?orgname ?domain ?type ?score ?name ?url ?lit ?description ?headline
11WHERE {
12 ?lit bds:search "coral" .
13 ?lit bds:matchAllTerms "false" .... | https://book.oceaninfohub.org/users/sparql.html |
8186b7e4d20a-2 | 28 ?wat rdfs:seeAlso ?domai
29}
30ORDER BY DESC(?score)
31LIMIT 30
32OFFSET 0
Lines 12-14#
It should be noted that the above SPARQL is not standards compliant. It leverages some
vender specific syntax that is not part of the SPARQL standard. This is not uncommon
as groups will often add their own syntax to offer ad... | https://book.oceaninfohub.org/users/sparql.html |
8186b7e4d20a-3 | indexing approaches and software could be used. As pointed out in the documentation,
this approach is based on structured data on the web and web architecture approaches.
So, any indexing system following those approaches can be used.
These triples are used to track the indexing event and the sources indexed. It prov... | https://book.oceaninfohub.org/users/sparql.html |
c12c7c3437bb-0 | Users#
About#
The reference client is available at
search.oceaninfohub.org.
Using OIH search in Chrome#
It is possible to set Ocean InfoHub as a search shortcut in Chrome.
To do this go to the Mange Search β¦ section of your settings.
There you will see a button βAddβ in the Site Search section.
You can make an entry li... | https://book.oceaninfohub.org/users/index.html |
cdba6ddab30a-0 | APIs#
About#
The Ocean InfoHub graph is accessible through several approaches.
The graph is implemented in RDF and expressed through a standards compliant triplestore.
This triplestore exposes a SPARQL endpoint that can be queried using the SPARQL 1.1 Query Language.
To do this you can visit a web based query interface... | https://book.oceaninfohub.org/users/apis.html |
cdba6ddab30a-1 | If run this from the command line we will get something like the following.
β 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'
{
"head" : {
"vars" : [ "s", "p", "o" ]
},
"results" :... | https://book.oceaninfohub.org/users/apis.html |
cdba6ddab30a-2 | This is the same basic approach the used in the web client. There the
axios library (https://axios-http.com/) is used with a code snippet like:
axios.get(url.toString())
.then(function (response) {
// handle success
console.log(response);
const el = document.querySelector('#container2');... | https://book.oceaninfohub.org/users/apis.html |
554917a6d282-0 | References#
A broad collection of references.
General#
Science on Schema
BioSchemas
Ocean Best Practices on Schema
PID policy for European Open Science Cloud
DCAT Schema.org mappings
DCAT US Data.gov reference
FAIR Semantics
Developer References#
Schema.org releases
Schema.org RDF graph (turtle format)
JSON-LD Playgrou... | https://book.oceaninfohub.org/appendix/references.html |
554917a6d282-1 | JSON-LD.org
SHACL playground
Google Structured Data testing tool (
Google Dataset for developers
Press article
Rich results
SchemaApp.com
Yandex
Schema dev
Chromeextension
Google Rich Results
Datashapes
ACL Web Alexa Meaning Representation Language
hash.aio Volcano schema
Yoast Structured Data Guide
Schema App
Spring... | https://book.oceaninfohub.org/appendix/references.html |
3040e42791b6-0 | Registries#
Documents and Datasets#
DOI
A 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 syst... | https://book.oceaninfohub.org/appendix/registries.html |
3040e42791b6-1 | Physical Samples#
IGSN
The 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. | https://book.oceaninfohub.org/appendix/registries.html |
bd71fec2c110-0 | Known Issues#
About#
This document will collect some of the various issues we have encounter in publishing
the JSON-LD documents.
control characters in URL string for sitemap or in the JSON-LD documents#
Make sure there are no control characters such as new line, carriage returns,
tabs or others in the document. These... | https://book.oceaninfohub.org/appendix/annoyances.html |
35c1a258e4b9-0 | Appendix#
About#
A collection of items related to the OIH development. Mostly related
to examples around representing concepts in the graph such as
date and time, language etc.
As these develop they may be moved into other sections of the book. | https://book.oceaninfohub.org/appendix/index.html |
85c9df515d07-0 | Controlled Vocabularies#
About#
See also: ODIS-ARCH Vocabularies
A list of possible controlled vocabularies to use in the schema.org documents.
Many such resources can be found by searching at BARTOC.org
or the UNESCO Thesaurus.
Note, at present this is an exploration and there is not yet a recommendation
for use in O... | https://book.oceaninfohub.org/appendix/vocabularies.html |
7c050f97c830-0 | Indexing with Gleaner#
Gleaner (app)#
The Gleaner applications performs the retrieval and loading of JSON-LD documents
from the web following structured data on the web patterns. Gleaner is available for Linux, Mac OS X and Windows.
While Gleaner is a stand alone app, it needs to interact with
an object store to suppo... | https://book.oceaninfohub.org/indexing/qstart.html |
7c050f97c830-1 | Command
From this point down, the documentation will attempt to put all commands
you should issue in this admonition style box.
In the end, this is the table of applications and config files you will need. In this guide we will go through
downloading, setting them up and running Gleaner to index documents from the web... | https://book.oceaninfohub.org/indexing/qstart.html |
7c050f97c830-2 | curl -L -O https://github.com/earthcubearchitecture-project418/gleaner/releases/download/2.0.25/gleaner-IS.yml
curl -L -O https://github.com/earthcubearchitecture-project418/gleaner/releases/download/2.0.25/setenvIS.sh
curl -L -O https://github.com/earthcubearchitecture-project418/gleaner/releases/download/2.0.25/templ... | https://book.oceaninfohub.org/indexing/qstart.html |
7c050f97c830-3 | Gleaner will use to perform the indexing. To do that we use Docker or an appropriate run time alternative like
Podman or others. For this example, we will assume you are using the Docker client.
As noted, a basic understanding of Docker and the ability to issue Docker cli commands to start and stop
containers is req... | https://book.oceaninfohub.org/indexing/qstart.html |
7c050f97c830-4 | Gleaner-compose deployment directory.
You may also need to visit information about permissions at
Post-installation steps for Linux if you are
having permission issues.
Letβs take a look at the script.
1#!/bin/bash
2
3# Object store keys
4export MINIO_ACCESS_KEY=worldsbestaccesskey
5export MINIO_SECRET_KEY=worldsb... | https://book.oceaninfohub.org/indexing/qstart.html |
7c050f97c830-5 | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c4b7097f5e06 nawer/blazegraph "docker-entrypoint.sβ¦" 8 seconds ago Up 7 seconds 0.0.0.0:9999->9999/tcp test_triplestore_1
ca08c2496... | https://book.oceaninfohub.org/indexing/qstart.html |
7c050f97c830-6 | 1---
2minio:
3 address: 0.0.0.0
4 port: 9000
5 accessKey: worldsbestaccesskey
6 secretKey: worldsbestsecretkey
7 ssl: false
8 bucket: gleaner
9gleaner:
10 runid: oih # this will be the bucket the output is placed in...
11 summon: true # do we want to visit the web sites and pull down the files
1... | https://book.oceaninfohub.org/indexing/qstart.html |
7c050f97c830-7 | 23 threads: 1
24 delay: 0 # milliseconds (1000 = 1 second) to delay between calls (will FORCE threads to 1)
25 headless: http://0.0.0.0:9222 # URL for headless see docs/headless
26millers:
27 graph: true
28 #geojson: false
29sitegraphs:
30- name: aquadocs
31 url: https://oih.aquadocs.org/aquadocs.json
32 hea... | https://book.oceaninfohub.org/indexing/qstart.html |
7c050f97c830-8 | 47 properName: Marine Training EU
48 domain: https://marinetraining.eu/
49- name: marineie
50 url: http://data.marine.ie/geonetwork/srv/eng/portal.sitemap
51 headless: true
52 pid: https://www.re3data.org/repository/marineie
53 properName: Marine Institute Data Catalogue
54 domain: http://data.marine.ie
55- name... | https://book.oceaninfohub.org/indexing/qstart.html |
7c050f97c830-9 | 3 port: 9000
4 accessKey: worldsbestaccesskey
5 secretKey: worldsbestsecretkey
6 ssl: false
7 bucket: gleaner
The minio section defines the IP and port of the object store. For this case, we are
using minio and these are the IP and port from our docker compose steps above. Note,
if you were to use Ceph o... | https://book.oceaninfohub.org/indexing/qstart.html |
7c050f97c830-10 | Comments for the context sections
Summoner section#
1summoner:
2 after: "" # "21 May 20 10:00 UTC"
3 mode: full # full || diff: If diff compare what we have currently in gleaner to sitemap, get only new, delete missing
4 threads: 1
5 delay: 0 # milliseconds (1000 = 1 second) to delay between calls (will ... | https://book.oceaninfohub.org/indexing/qstart.html |
7c050f97c830-11 | 3 url: https://samples.earth/sitemap.xml
4 headless: false
5 pid: https://www.re3data.org/repository/samplesearth
6 properName: Samples Earth (DEMO Site)
7 domain: https://samples.earth
8- name: marinetraining
9 url: https://www.marinetraining.eu/sitemap.xml
10 headless: false
11 pid: https://www.re3dat... | https://book.oceaninfohub.org/indexing/qstart.html |
7c050f97c830-12 | 25 domain: https://oceanexpert.org/
26# - name: obis
27# url: https://obis.org/sitemap/sitemap_datasets.xml
28# headless: false
29# pid: https://www.re3data.org/repository/obis
30# properName: Ocean Biodiversity Information System
31# domain: https://obis.org
Comments for the sources sections
Run gleaner#
... | https://book.oceaninfohub.org/indexing/qstart.html |
7c050f97c830-13 | the triplestore in order to start playing.
Minio Object store#
To view the object store you could use your browser and point it on the default minio
port at 9000. This typically something like localhost:9000.
If you wish to continue to use the command line you can use the Minio client at
Minio Client Quickstart guide.... | https://book.oceaninfohub.org/indexing/qstart.html |
1b0b0d30f2fa-0 | Interfaces#
About#
In the end the goal is to provide use of the generated index. There are several
possible used for an index.
Web UI such as the reference client at oceans.collaborium.io
A variation on this is the development of web components that can be easily included in
domain sites to perform operations on the O... | https://book.oceaninfohub.org/indexing/user.html |
7783e6c3ea0b-0 | Alternatives#
Options#
While Gleaner will be used during initial OIH development it is not
the only or required approach. The web architecture foundation means there are many other tools that
can be used and might be leveraged in a production environment including:
Extrunct
BioSchemas Tools
LDSpider
StormCrawler
Squi... | https://book.oceaninfohub.org/indexing/alternatives.html |
59e41016c7af-0 | Graph First Approach#
About#
During 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 wa... | https://book.oceaninfohub.org/indexing/graphpub.html |
59e41016c7af-1 | data into the pages is not supportable.
For this case the goal is to create a simple graph in JSON-LD. To do this we need a collection
approach that is valid for a range of Things.
For this it is proposed to use ItemList which can be used on a list of type Thing, ie anything
type in the Schema.org vocabulary.
This wou... | https://book.oceaninfohub.org/indexing/graphpub.html |
59e41016c7af-2 | "name": "Name or title of the document",
"description": "Description of the map to aid in searching",
"url": "https://www.sample-data-repository.org/creativework/map.pdf"
}
},
{
"@type": "ListItem",
"item": {
"@id": "ID_for_this_metadata_record2",
... | https://book.oceaninfohub.org/indexing/graphpub.html |
59e41016c7af-3 | Publishing and referencing#
Testing#
Since we are now dealing with a graph that is pulled as a complete entity there are a few thoughts.
How do ensure a connection between a record in the list and a resolvable URL? Do we need
to:
ensure each record has a IRI it is subject of
in the case where IRI is or can be URL, do ... | https://book.oceaninfohub.org/indexing/graphpub.html |
97fdd8a44773-0 | Data Services#
The 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.
Object Store
An S3 c... | https://book.oceaninfohub.org/indexing/dataservices.html |
97fdd8a44773-1 | Fig. 4 Gleaner Indexing and Data Service Combined#
Object store pattern#
Within in the object store the following digital object pattern is used.
This is based on the work of the RDA Digital Fabric working group.
Fig. 5 Gleaner Digital Object Pattern#
At this point the graph and data warehouse (object store) can be exp... | https://book.oceaninfohub.org/indexing/dataservices.html |
97fdd8a44773-2 | 7export GLEANER_WEB_DOMAIN=web.local.dev
8export GLEANER_WEB2_DOMAIN=web2.local.dev
9
10# Object store keys
11export MINIO_ACCESS_KEY=worldsbestaccesskey
12export MINIO_SECRET_KEY=worldsbestsecretkey
13
14# local data volumes
15export GLEANER_BASE=/tmp/gleaner/
16export GLEANER_TRAEFIK=${GLEANER_BASE}/config
17export... | https://book.oceaninfohub.org/indexing/dataservices.html |
97fdd8a44773-3 | 14
15services:
16 triplestore:
17 image: nawer/blazegraph
18 environment:
19 JAVA_XMS: 2g
20 JAVA_XMX: 8g
21 JAVA_OPTS: -Xmx6g -Xms2g --XX:+UseG1GC
22 ports:
23 - 9999:9999
24 labels:
25 - "traefik.enable=true"
26 - "traefik.http.routers.triplestore.entrypoints=ht... | https://book.oceaninfohub.org/indexing/dataservices.html |
97fdd8a44773-4 | 33 - "traefik.http.routers.triplestore-secure.tls.certresolver=http"
34 - "traefik.http.routers.triplestore-secure.service=triplestore"
35 - "traefik.http.middlewares.triplestore-secure.headers.accesscontrolallowmethods=GET,OPTIONS,PUT,POST"
36 - "traefik.http.middlewares.triplestore-secure.heade... | https://book.oceaninfohub.org/indexing/dataservices.html |
97fdd8a44773-5 | 44 - "traefik.docker.network=traefik_default"
45 volumes:
46 - ${GLEANER_GRAPH}:/var/lib/blazegraph
47 networks:
48 - traefik_default
49
50 s3system:
51 image: minio/minio:latest
52 ports:
53 - 9000:9000
54 labels:
55 - "traefik.enable=true"
56 - "traefik.http.r... | https://book.oceaninfohub.org/indexing/dataservices.html |
97fdd8a44773-6 | 63 - "traefik.http.routers.s3system-secure.tls.certresolver=http"
64 - "traefik.http.routers.s3system-secure.service=s3system"
65 - "traefik.http.services.s3system.loadbalancer.server.port=9000"
66 - "traefik.docker.network=traefik_default"
67 volumes:
68 - ${GLEANER_OBJECTS}:/data
69 ... | https://book.oceaninfohub.org/indexing/dataservices.html |
97fdd8a44773-7 | 86 - S3SECRET=${MINIO_SECRET_KEY}
87 labels:
88 - "traefik.enable=true"
89 - "traefik.http.routers.features.entrypoints=http"
90 - "traefik.http.routers.features.rule=Host(`${GLEANER_WEB_DOMAIN}`, `${GLEANER_WEB2_DOMAIN}`)"
91 - "traefik.http.middlewares.features-https-redirect.redirect... | https://book.oceaninfohub.org/indexing/dataservices.html |
97fdd8a44773-8 | 99 - "traefik.docker.network=traefik_default"
100 - "traefik.http.middlewares.features.headers.accesscontrolallowmethods=GET,OPTIONS,PUT,POST"
101 - "traefik.http.middlewares.features.headers.accesscontrolalloworigin=*"
102 - "traefik.http.middlewares.features.headers.accesscontrolmaxage=100"
103 ... | https://book.oceaninfohub.org/indexing/dataservices.html |
520d74852df3-0 | Indexing Services#
Gleaner 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 us... | https://book.oceaninfohub.org/indexing/indexingservices.html |
520d74852df3-1 | and loading the JSON-LD objects into Minio.
It does not result in these objects ending up in a graph / triplestore. You would use
this option if you intend to work on the JSON-LD objects yourself. Perhaps loading
them into a alternative graphdb like Janus or working on them with python tooling.
Fig. 2 Basic Gleaner ... | https://book.oceaninfohub.org/indexing/indexingservices.html |
520d74852df3-2 | export GLEANER_TRAEFIK=${GLEANER_BASE}/config
export GLEANER_OBJECTS=${GLEANER_BASE}/datavol/s3
export GLEANER_GRAPH=${GLEANER_BASE}/datavol/graph
The actual services can be deployed via a Docker Compose file (also works with Podman). An example of that file and details about it follow.
β Break down the compose files ... | https://book.oceaninfohub.org/indexing/indexingservices.html |
54190d287ba9-0 | Aggregator#
Intoduction#
This section introduces the the OIH approach to indexing. Currently, OIH is
using the Gleaner software to do the indexing and leverages the Gleaner IO
gleaner-compose Docker
Compose files for the server side architecture. For more information on Docker Compose files visit the
Overiew of Docke... | https://book.oceaninfohub.org/indexing/index.html |
54190d287ba9-1 | reading and accessing the DOM. This is done using Chrome Headless
Graph data base: Gleaner extracts JSON-LD documents from resources. These JSON-LD documents are representations of the RDF data mode. To
queries on them at scale, it easiest to load the triples into a compatible graph database. Sometimes we call thi... | https://book.oceaninfohub.org/indexing/index.html |
54190d287ba9-2 | not need to be run on the same machine as the supporting services as it can connect to them
over the network. So, for example, they could be hosted in commercial cloud services or
on remote servers.
You can download and compile the code from the previously mentioned github repository or
the releases page.
A single con... | https://book.oceaninfohub.org/indexing/index.html |
54190d287ba9-3 | Web UI#
As 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
can 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.
Alternatives#
N... | https://book.oceaninfohub.org/indexing/index.html |
54190d287ba9-4 | this time that set of sources if based on those partners engaged in the
development phase of OIH. As the work moves to a more routine operation
the sources will come from the ODIS Catalog.
The ODIS Catalog will then act as a curated source of domains for inclusion
in the Ocean InfoHub. This will provide a level of c... | https://book.oceaninfohub.org/indexing/index.html |
01db2915df94-0 | Gleaner CLI Docker#
About#
This is a new approach for quick starts with Gleaner. It is a script that exposes
a containerized version of Gleaner as a CLI interface.
You can use the -init flag to pull down all the support files you need including
the Docker Compose file for setting up the object store, a triplestore and... | https://book.oceaninfohub.org/indexing/cliDocker/index.html |
01db2915df94-1 | fils@ubuntu:~/clidocker# ls -lt
total 1356
-rw-r--r-- 1 fils fils 1281 Aug 15 14:07 gleaner-IS.yml
-rw-r--r-- 1 fils fils 290 Aug 15 14:07 setenvIS.sh
-rw-r--r-- 1 fils fils 1266 Aug 15 14:07 demo.yaml
-rw-r--r-- 1 fils fils 1371350 Aug 15 14:07 schemaorg-current-https.jsonld
-rwxr-xr-x 1 fils fils 1852 Au... | https://book.oceaninfohub.org/indexing/cliDocker/index.html |
01db2915df94-2 | root@ubuntu:~/clidocker# docker-compose -f gleaner-IS.yml up -d
Creating network "clidocker_traefik_default" with the default driver
Creating clidocker_triplestore_1 ... done
Creating clidocker_s3system_1 ... done
Creating clidocker_headless_1 ... done
Note: In a fresh run all the images will be pulled down. Th... | https://book.oceaninfohub.org/indexing/cliDocker/index.html |
01db2915df94-3 | 062f029462b1 chromedp/headless-shell:latest "/headless-shell/heaβ¦" About a minute ago Up About a minute 0.0.0.0:9222->9222/tcp
At this point we should be able to do a run. During the init process a
working config file was downloaded.
Note: This config file will changeβ¦ itβs pointing to an OIH partne... | https://book.oceaninfohub.org/indexing/cliDocker/index.html |
01db2915df94-4 | obviously still a local network IP but it does work. I am still investigating
this issue.
We can now do a run with the example template file.
Note: Best to delete the βsitegraphβ node, I will do that soon. It should
work, but is currently slow and gives little feedback
If everything goes well, you should see somethi... | https://book.oceaninfohub.org/indexing/cliDocker/index.html |
01db2915df94-5 | resources.go:74: samplesearth : 202
100% |ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| (202/202, 20 it/s)
summoner.go:34: Summoner end time: 2021-08-15 14:34:20.36804137 +0000 ... | https://book.oceaninfohub.org/indexing/cliDocker/index.html |
01db2915df94-6 | graphng.go:77: Assembling result graph for prefix: summoned/samplesearth to: milled/samplesearth
graphng.go:78: Result graph will be at: results/runX/samplesearth_graph.nq
pipecopy.go:16: Start pipe reader / writer sequence
graphng.go:84: Pipe copy for graph done
millers.go:80: Miller end time: 2021-08-15 14:34:21.8470... | https://book.oceaninfohub.org/indexing/cliDocker/index.html |
01db2915df94-7 | is in your PATH variable.
If you are on Linux this might look something like:
wget https://dl.min.io/client/mc/release/linux-amd64/mc
chmod +x mc
./mc --help
There is also a Minio Client Docker image
that you can use as well but it will be more difficult to use with the following scripts due
to container isolation.
To ... | https://book.oceaninfohub.org/indexing/cliDocker/index.html |
01db2915df94-8 | [2021-08-19 13:36:04 UTC] 0B summoned/
You can explore mc and see how to copy and work with the object store.
Loading to the triplestore#
As part of our Docker compose file we also spun up a triplestore. Letβs use that now.
Now Download the minio2blaze.sh script.
curl -O https://raw.githubusercontent.com/earthcube... | https://book.oceaninfohub.org/indexing/cliDocker/index.html |
01db2915df94-9 | ./minio2blaze.sh oih/gleaner/milled/samplesearth
... lots of results removed
If all has gone well, we should have RDF in the triplestore. We started our triplestore as part of
the docker-compose.yml file. You can visit the triplestore at http://localhost:9999/blazegraph/#splash
Note, you may have to try other addr... | https://book.oceaninfohub.org/indexing/cliDocker/index.html |
01db2915df94-10 | You can explore more about SPARQL and the wide range of queries you can do with it
at the W3C SPARQL 1.1 Query Language reference.
Conclusion#
We have attempted here to give a quick introduction to the use of Gleaner in a Docker
environment. This is a very simple example, but it should give you an idea of the approach... | https://book.oceaninfohub.org/indexing/cliDocker/index.html |
50dcb198a291-0 | Prov#
About#
This is the start of some discussion on issues around prov tracking in OIH.
This may take two paths. One would be the prov tracking indexers might do
and the other prov that providers would encode to provide specific prov
the community requests.
Gleaner Prov#
The Gleaner application generates a prov graph... | https://book.oceaninfohub.org/indexing/prov/index.html |
50dcb198a291-1 | 6 },
7 "@graph": [
8 {
9 "@id": "https://www.re3data.org/repository/obis",
10 "@type": "prov:Organization",
11 "rdf:name": "Ocean Biodiversity Information System",
12 "rdfs:seeAlso": "https://obis.org"
13 },
14 {
15 "@id": "https://obi... | https://book.oceaninfohub.org/indexing/prov/index.html |
50dcb198a291-2 | 25 "prov:hadMember": {
26 "@id": "https://obis.org/dataset/9381239f-3d64-48b4-80c9-b9ebb674edc2"
27 }
28 },
29 {
30 "@id": "urn:gleaner:milled:obis:7c1eaa1aaed95861330109026c42e57a31ecae55",
31 "@type": "prov:Entity",
32 "prov:value": "... | https://book.oceaninfohub.org/indexing/prov/index.html |
50dcb198a291-3 | 40 },
41 "prov:generated": {
42 "@id": "urn:gleaner:milled:obis:7c1eaa1aaed95861330109026c42e57a31ecae55"
43 },
44 "prov:used": {
45 "@id": "https://gleaner.io/id/collection/7c1eaa1aaed95861330109026c42e57a31ecae55"
46 }
47 }
48... | https://book.oceaninfohub.org/indexing/prov/index.html |
50dcb198a291-4 | "@explicit": "false",
"@type": "prov:Activity",
"prov:generated": {},
"prov:endedAtTime": {},
"prov:used": {}
}
context = {
"@vocab": "https://schema.org/",
"prov": "http://www.w3.org/ns/prov#"
}
compacted = jsonld.compact(doc, context)
framed = jsonld.frame(compacted, frame)
jd = json.dumps(framed, ... | https://book.oceaninfohub.org/indexing/prov/index.html |
50dcb198a291-5 | "@type": "prov:Entity",
"prov:value": "7c1eaa1aaed95861330109026c42e57a31ecae55.jsonld"
},
"prov:used": {
"@id": "https://gleaner.io/id/collection/7c1eaa1aaed95861330109026c42e57a31ecae55",
"@type": "prov:Collection",
"prov:hadMember": {
"@id": "https://obis.org/datas... | https://book.oceaninfohub.org/indexing/prov/index.html |
50dcb198a291-6 | }
}
}
}
Nano Prov#
This is a basic nanoprov example. Note, this is a draft and
the ID connections and examples have not been made yet.
1{
2 "@context": {
3 "gleaner": "https://voc.gleaner.io/id/",
4 "np": "http://www.nanopub.org/nschema#",
5 "prov": "http://www.w3.org/ns/prov#",... | https://book.oceaninfohub.org/indexing/prov/index.html |
50dcb198a291-7 | 20 }
21 },
22 {
23 "@id": "gleaner:nanopub/XID#assertion",
24 "@graph": {
25 "@id": "DataSetURI",
26 "@type": "schema:Dataset",
27 "description": "This is where you would put corrections or annotations",
28 "ident... | https://book.oceaninfohub.org/indexing/prov/index.html |
50dcb198a291-8 | 46 }
47 ]
48 }
49 },
50 {
51 "@id": "gleaner:nanopub/XID#provenance",
52 "@graph": {
53 "@id": "URIforprovondataset",
54 "prov:wasGeneratedAtTime": {
55 "@value": "dateDone",
56 ... | https://book.oceaninfohub.org/indexing/prov/index.html |
50dcb198a291-9 | 77 }
78 }
79 ]
80}
import json
from pyld import jsonld
import os, sys
currentdir = os.path.dirname(os.path.abspath(''))
parentdir = os.path.dirname(currentdir)
sys.path.insert(0, parentdir)
from lib import jbutils
with open("../../../odis-in/dataGraphs/indexing/prov/graphs/nanoprov.json") as dgraph... | https://book.oceaninfohub.org/indexing/prov/index.html |
d9bc403bf7a7-0 | Tooling#
About#
The tooling section is a collection of tools, scripts, notebooks and other software that could
be of use to the various personas of Ocean InfoHub
OpenRefine#
In this section you will find some details around
the Open Refine project and how to use it to
generate JSON-LD documents.
Notebooks#
In this sect... | https://book.oceaninfohub.org/tooling/index.html |
a23d8448763a-0 | Personas#
About#
During the design process of the Ocean InfoHub (OIH), many of the design approached leverage three
personas that help define the various archtypes of people who engage with OIH. It should not be assumed
these scope all the potential persona or that a person or organization scope only one. It is quite... | https://book.oceaninfohub.org/personas/persona.html |
a23d8448763a-1 | In OIH the Aggregator is a person or organization who is indexing resources on the
web using the structured data on the web patterns described in this documentation.
Their goal is to efficiently and efficiently index the resources exposed by the Publisher
persona and generate usable indexes. Further, they would work t... | https://book.oceaninfohub.org/personas/persona.html |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.