Skip to content

Commit 49b6e7c

Browse files
committed
add more competency questions
1 parent 03ee005 commit 49b6e7c

8 files changed

Lines changed: 183 additions & 3 deletions

File tree

competencyQuestions/CQ10-result.csv

Lines changed: 101 additions & 0 deletions
Large diffs are not rendered by default.

competencyQuestions/CQ10.rq

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# 100 sample points with results
2+
3+
PREFIX coso: <http://w3id.org/coso/v1/contaminoso#>
4+
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
5+
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
6+
7+
select * where {
8+
?testPoint a coso:SamplePoint;
9+
coso:pointFromFeature ?feature;
10+
^coso:observedAtSamplePoint ?observation.
11+
?observation coso:ofSubstance ?substance;
12+
coso:hasResult/coso:measurementValue ?concentration;
13+
coso:hasResult/coso:measurementUnit ?unit.
14+
15+
} limit 100

competencyQuestions/CQ11.rq

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# All surface water and fish tissue sample results from one samplepoint
2+
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
3+
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
4+
PREFIX qudt: <http://qudt.org/schema/qudt/>
5+
PREFIX coso: <http://w3id.org/coso/v1/contaminoso#>
6+
PREFIX me_egad_data: <http://w3id.org/sawgraph/v1/me-egad-data#>
7+
8+
select ?materialSample ?observation (GROUP_CONCAT(DISTINCT(?sampleType); separator=", ") as ?sampleTypes) ?substance ?substanceL ?value ?unit
9+
where {
10+
VALUES ?samplecategories{coso:WaterSample coso:AnimalMaterialSample} #expand to fish
11+
me_egad_data:samplePoint.105221 coso:pointFromFeature/coso:ofFeatureType ?featureType;
12+
^coso:fromSamplePoint ?materialSample. #get samples for the point
13+
?observation coso:analyzedSample ?materialSample; #get observations related to the sample
14+
coso:ofSubstance ?substance;
15+
coso:hasResult ?measure.
16+
?materialSample coso:sampleOfMaterialType ?st; # a sample can have multiple types
17+
rdf:type ?samplecategories.
18+
?st rdfs:label ?sampleType.
19+
?substance rdfs:label ?substanceL.
20+
21+
#Filter to a specific substance:
22+
# VALUES ?substance {}.
23+
24+
?measure coso:measurementValue ?value;
25+
coso:measurementUnit ?unit.
26+
FILTER NOT EXISTS{ ?measure a coso:AggregateContaminantMeasurement} #remove results that are aggregates
27+
} GROUP BY ?materialSample ?observation ?substance ?substanceL ?value ?unit
28+
LIMIT 100

competencyQuestions/CQ6-result.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
measurement,dl,value,unit
2+
http://w3id.org/sawgraph/v1/me-egad-data#result.L204794007RE.AAWH.20201030.68259121,http://sawgraph.spatialai.org/v1/me-egad-data#mdl.1.1.NG/G,1.1,http://w3id.org/coso/v1/contaminoso#NanoGM-PER-GM

competencyQuestions/CQ6.rq

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# What was the detection limit of measurement X?
2+
PREFIX qudt: <http://qudt.org/schema/qudt/>
3+
PREFIX coso: <http://w3id.org/coso/v1/contaminoso#>
4+
PREFIX me_egad_data: <http://w3id.org/sawgraph/v1/me-egad-data#>
5+
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
6+
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
7+
8+
SELECT *
9+
WHERE{
10+
VALUES ?measurement{me_egad_data:result.L204794007RE.AAWH.20201030.68259121}
11+
?measurement a coso:ContaminantMeasurement;
12+
coso:resultAnnotation ?dl.
13+
?dl a coso:DetectionLimit;
14+
qudt:numericValue ?value;
15+
qudt:hasUnit ?unit.
16+
17+
}

competencyQuestions/CQ7.rq

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# What known release points exist in this region?
2+
3+
PREFIX kwg-ont: <http://stko-kwg.geog.ucsb.edu/lod/ontology/>
4+
PREFIX coso: <http://w3id.org/coso/v1/contaminoso#>
5+
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
6+
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
7+
8+
SELECT *
9+
WHERE{
10+
?releasePoint a coso:ReleasePoint.
11+
?releasePoint kwg-ont:sfWithin ?region
12+
VALUES ?region{}.
13+
}

competencyQuestions/readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ The SAWGraph questions demonstrate some of the more complicated questions that r
1717
| [7]() | What known *release points* exist in *this region*? | s2 cells, point type | | <ul><li> What suspected contamination sources exist above this aquifer?</li><li>How many suspected contamination sources are within a radius of two S2L13 cells of each well?</li></ul>|
1818
| [8]() | What locations have had multiple reported PFAS releases over time? | | | |
1919
| [9]() | Where did known contaminant releases occur in 2023? | | | |
20+
| [10]() | 100 sample points with results | | | |
21+
| [11]() | All surface water and fish tissue sample results from one samplepoint | | | |
22+
| [12]()| Retrieve all sample points and count how many there are for each type of sample point | | | |
23+
| [13]() | Retrieve all marine samplepoints and determine what and how many of each sample type are there | | | |

v1/contaminoso_comptox_ext.ttl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
@base <http://w3id.org/coso/comptox_ext#> .
1414

1515
<http://w3id.org/coso/comptox_ext#> rdf:type owl:Ontology ;
16-
owl:versionIRI <http://w3id.org/coso/v1/comptox_ext#>> ;
16+
owl:versionIRI <http://w3id.org/coso/v1/comptox_ext#> ;
1717
dcterms:created "2025-03-30"@en-us ;
1818
dcterms:creator <http://orcid.org/0000-0002-5331-5052> ,
1919
<http://orcid.org/0000-0003-3547-8058> ,
@@ -26,15 +26,15 @@
2626
dcterms:source "https://raw.githubusercontent.com/SAWGraph/kg-construction/master/ontologies/v1/contaminoso_comptox_ext.ttl"^^<xsd:anyURI> ;
2727
dcterms:title "Contaminant Observation and Samples Ontology"@en-us ;
2828
rdfs:label "ContaminOSO"@en-us ;
29-
vann:preferredNamespaceUri <http://w3id.org/coso/comptox_ext#>;
29+
vann:preferredNamespaceUri <http://w3id.org/coso/v1/comptox_ext#>;
3030
vann:preferredNamespacePrefix "coso_comptox:";
3131
owl:versionInfo "1"@en-us .
3232

3333
coso:ofComptoxSubstance a owl:ObjectProperty;
3434
rdfs:label "of Comptox Substance";
3535
dcterms:description "A relation between an entity and a chemical substance as identified by Comptox";
3636
rdfs:subPropertyOf coso:ofSubstance;
37-
rdfs:range comptox:ChemicalEntity;
37+
rdfs:range comptox:CompTox_ChemicalEntity;
3838
owl:ObjectPropertyChain (coso:ofDatasetSubstance comptox:sameAsComptoxSubstance).
3939

4040
coso:ofDatasetSubstance a owl:ObjectProperty;

0 commit comments

Comments
 (0)