Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow editing of a facet value (Brand, Ingredient, Cities…) to associate it to Wikidata #2011

Open
CloCkWeRX opened this issue Jun 26, 2019 · 3 comments
Labels
facets facets allow you to explore products according to various criterion. Based on MongoDB ✨ Feature Features or enhancements to Open Food Facts server 🥗 Ingredients 🎨 Mockup available A mockup has been created for this feature. Please however interact before implementing. P3 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies WikiData We link taxonomies to Wikidata (& back) - https://wiki.openfoodfacts.org/Structured_Data/Wikidata

Comments

@CloCkWeRX
Copy link
Contributor

CloCkWeRX commented Jun 26, 2019

What

GET https://en.wikipedia.org/w/api.php?action=opensearch&format=json&namespace=0&origin=*&search=Woolworths&suggest=

yields

["Woolworths",["Woolworth","Woolworths Group","Woolworths Supermarkets","Woolworths Holdings Limited","Woolworths Group (Australia)","Woolworths Rewards","Woolworths.co.uk","Woolworths (New Zealand)","Woolworths NZ","Woolworths (Ireland)"],["Woolworth, Woolworth's, or Woolworths may refer to:","Woolworths Group was a listed British company that owned the high-street retail chain Woolworths. It also owned other companies such as the entertainment distributor Entertainment UK, and book and resource distributor Bertram Books.","Woolworths Supermarkets (trading as Woolworths and colloquially known as \"Woolies\") is an Australian supermarket/grocery store chain owned by Woolworths Group.","Woolworths Holdings Limited (JSE: WHL) is a South Africa-based multinational retail company that owns the South African retail chain Woolworths, and Australian retailers David Jones and Country Road Group.","Woolworths Group is a major Australian company with extensive retail interest throughout Australia and New Zealand.","Woolworths Rewards (formerly Everyday Rewards) is a loyalty program owned and operated in Australia by Woolworths Group.","Woolworths.co.uk was an online retail website owned by Shop Direct Group, formed in 2009 after Shop Direct bought the rights to the name and website address of the defunct high street retailer Woolworths.","Woolworths is a former New Zealand supermarket chain and a unit of Woolworths Group in Australia. The chain has been re-branded as Countdown.","Woolworths NZ (formerly Progressive Enterprises) is the second largest grocery company in New Zealand (behind Foodstuffs), with revenue of NZ$6.2 billion for the year to June 2018. Alongside Foodstuffs, Woolworths NZ forms part of the New Zealand supermarket duopoly.","Woolworths (Ireland) was a retail chain that operated on the island of Ireland. Woolworths had operated stores in the Republic of Ireland until 1984, while stores in Northern Ireland became fully part of F. W."],["https://en.wikipedia.org/wiki/Woolworth","https://en.wikipedia.org/wiki/Woolworths_Group","https://en.wikipedia.org/wiki/Woolworths_Supermarkets","https://en.wikipedia.org/wiki/Woolworths_Holdings_Limited","https://en.wikipedia.org/wiki/Woolworths_Group_(Australia)","https://en.wikipedia.org/wiki/Woolworths_Rewards","https://en.wikipedia.org/wiki/Woolworths.co.uk","https://en.wikipedia.org/wiki/Woolworths_(New_Zealand)","https://en.wikipedia.org/wiki/Woolworths_NZ","https://en.wikipedia.org/wiki/Woolworths_(Ireland)"]]

which is then followed by

https://www.wikidata.org/w/api.php?action=wbgetentities&format=json&formatversion=2&languages=en&origin=*&sites=enwiki&titles=Woolworths%20Group%20(Australia)

which returns wikidata ids.

Their implementation is viewable at:
https://github.com/openstreetmap/iD/blob/fceb1a86f78deaa0853d454a5fe27d08e9f54da0/modules/services/wikidata.js
for how exactly they handle the API results; etc.

I'd like to see:

  • Backend modelling for a Brand to wikidata id if it doesn't already exist
  • A basic CRUD UI for a brand, with an autocomplete to lookup wikipedia articles, retrieve the wikidata ID

See also

@CloCkWeRX CloCkWeRX added the ✨ Feature Features or enhancements to Open Food Facts server label Jun 26, 2019
@VaiTon VaiTon added the WikiData We link taxonomies to Wikidata (& back) - https://wiki.openfoodfacts.org/Structured_Data/Wikidata label Jun 26, 2019
@VaiTon VaiTon added the P3 label Nov 10, 2019
@teolemon
Copy link
Member

teolemon commented Mar 8, 2020

Mockup

image

@teolemon teolemon added facets facets allow you to explore products according to various criterion. Based on MongoDB 🥗 Ingredients labels Mar 8, 2020
@teolemon teolemon changed the title Allow editing of a Brand to associate it to wikidata Allow editing of a facet value (Brand, Ingredient…) to associate it to Wikidata Mar 8, 2020
@teolemon teolemon changed the title Allow editing of a facet value (Brand, Ingredient…) to associate it to Wikidata Allow editing of a facet value (Brand, Ingredient, Cities…) to associate it to Wikidata Mar 8, 2020
@teolemon teolemon added the 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies label Jan 5, 2022
@teolemon teolemon added the 🎨 Mockup available A mockup has been created for this feature. Please however interact before implementing. label Mar 14, 2022
@teolemon
Copy link
Member

This will be partly fixed by https://github.com/openfoodfacts/taxonomy-editor

@CloCkWeRX
Copy link
Contributor Author

Neat, another piece of the puzzle with https://github.com/openfoodfacts/facets-knowledge-panels/ exists :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
facets facets allow you to explore products according to various criterion. Based on MongoDB ✨ Feature Features or enhancements to Open Food Facts server 🥗 Ingredients 🎨 Mockup available A mockup has been created for this feature. Please however interact before implementing. P3 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies WikiData We link taxonomies to Wikidata (& back) - https://wiki.openfoodfacts.org/Structured_Data/Wikidata
Projects
Status: To discuss and validate
Development

No branches or pull requests

3 participants