openfoodfacts / openfoodfacts-server

Open Food Facts database, API server and web interface - 🐪🦋 Perl, CSS and JS coders welcome 😊 For helping in Python, see Robotoff or taxonomy-editor
GNU Affero General Public License v3.0
633 stars 371 forks source link

Data quality error: category and computed Nutri-Score is not coherent #8353

Open CharlesNepote opened 1 year ago

CharlesNepote commented 1 year ago

The Nutri-Score of some categories is predictable. Eg:

If an extra-virgin olive oils is not Nutri-Score C, then:

In both cases, it's an error, there can't be false positives. It should lead to a data-quality-error, and not just a warning.

It probably represent thousands of products. For example, as of today (2023-04), 677 olive oils have a Nutri-Score different from C.

To let it scale, I would be in favor to add this data in the taxonomy. Eg. (look at the last line):

<en:Virgin olive oils
en:Extra-virgin olive oils, Extra virgin olive oil
bg:Зехтин екстра върджин
de:Native Olivenöle Extra, Natives Olivenöl Extra
fr:Huiles d'olive vierges extra, Huile d'olive vierge extra
agribalyse_food_code:en:17270
ciqual_food_code:en:17270
ciqual_food_name:en:Olive oil, extra virgin
ciqual_food_name:fr:Huile d'olive vierge extra
expected_nutriscore:en:c
expected_ingredients_text:en:Olive oil

Part of

benbenben2 commented 1 year ago

@CharlesNepote, is it done?

CharlesNepote commented 1 year ago

I guess this is not done yet. I have just modified this olive oil, but it's still Nutri-Score D and without data quality error: https://world.openfoodfacts.org/product/001682/minotaur-bio-huile-d-olive-vierge-extra Maybe @stephanegigandet has to launch taxonomy deployment or some task I don't know of.

benbenben2 commented 1 year ago

DQ errors are there now @CharlesNepote

CharlesNepote commented 1 year ago

Yes. For the record:

Also added to: https://wiki.openfoodfacts.org/List_of_data_quality_errors_(generated)

Before closing I'm going to open another issue to gather more products with only one ingredient, and/or product categories which should have only one Nutri-Score.

github-actions[bot] commented 9 months ago

This issue has been open 90 days with no activity. Can you give it a little love by linking it to a parent issue, adding relevant labels and projets, creating a mockup if applicable, adding code pointers from https://github.com/openfoodfacts/openfoodfacts-server/blob/main/.github/labeler.yml, giving it a priority, editing the original issue to have a more comprehensive description… Thank you very much for your contribution to 🍊 Open Food Facts

benbenben2 commented 4 months ago

@CharlesNepote, is there anything else to do with this issue?

CharlesNepote commented 1 week ago

Stats for 2024-09-02:

In most case this is due to olive oil which should always contain only "olive oil" but which often countain "olive oil manually blah blah blah".

Should en:ingredients-single-ingredient-from-category-does-not-match-actual-ingredients be an error or a warning?