From fdf71892a6f64256b65a83b05715e6917e6cd74b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Oct 2025 07:04:43 +0000 Subject: [PATCH 1/2] Initial plan From 8be6be7f9888c2c78decea11d9f286826f7c9290 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Oct 2025 07:11:23 +0000 Subject: [PATCH 2/2] Add SPARQL query for observatory listing with interactive execution Co-authored-by: cedricdcc <30471340+cedricdcc@users.noreply.github.com> --- book/04-data-products/emo-bon-graph.md | 136 +++++++++++++++++++++++++ 1 file changed, 136 insertions(+) diff --git a/book/04-data-products/emo-bon-graph.md b/book/04-data-products/emo-bon-graph.md index 02ddb11..fa27470 100644 --- a/book/04-data-products/emo-bon-graph.md +++ b/book/04-data-products/emo-bon-graph.md @@ -11,3 +11,139 @@ The sparql endpoint for the EMO-BON Graph is available at: Some examples of SPARQL queries that can be run against the EMO-BON Graph are: +## Query 1: List of Observatories + +This query retrieves the list of observatories with their names, country, location (latitude, longitude, and Marine Regions Geographic Identifier - MRGID), and habitat information. + +### SPARQL Query + +```sparql +PREFIX owl: +PREFIX rdf: +PREFIX rdfs: +PREFIX schema: +PREFIX sosa: +PREFIX geo: +PREFIX marineregions: + +SELECT ?observatory ?name ?country ?lat ?long ?mrgid ?habitat +WHERE { + ?observatory a sosa:Platform ; + schema:name ?name . + + OPTIONAL { ?observatory schema:location/schema:addressCountry ?country . } + OPTIONAL { ?observatory geo:lat ?lat . } + OPTIONAL { ?observatory geo:long ?long . } + OPTIONAL { ?observatory schema:location/schema:identifier ?mrgid . } + OPTIONAL { ?observatory schema:additionalProperty/schema:name ?habitat . } +} +ORDER BY ?name +``` + +### Execute Query + +
+ +
+
+
+ + + +:::{note} +The interactive query execution above uses JavaScript to fetch data from the SPARQL endpoint. If you encounter CORS issues, you may need to access the endpoint directly or use a SPARQL client. +::: +