Sustainable Wheat Production Datahub
Twelve worked questions that run against the live Sustainable Wheat Production Datahub — over 17 million statements spanning nutrient management, disease management, weather, and drought. Each opens in the GraphDB editor with the query loaded; press Run to execute it, or edit it first and make it your own.
grip-wheat-datahub once — your browser remembers the
choice, and every link below will then open with its query already loaded. If an editor shows
select * where { ?s ?p ?o } instead of the question you clicked, that is the repository
step resetting it: go back and open the link again.
Start here — these describe what the knowledge graph contains.
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dis: <https://gwsp.cs.ksu.edu/disease-management/disease/>
SELECT ?disease ?diseaseLabel ?pathogen ?pathogenLabel WHERE {
?disease dis:caused_by ?pathogen .
OPTIONAL { ?disease rdfs:label ?diseaseLabel }
OPTIONAL { ?pathogen rdfs:label ?pathogenLabel }
}
ORDER BY ?diseaseLabel
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX fert: <https://gwsp.cs.ksu.edu/nutrient-management/fertilization/>
SELECT ?fertilizer ?label ?N ?P2O5 ?K2O ?S WHERE {
?fertilizer rdf:type ?c .
?c rdfs:subClassOf* fert:Fertilizer_Source .
OPTIONAL { ?fertilizer rdfs:label ?label }
OPTIONAL { ?fertilizer fert:has_N_percent ?N }
OPTIONAL { ?fertilizer fert:has_P2O5_percent ?P2O5 }
OPTIONAL { ?fertilizer fert:has_K2O_percent ?K2O }
OPTIONAL { ?fertilizer fert:has_S_percent ?S }
}
Fertility and agronomy questions answered from the Kansas field-trial record.
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX obs: <https://gwsp.cs.ksu.edu/nutrient-management/observation/>
SELECT ?location ?year (COUNT(?o) AS ?plots) (AVG(?y) AS ?avgYield) WHERE {
?o a obs:Plot_Observation ;
obs:observed_at_site_year ?sye .
OPTIONAL { ?o obs:has_yield_lbs_per_acre_13pct ?y }
?sye obs:has_location ?loc ;
obs:has_year ?yr .
?loc rdfs:label ?location .
?yr rdfs:label ?year .
}
GROUP BY ?location ?year
ORDER BY ?location ?year
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX obs: <https://gwsp.cs.ksu.edu/nutrient-management/observation/>
SELECT ?split ?label (AVG(?y) AS ?avgYield) (AVG(?p) AS ?avgProtein) (COUNT(?o) AS ?n)
WHERE {
?o a obs:Plot_Observation ;
obs:observed_n_timing ?split .
OPTIONAL { ?o obs:has_yield_lbs_per_acre_13pct ?y }
OPTIONAL { ?o obs:has_protein_pct_dry_basis ?p }
OPTIONAL { ?split rdfs:label ?label }
}
GROUP BY ?split ?label
ORDER BY ?split
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX obs: <https://gwsp.cs.ksu.edu/nutrient-management/observation/>
PREFIX fert: <https://gwsp.cs.ksu.edu/nutrient-management/fertilization/>
SELECT ?cat (SAMPLE(?catLabel) AS ?category)
(AVG(?y) AS ?avgYield) (COUNT(?o) AS ?n) WHERE {
?o a obs:Plot_Observation ;
obs:observed_previous_crop ?pc ;
obs:has_yield_lbs_per_acre_13pct ?y .
?pc fert:has_crop_category ?cat .
OPTIONAL { ?cat rdfs:label ?catLabel }
}
GROUP BY ?cat
ORDER BY DESC(?avgYield)
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX obs: <https://gwsp.cs.ksu.edu/nutrient-management/observation/>
SELECT ?location ?variety ?avgYield WHERE {
{
SELECT ?location ?variety (AVG(?y) AS ?avgYield) WHERE {
?o a obs:Plot_Observation ;
obs:observed_cultivar ?cv ;
obs:observed_at_site_year ?sye ;
obs:has_yield_lbs_per_acre_13pct ?y .
?cv rdfs:label ?variety .
?sye obs:has_location ?loc .
?loc rdfs:label ?location .
}
GROUP BY ?location ?variety
}
{
SELECT ?location (MAX(?avgY) AS ?topYield) WHERE {
SELECT ?location ?variety (AVG(?y) AS ?avgY) WHERE {
?o a obs:Plot_Observation ;
obs:observed_cultivar ?cv ;
obs:observed_at_site_year ?sye ;
obs:has_yield_lbs_per_acre_13pct ?y .
?cv rdfs:label ?variety .
?sye obs:has_location ?loc .
?loc rdfs:label ?location .
}
GROUP BY ?location ?variety
}
GROUP BY ?location
}
FILTER( ?avgYield = ?topYield )
}
ORDER BY ?location
These join disease observations to nutrient-side yield and quality measurements in a single query — the federated design working end to end.
PREFIX obs: <https://gwsp.cs.ksu.edu/nutrient-management/observation/>
PREFIX dis: <https://gwsp.cs.ksu.edu/disease-management/disease/>
PREFIX mgt: <https://gwsp.cs.ksu.edu/disease-management/management/>
SELECT ?treatment (COUNT(?plot) AS ?plots)
(AVG(?peakSeverity) AS ?meanPeakSeverity)
(AVG(?don) AS ?meanDON)
(AVG(?yield) AS ?meanYield)
(AVG(?tw) AS ?meanTestWeight)
WHERE {
{
SELECT ?plot (MAX(?sev) AS ?peakSeverity) WHERE {
?a dis:assessed_plot ?plot ;
dis:has_severity_percent ?sev .
}
GROUP BY ?plot
}
OPTIONAL { ?plot dis:has_DON_ppm ?don }
OPTIONAL { ?plot obs:has_yield_bu_per_acre ?yield }
OPTIONAL { ?plot obs:has_test_weight_lbs_per_bu ?tw }
BIND( IF( EXISTS { ?app mgt:applied_to_plot ?plot }, "treated", "untreated" )
AS ?treatment )
}
GROUP BY ?treatment
PREFIX dis: <https://gwsp.cs.ksu.edu/disease-management/disease/>
PREFIX env: <https://gwsp.cs.ksu.edu/nutrient-management/environment/>
PREFIX mgt: <https://gwsp.cs.ksu.edu/disease-management/management/>
SELECT ?nApplications (COUNT(?plot) AS ?plots) (AVG(?peakSeverity) AS ?meanPeakSeverity)
WHERE {
{
SELECT ?plot (MAX(?sev) AS ?peakSeverity) WHERE {
?a dis:assessed_plot ?plot ;
dis:has_severity_percent ?sev .
}
GROUP BY ?plot
}
{
SELECT ?plot (COUNT(?app) AS ?nApplications) WHERE {
?plot a env:Plot .
OPTIONAL { ?app mgt:applied_to_plot ?plot }
}
GROUP BY ?plot
}
}
GROUP BY ?nApplications
ORDER BY ?nApplications
PREFIX dis: <https://gwsp.cs.ksu.edu/disease-management/disease/>
PREFIX env: <https://gwsp.cs.ksu.edu/nutrient-management/environment/>
PREFIX ddata: <https://gwsp.cs.ksu.edu/disease-data/>
SELECT ?plot ?date ?severity ?incidence WHERE {
?plot a env:Plot ;
dis:has_target_disease dis:Fusarium_Head_Blight .
?a dis:assessed_plot ?plot ;
dis:on_date ?date .
OPTIONAL { ?a dis:has_severity_percent ?severity }
OPTIONAL { ?a dis:has_incidence_percent ?incidence }
}
ORDER BY ?plot ?date
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX obs: <https://gwsp.cs.ksu.edu/nutrient-management/observation/>
PREFIX dis: <https://gwsp.cs.ksu.edu/disease-management/disease/>
PREFIX env: <https://gwsp.cs.ksu.edu/nutrient-management/environment/>
SELECT ?plot ?variety ?don ?peakSeverity WHERE {
?plot a env:Plot ;
dis:has_target_disease dis:Fusarium_Head_Blight ;
dis:has_DON_ppm ?don .
OPTIONAL { ?plot obs:has_cultivar ?cv . ?cv rdfs:label ?variety }
{
SELECT ?plot (MAX(?sev) AS ?peakSeverity) WHERE {
?a dis:assessed_plot ?plot ;
dis:has_severity_percent ?sev .
}
GROUP BY ?plot
}
}
ORDER BY DESC(?don)
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX obs: <https://gwsp.cs.ksu.edu/nutrient-management/observation/>
PREFIX dis: <https://gwsp.cs.ksu.edu/disease-management/disease/>
PREFIX env: <https://gwsp.cs.ksu.edu/nutrient-management/environment/>
SELECT ?plot ?variety ?peakSeverity ?yield WHERE {
?plot a env:Plot ;
obs:has_yield_bu_per_acre ?yield .
OPTIONAL { ?plot obs:has_cultivar ?cv . ?cv rdfs:label ?variety }
{
SELECT ?plot (MAX(?sev) AS ?peakSeverity) WHERE {
?a dis:assessed_plot ?plot ;
dis:has_severity_percent ?sev .
}
GROUP BY ?plot
}
}
ORDER BY DESC(?peakSeverity)
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX obs: <https://gwsp.cs.ksu.edu/nutrient-management/observation/>
PREFIX dis: <https://gwsp.cs.ksu.edu/disease-management/disease/>
SELECT ?d ?diseaseLabel ?cv ?variety (AVG(?sev) AS ?avgSeverity) (COUNT(?a) AS ?n)
WHERE {
?a a dis:Disease_Assessment ;
dis:assessed_plot ?plot ;
dis:has_severity_percent ?sev .
?plot obs:has_cultivar ?cv ;
dis:has_target_disease ?d .
OPTIONAL { ?cv rdfs:label ?variety }
OPTIONAL { ?d rdfs:label ?diseaseLabel }
}
GROUP BY ?d ?diseaseLabel ?cv ?variety
ORDER BY ?d DESC(?avgSeverity)
These twelve are drawn from the datahub's forty competency questions. The queries are plain SPARQL against the published ontologies — no login required. Results come from the live store, so they change as new trial data is loaded.