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. +::: +