Sustainable Wheat Production Datahub

Query the Knowledge Graph

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.

First time here? GraphDB asks you to pick a repository before it will run anything. On the page that opens, click 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.
Reference

Start here — these describe what the knowledge graph contains.

D3 · Reference
For each wheat disease, what is its causal pathogen?
The 13 wheat diseases and their causal pathogens — the disease suite's lookup table, and the fastest way to show a newcomer what the ontology covers.
Returns: 13 rows, clean labels on both sides.
Run in GraphDB →
View SPARQL
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
N8 · Reference
Which fertilizer sources are represented, and what is the guaranteed analysis of each?
31 fertilizer sources with guaranteed analysis (N-P2O5-K2O-S). A genuinely useful agronomic lookup that happens to also prove the fert module is populated.
Returns: 31 rows. Note Compost returns 0/0/0/0 — analysis values missing for organic sources.
Run in GraphDB →
View SPARQL
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 }
}
Nutrient Management

Fertility and agronomy questions answered from the Kansas field-trial record.

N17 · Nutrient
For each location and year, how many plots were recorded and the average yield.
The extent of the record itself: every location and crop season in the trial network, with how many plots were recorded and what they yielded. Nothing else in the set answers 'how much data is in here, and from where'.
Returns: 20 rows from Crop Season 2016-17 onward, across Ashland Bottoms, Belleville and others; plot counts range 32 to 224.
Run in GraphDB →
View SPARQL
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
N19 · Nutrient
For each nitrogen timing split, the average yield and protein.
Nitrogen timing split vs yield AND protein. The most directly actionable fertility result in the set, on a balanced design (~141 plots per treatment).
Returns: 4 rows. All-spring N leads on both yield (4494) and protein (12.12); all-fall trails on both (4284 / 11.43).
Run in GraphDB →
View SPARQL
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
N16 · Nutrient
For each previous-crop category, the average yield of the following wheat crop.
Previous crop category vs following wheat yield — the rotation question, and one of only two nutrient-side queries that crosses modules (fert + obs).
Returns: 4 rows. Fallow 6014 (n=64) > Oilseeds 5655 (n=287) > Cereals 4042 (n=377) > Legumes 3887 (n=1647). Sample sizes are very unbalanced — read with care.
Run in GraphDB →
View SPARQL
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)
N18 · Nutrient
Which variety achieved the highest average yield at each location?
Highest-yielding variety at each location. Cultivar-selection question, and it exercises a nested subquery — a good template for adapting.
Returns: 10 rows. Surfaces a data bug: 'WB Grainfield' and 'WB-Grainfield' both appear for Manhattan with identical yield.
Run in GraphDB →
View SPARQL
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
Across the Ontologies

These join disease observations to nutrient-side yield and quality measurements in a single query — the federated design working end to end.

D13 · Cross-ontology Featured
How do treated and untreated plots compare on disease, mycotoxin, and yield?
THE flagship. Spans three modules (dis + mgt + obs) to compare treated and untreated plots on severity, mycotoxin, yield and test weight in one table. If you show one query to demonstrate why the federated design matters, show this.
Returns: 2 rows. Treated (n=204): severity 30.4, DON 15.6, yield 74.7, TW 46.1. Untreated (n=20): 53.0 / 27.1 / 56.2 / 38.5. Caveat: 204 vs 20 is unbalanced.
Run in GraphDB →
View SPARQL
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
D18 · Cross-ontology
Does peak disease severity fall as the number of fungicide applications rises?
Peak severity against number of fungicide applications (dis + env + mgt). Cleanest dose-response in the whole set — the kind of monotonic result that makes a figure.
Returns: 4 rows, strictly monotonic: 0 apps 53.0% -> 1 app 34.7% -> 2 apps 17.7% -> 3 apps 7.25%.
Run in GraphDB →
View SPARQL
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
D15 · Cross-ontology
How does disease progress over the season for Fusarium head blight plots?
The only time-series question in the set: severity and incidence per plot per assessment date, tracing an epidemic through the season. Also the only query that reports incidence alongside severity.
Returns: 80 rows across two assessment dates (2024-05-21 and 05-23). Severity and incidence move independently — a plot at 11.5% severity carried 73% incidence.
Run in GraphDB →
View SPARQL
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
D14 · Cross-ontology
For Fusarium head blight plots, DON alongside peak severity, per plot.
Fusarium head blight plots with DON mycotoxin alongside peak severity, per plot. Food-safety relevance beyond agronomy — DON has regulatory limits.
Returns: 80 rows, DON ranging 60.8 down. Plot-level, so it plots directly as a scatter.
Run in GraphDB →
View SPARQL
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)
D20 · Cross-ontology
Does higher disease severity coincide with lower yield, per plot?
Disease severity vs yield per plot (dis + env + obs) — the economic question the whole disease suite exists to answer.
Returns: 221 rows. Deliberately noisy at plot level: severity 95 appears with yield 50, but severity 85 with yield 90.
Run in GraphDB →
View SPARQL
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)
D12 · Cross-ontology
For each variety and target disease, the average recorded disease severity.
Mean recorded severity per variety per disease — field cultivar resistance, as opposed to the declared resistance ratings in the schema.
Returns: Only 3 rows today, and exposes a bug: Wheat_Stripe_Rust has no rdfs:label.
Run in GraphDB →
View SPARQL
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.