User:YULdigitalpreservation/nutritionInfo

Let's get more nutrition information in Wikidata edit

SPARQL Queries edit

Items with USDA NDB id edit

The following query uses these:

  • Properties: USDA NDB number (P1978)     
    SELECT ?item ?itemLabel ?value
    WHERE 
    {
      ?item wdt:P1978 ?value .
      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    }
    

Items with a OpenFoodFacts ingredient id edit

The following query uses these:

Items with a CIQUAL2017 id edit

The following query uses these:

  • Properties: CIQUAL2017 ID (P4696)     
    SELECT ?item ?itemLabel ?value
    WHERE 
    {
      ?item wdt:P4696 ?value .
      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    }
    

Databases about food/nutrition and their license info edit

The following query uses these:

  • Properties: instance of (P31)     , main subject (P921)     , copyright license (P275)     
    SELECT ?item ?itemLabel ?subjectLabel ?licenseLabel
    WHERE 
    {
      ?item wdt:P31 wd:Q8513.
      ?item wdt:P921 ?subject.
      VALUES ?subject {wd:Q2095 wd:Q79529 wd:Q1531970 wd:Q2138622}
      OPTIONAL {?item wdt:P275 ?license}.
      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    }
    

Things listed subclass of vegetable edit

The following query uses these:

  • Properties: subclass of (P279)     
    SELECT ?item ?itemLabel 
    WHERE 
    {
      ?item wdt:P279 wd:Q11004.
      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    }
    

Scholarly articles with 'food composition' as a main subject edit

The following query uses these:

  • Properties: instance of (P31)     , main subject (P921)     
    SELECT ?item ?itemLabel 
    WHERE 
    {
      ?item wdt:P31 wd:Q18918145.
      ?item wdt:P921 wd:Q5465452.
      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    }
    

ShEx Schemas edit

Properties edit

External Databases edit