Skip to content

Commit bcedf5f

Browse files
committed
2 parents 3f3a5f5 + 6e13ca2 commit bcedf5f

11 files changed

Lines changed: 98 additions & 20 deletions

File tree

competencyQuestions/CQ11.rq

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# All surface water and animal tissue sample results from one samplepoint
1+
# Find all surface water and animal tissue sample results that report the contamination by an individual substance from one samplepoint (Maine EGAS SamplePoint 65555).
2+
# SUCCESSFULLY TESTED ON FRINK 2026-03-02
3+
24
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
35
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
46
PREFIX qudt: <http://qudt.org/schema/qudt/>
@@ -21,8 +23,7 @@ where {
2123
#Filter to a specific substance:
2224
# VALUES ?substance {}.
2325

24-
?measure coso:measurementValue ?value.
25-
OPTIONAL{?measure coso:measurementUnit ?unit.}
26+
?measure coso:measurementValue ?value.
27+
OPTIONAL { ?measure coso:measurementUnit ?unit.}
2628
FILTER NOT EXISTS{ ?measure a coso:AggregateContaminantMeasurement} #remove results that are aggregates
27-
} GROUP BY ?materialSample ?observation ?substance ?substanceL ?value ?unit
28-
LIMIT 100
29+
} GROUP BY ?materialSample ?observation ?substance ?substanceL ?value ?unit

competencyQuestions/CQ12.rq

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Retrieve all sample points and count how many there are for each type of sample point
1+
# Retrieve how many sample points are there for each different type of sample point.
2+
# SUCCESSFULLY TESTED ON FRINK 2026-03-02
23

34
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
45
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

competencyQuestions/CQ13.rq

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Retrieve all marine samplepoints and determine what and how many of each sample type are there
1+
# Retrieve all marine samplepoints and determine what types they are and how many of each type there are
2+
# SUCCESSFULLY TESTED ON FRINK 2026-03-02
23

34
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
45
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
@@ -7,6 +8,7 @@ PREFIX coso: <http://w3id.org/coso/v1/contaminoso#>
78
PREFIX me_egad_data: <http://w3id.org/sawgraph/v1/me-egad-data#>
89
PREFIX us-wqp-data: <http://w3id.org/sawgraph/v1/us-wqp-data#>
910

11+
1012
SELECT ?sampletype ?typeLabel (COUNT(?sample) as ?no_samples) WHERE {
1113
?sp rdf:type coso:SamplePoint;
1214
coso:pointFromFeature ?feature.

competencyQuestions/CQ15.rq

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#Find all soil samples that detected PFOS above the detection limit.
2+
# SUCCESSFULLY TESTED ON FRINK 2026-03-02
3+
4+
PREFIX ds: <http://purl.org/ctic/dcat#>
5+
PREFIX dcterms: <http://purl.org/dc/terms/>
6+
PREFIX qudt: <http://qudt.org/schema/qudt/>
7+
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
8+
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
9+
PREFIX owl: <http://www.w3.org/2002/07/owl#>
10+
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
11+
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
12+
PREFIX coso: <http://w3id.org/coso/v1/contaminoso#>
13+
PREFIX dsstox: <http://w3id.org/DSSTox/v1/>
14+
15+
SELECT * WHERE {
16+
?sample a coso:MaterialSample; # all samples
17+
a coso:SoilSample; # soil samples
18+
coso:sampleOfMaterialType/rdfs:label ?sampleType. # with type labels
19+
?observation coso:analyzedSample ?sample ;
20+
coso:ofSubstance ?substance; # that were tested for a specific substance
21+
coso:hasResult ?result.
22+
?substance rdf:type dsstox:ChemicalEntity ;
23+
skos:altLabel ?substanceLabel.
24+
VALUES ?substance {dsstox:DTXSID3031864} # where the substance is PFOS
25+
?result coso:measurementValue ?measurement.
26+
FILTER NOT EXISTS {?measurement owl:sameAs coso:non-detect. }
27+
28+
} ORDER BY ?value

competencyQuestions/CQ16.rq

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# What are all the information that qualifies the results of measurement X?
2+
# SUCCESSFULLY TESTED ON FRINK 2026-03-02
3+
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+
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
8+
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
9+
10+
SELECT *
11+
WHERE{
12+
VALUES ?measurement{me_egad_data:result.L204794007RE.AAWH.20201030.68259121} #us_wqp_data:d.wqp.measurement.STORET-987908414
13+
?measurement a coso:ContaminantMeasurement;
14+
?p ?qualifier .
15+
?p rdfs:subPropertyOf coso:hasResultQualifier .
16+
17+
}

competencyQuestions/CQ2.rq

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
1-
PREFIX ds: <http://purl.org/ctic/dcat#>
1+
# What soil samples have been tested for PFBS?
2+
# SUCCESSFULLY TESTED ON FRINK 2026-03-02
3+
24
PREFIX dcterms: <http://purl.org/dc/terms/>
35
PREFIX qudt: <http://qudt.org/schema/qudt/>
46
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
57
PREFIX coso: <http://w3id.org/coso/v1/contaminoso#>
68
PREFIX dsstox: <http://w3id.org/DSSTox/v1/>
79

8-
# What soil samples have been tested for PFBS? What is min and max result?
910

1011
SELECT * WHERE {
1112
?sample a coso:MaterialSample; # all samples
1213
a coso:SoilSample; # soil samples
1314
coso:sampleOfMaterialType/rdfs:label ?sampleType; # with type labels
1415
^coso:analyzedSample ?observation.
15-
?observation coso:ofDSSToxSubstance ?dtxsid; # that were tested for a specific substance
16-
coso:ofDSSToxSubstance/rdfs:label ?substanceName;
16+
?observation coso:ofSubstance ?dtxsid; # that were tested for a specific substance
17+
coso:ofSubstance/rdfs:label ?substanceName;
1718
coso:hasResult ?measurement.
1819
?measurement coso:measurementValue ?value;
1920
coso:measurementUnit/qudt:symbol ?unit.
20-
VALUES ?dtxsid{dsstox:DTXSID5030030} # where the substance is PFBS
21-
VALUES ?substanceName{"Perfluorobutanesulfonic acid"} # Can alternately search substance by name
21+
VALUES ?dtxsid{dsstox:DTXSID5030030} # # where the substance is PFBS
22+
#VALUES ?substanceName{"Perfluorobutanesulfonic acid"} # Can alternately search substance by name
2223

2324
} ORDER BY ?value

competencyQuestions/CQ2_V2.rq

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# What soil samples have been tested for PFBS? What is the min and max result?
2+
# SUCCESSFULLY TESTED ON FRINK 2026-03-02
3+
4+
PREFIX owl: <http://www.w3.org/2002/07/owl#>
5+
PREFIX dcterms: <http://purl.org/dc/terms/>
6+
PREFIX qudt: <http://qudt.org/schema/qudt/>
7+
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
8+
PREFIX coso: <http://w3id.org/coso/v1/contaminoso#>
9+
PREFIX dsstox: <http://w3id.org/DSSTox/v1/>
10+
11+
SELECT (max(?value) as ?max_value) (min(?value) as ?min_value) WHERE {
12+
?sample a coso:MaterialSample; # all samples
13+
a coso:SoilSample; # soil samples
14+
coso:sampleOfMaterialType/rdfs:label ?sampleType; # with type labels
15+
^coso:analyzedSample ?observation.
16+
?observation coso:ofSubstance ?dtxsid; # that were tested for a specific substance
17+
coso:ofSubstance/rdfs:label ?substanceName;
18+
coso:hasResult ?measurement.
19+
?measurement coso:measurementValue ?value;
20+
coso:measurementUnit/qudt:symbol ?unit.
21+
FILTER NOT EXISTS {?value owl:sameAs coso:non-detect } # and
22+
VALUES ?dtxsid{dsstox:DTXSID5030030} # where the substance is PFBS
23+
24+
} ORDER BY ?value

competencyQuestions/CQ3.rq

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
# What wells have been tested for PFOA (CAS number 335671) at levels below 20 ppt or it was not detected?
2+
# SUCCESSFULLY TESTED ON FRINK 2026-03-02
3+
14
PREFIX dcterms: <http://purl.org/dc/terms/>
25
PREFIX qudt: <http://qudt.org/schema/qudt/>
36
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
47
PREFIX coso: <http://w3id.org/coso/v1/contaminoso#>
58
PREFIX me_egad_data: <http://w3id.org/sawgraph/v1/me-egad-data#>
69

7-
# What wells have been tested for PFOA at levels below 20 ppt or it was not detected?
8-
910
SELECT * WHERE {
1011
?feature coso:ofFeatureType ?featureType; # all features
1112
^coso:pointFromFeature/^coso:observedAtSamplePoint ?observation. # with observations

competencyQuestions/CQ4.rq

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
# Samples (in Maine) from what surface water bodies have a cumulative PFAS contamination result of above 20 ppt?
2+
# SUCCESSFULLY TESTED ON FRINK 2026-03-02
3+
14
PREFIX qudt: <http://qudt.org/schema/qudt/>
25
PREFIX unit: <http://qudt.org/vocab/unit/>
36
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
47
PREFIX coso: <http://w3id.org/coso/v1/contaminoso#>
58
PREFIX me_egad_data: <http://w3id.org/sawgraph/v1/me-egad-data#>
69

7-
# Samples from what surface water bodies have a cumulative contamination result of above 20 ppt?
8-
910
SELECT ?feature ?featureType ?sample ?date (SUM(?value) as ?cumulativeConcentration) ?unit WHERE {
1011
?sample a coso:WaterSample; # All Water Samples
1112
a ?surfaceWater; # of a particular class (surface water)

competencyQuestions/CQ5.rq

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
# What is the mean concentration of PFOA in fish tissue in Maine?
1+
# What is the mean concentration of all different PFAS tested for in fish tissue in Maine?
2+
# SUCCESSFULLY TESTED ON FRINK 2026-03-02
3+
24

35
PREFIX kwgr: <http://stko-kwg.geog.ucsb.edu/lod/resource/>
46
PREFIX kwg-ont: <http://stko-kwg.geog.ucsb.edu/lod/ontology/>
57
PREFIX coso: <http://w3id.org/coso/v1/contaminoso#>
68
PREFIX obo: <http://purl.obolibrary.org/obo/>
9+
10+
711
select ?substance ?unit (AVG(?value) as ?AvgConcentration) (COUNT(?observation) as ?sampleCount) where {
812
?observation a coso:ContaminantSampleObservation; # All observations
913
coso:analyzedSample ?sample; # with related samples
@@ -17,7 +21,5 @@ select ?substance ?unit (AVG(?value) as ?AvgConcentration) (COUNT(?observation)
1721
?region a kwg-ont:AdministrativeRegion_3. # administrative region (town/township)
1822
?measurement coso:measurementValue ?value; # with the result value
1923
coso:measurementUnit ?unit. # and unit
20-
#SERVICE <repository:Spatial>{
2124
?region kwg-ont:administrativePartOf+ kwgr:administrativeRegion.USA.23 # Where the town is part of Maine
22-
#}
2325
} GROUP BY ?substance ?unit

0 commit comments

Comments
 (0)