Structured Data/Wikidata
This project aims at improving Wikidata with Open Food Facts Data, with the aim of eventually reusing the data, and linking the Open Food Facts data with Wikidata, and thus with many other services.
See also: https://www.wikidata.org/wiki/Wikidata:WikiProject_Food
Companies
- Marking companies as "instance of" companies
- Adding their "parent companies" (You can use http://www.businessinsider.com/10-companies-that-control-what-we-buy-2014-7?utm_content=buffer30561&utm_medium=social&utm_source=facebook.com&utm_campaign=buffer)
- Adding the Wikidata item number (QXXXXXX) on the Open Food Facts taxonomy
Brands
- Marking brands as "instance of" brands
- Adding the Wikidata item number (QXXXXXX) on the Open Food Facts taxonomy
Categories
- Marking categories as "subclass of" their parent category
- Adding the Wikidata item number (QXXXXXX) on the Open Food Facts taxonomy
Labels
- Adding the Wikidata item number (QXXXXXX) on the Open Food Facts taxonomy
- https://www.wikidata.org/wiki/Wikidata:Property_proposal/Open_Food_Facts_label
Additives
- Marking additives as "instance of" food additives, or better yet, in the sub category
- Adding the Wikidata item number (QXXXXXX) on the Open Food Facts taxonomy
- https://query.wikidata.org/embed.html#%23Cats%0ASELECT%20%3Fitem%20%3FitemLabel%20WHERE%20%7B%0A%20%20%3Fitem%20wdt%3AP2093%20%22Cosmetic%20Ingredient%20Review%20Expert%20Panel%22.%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%7D
Ingredients
Diets
Diets on Wikidata: https://tools.wmflabs.org/wikidata-todo/tree.html?q=474191&rp=279,31
Stores
- https://bmericskay.github.io/portfolio/Disgressions.html
- https://twitter.com/BorisMericskay/status/1315213965333495808?s=09
Getting information into Wikidata
- Mix and Match for food and eating catalogs: https://mix-n-match.toolforge.org/#/group/ig_wikidata_property_related_to_food_and_eating
- https://www.wikidata.org/wiki/Wikidata:WikiProject_Spain/Alimentos_de_Espa%C3%B1a
- https://www.wikidata.org/wiki/Wikidata:Property_proposal/GLN
- Discussions about country/place adjectives
- https://openfoodfacts.slack.com/archives/C081BENER/p1587568951002800
- https://tools.wmflabs.org/lexeme-forms/
- https://www.wikidata.org/wiki/Wikidata:Wikidata_Lexeme_Forms
- Exemple d'utilisation avec https://tools.wmflabs.org/lexeme-forms/template/french-adjective/
- See SPARQL queries for current data
- https://www.wikidata.org/wiki/Wikidata:Property_proposal/GS1_GPC_brick_code
- https://www.wikidata.org/wiki/Wikidata:Property_proposal/note
- https://www.wikidata.org/wiki/Wikidata:Property_proposal/Common_procurement_vocabulary#Discussion
- add images to food on Wikidata: https://tools.wmflabs.org/fist/wdfist/?sparql=SELECT%20?item%20WHERE%20{%20?item%20wdt:P31%20wd:Q5%20.%20?item%20wdt:P27%20wd:Q889%20}#top
Getting information from Wikidata
- food categories : http://tools.wmflabs.org/wikidata-todo/tree.html?q=40050&rp=279
- beverage categories: http://tools.wmflabs.org/wikidata-todo/tree.html?q=2095&rp=279
- food additives : http://tools.wmflabs.org/wikidata-todo/tree.html?q=189567&rp=279
- brands : http://tools.wmflabs.org/wikidata-todo/tree.html?q=167270&rp=31
- dishes: http://tools.wmflabs.org/wikidata-todo/tree.html?q=746549&rp=279
- https://www.wikidata.org/w/index.php?search=&search=%22as+used+in+cosmetics%22&title=Special:Search&go=Go&ns0=1&ns1=1&ns4=1&ns120=1
Food properties
- barcode property: https://www.wikidata.org/wiki/Property:P3962
- PLU Code property: https://www.wikidata.org/wiki/Property:P4030
- INAO: https://www.wikidata.org/wiki/Property:P3895
- https://www.wikidata.org/wiki/Wikidata:Property_proposal/AGROVOC_ID
- https://www.wikidata.org/wiki/Wikidata:Property_proposal/Forest_Stewardship_Council_Certificate_Code
- https://www.wikidata.org/wiki/Wikidata:Property_proposal/Forest_Stewardship_Council_License_Code
Tools
Getting a wikidata taxonomy in JSON
npm install -g wikidata-taxonomy wdtaxonomy -d -i -f json 2095
https://www.npmjs.com/package/wikidata-taxonomy
SPARQL
For SPARQL queries: https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries#Understanding_SPARQL -
- All cheses made with cow milk: https://query.wikidata.org/#%23Cheeses%0ASELECT%20%3Fitem%20%3FitemLabel%0AWHERE%0A%7B%0A%09%3Fitem%20wdt%3AP279%20wd%3AQ3088299%20.%0A%09SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22%20%7D%0A%7D
- EFSA opinions: https://query.wikidata.org/#SELECT%20%3Fitem%20%28SUBSTR%28%3Fpublished1%2C%201%2C%2010%29%20as%20%3Fpublished%20%29%3Fvolume%20%3Fissue%20%3Fpages%20%3Fdoi%20%3Ftitle%20WHERE%20%7B%20%20%0A%20%20%3Fitem%20wdt%3AP1433%20wd%3AQ45098548%20.%0A%20%20OPTIONAL%20%7B%3Fitem%20wdt%3AP577%20%3Fpublished1%7D%20.%0A%20%20OPTIONAL%20%7B%3Fitem%20wdt%3AP478%20%3Fvolume%7D%20.%0A%20%20OPTIONAL%20%7B%3Fitem%20wdt%3AP433%20%3Fissue%7D%20.%0A%20%20OPTIONAL%20%7B%3Fitem%20wdt%3AP304%20%3Fpages0%7D%20.%20%0A%20%20OPTIONAL%20%7B%3Fitem%20wdt%3AP356%20%3Fdoi%7D%20.%0A%20%20OPTIONAL%20%7B%3Fitem%20wdt%3AP1476%20%3Ftitle%7D%20.%20%0A%20%20BIND%28REPLACE%28%3Fpages0%2C%20%22-%22%2C%20%22%E2%80%93%22%29%20AS%20%3Fpages%29%0A%20%20BIND%28if%28contains%28%3Fpages%2C%20%20%22%E2%80%93%22%29%2C%20strbefore%28%3Fpages%2C%20%22%E2%80%93%22%29%2C%20%3Fpages%29%20as%20%3Fstartpage%29%0A%20%20BIND%28if%28contains%28%3Fpages%2C%20%20%22%E2%80%93%22%29%2C%20strafter%28%3Fpages%2C%20%22%E2%80%93%22%29%2C%20%3Fpages%29%20as%20%3Fendpage%29%0A%7D%0AORDER%20BY%20ASC%28%3Fpublished%29%20ASC%28xsd%3Ainteger%28%3Fissue%29%29%20ASC%28xsd%3Ainteger%28%3Fstartpage%29%29
- Country adjectives (for the ingredients parser): https://query.wikidata.org/embed.html#%23Noms%20des%20pays%20d%E2%80%99Afrique%20dans%20leurs%20langues%20officielles%20ainsi%20qu%E2%80%99en%20anglais%0ASELECT%20DISTINCT%20%3Fitem%20%3FitemLabel_ol%20%3Fadjectives%20%3FitemLabel_en%20WHERE%20%7B%0A%20%20%3Fitem%20wdt%3AP31%20wd%3AQ6256%20%3B%0A%20%20%20%20%20%20%20%20wdt%3AP1549%20%3Fadjectives.%0A%7D%0AORDER%20BY%20%3Fitem%20%3FitemLabel_lol%20%3Fadjectives
Models on the French Wikipedia
Presentation during the Wikidata Reuse Days
- Presentation slides: https://docs.google.com/presentation/d/1_WRGmyM7N6bsP4UPmdu1zeNC71By3RHEZNYs6wOCPfI/edit?usp=sharing
- https://diff.wikimedia.org/event/%e2%99%bb%ef%b8%8f-open-food-facts-and-wikidata-structured-food-for-thought/
Open Beauty Facts
https://wiki.openfoodfacts.org/OBF:Wikidata