User:YULdigitalpreservation/nutritionInfo

Let's get more nutrition information in WikidataEdit

SPARQL QueriesEdit

Items with USDA NDB idEdit

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 idEdit

The following query uses these:

Items with a CIQUAL2017 idEdit

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 infoEdit

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 vegetableEdit

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 subjectEdit

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 SchemasEdit

PropertiesEdit

External DatabasesEdit