Tags Properties

From Open Food Facts wiki
Jump to navigation Jump to search

Introduction

The goal of the project Tags Properties is to define, gather and structure content and data related to product tags (e.g. labels, categories, ingredients, brands, packaging, additives, packager codes etc.) and make it available on OFF (web site + apps) and 3rd party apps.

For instance, for labels, we might want to provide a logo, a description, a list of positive and negative points, and external pointers (eg Wikipedia, official sites) etc.

The tags properties will in particular be used for the Project Smoothie app and to supplement the Eco-Score environmental impact. Later they can also be used for the knowledge panels project and to support many other projects.

Project plan

Preliminary research, use cases etc. - 2019 to June 2020

Knowledge panel design doc (the original idea behind this project)

Pilot phase - July + August 2020

We will use the Project Smoothie app and the OFF web site as the vehicles for the pilot phase, and focus on a first set of a dozen of tags that are of special interest for the Eco-Score.

Goals:

  • Research the different types of properties we could support for different types of tags (e.g. labels, categories, packaging etc.)
  • Experiment how to display some of those properties on the OFF web site and app
  • Define how the API should expose the tags properties

Deliverables:

  • Prioritized list of the top 20 most important tags for the Eco-Score
    • e.g. meats category, organic label, palm oil ingredient analysis, glass packaging etc.
  • Actual properties values for the most important tags
  • Decision on how to display the properties
  • Definition of the API request and response format that supports the use cases for the 20 examples
    • e.g. are the properties ordered (bullet points), typed (this bullet point is about this), is it a text, do we have other types (numbers, coordinates etc.)
    • how much work / decisions do we want the server or the clients to make etc.
  • Server side API implementation for the 20 examples (can be hardcoded)
  • Client side API implementation in Smoothie (and possibly the OFF web site)

Consolidation phase - September - October 2020

Goals:

  • Create a flexible framework to extend tags properties to any number of tags
  • Support internationalization (translations and possibly country specific properties)

Deliverables:

  • Define the source and source format for the tags properties
    • e.g. taxonomies, .po files
  • Server side API implementation to use the chosen source (and removal of hardcoded values used in pilot phase)

Industrialization phase - Starts in November 2020

Goals:

  • Populate properties for as many tags as possible

Deliverables:

  • Defined properties for tags
  • Possibly scripts that harvest external sources to populate the chosen internal sources

Tasks

Most of the tasks are dependent on the prior tasks and must be done in order.

1. Prioritized list of the top 20 most important tags for the Eco-Score

  1. Organic label (which one?)
  2. ...

Labels tags

  1. en:organic
  2. fr:ab-agriculture-biologique
  3. en:eu-organic
  4. en:eu-agriculture / en:non-eu-agriculture / en:eu-non-eu-agriculture
  5. fr:Haute Valeur Environnementale
  6. fr:Label Rouge
  7. fr:Bleu Blanc Cœur
  8. fr:RSPO
  9. fr:Rain Forest Alliance
  10. fr:Fairtrade, fr:Max Havelaar
  11. fr:MSC
  12. fr:ASC


Ingredient analysis tags

Palm oil status

en:Palm oil content unknown
en:Palm oil free	
en:Palm oil	
en:May contain palm oil

Fish species

46 species with preservation status per location to add

en:ray
areas_to_avoid:en: en: Northeast Atlantic, en: Mediterranean

Meats and eggs

We can have an explainer for major meat/egg categories.

en:Beef
en:Veal
en:Lamb
en:Pork
en:Chicken
en:Turkey
en:Duck
en:Eggs

Packager codes

specific functions needs to be coded:

  1. to transform Packager Codes and EMB values into country of transformation value
  2. to transform MSC/FSC/ASC values into country of production values (paper/fish)
  3. to display coordinates and maps for those

Some specific categories

Categories like exotic fruits, coffee… require additional explanations as to why they have a specific Eco-Score, with the main impact drivers.

Non-tagged values

Packaging

Needs taxonomization (explanation might be required for some values eg:glass, but specific subsystem also needs to be coded)

Sample values
Plastic lid to be recycled, PVC, Plastic
Tasks
  1. We need to go back to recycling instruction to assess Fully/Partly/Not recyclable
  2. We can add explanations on individual values
  3. We need to add an overall explanation system (on the Fully/Partly/Not recyclable status)

Origins

  1. Needs country taxonomization (no explanation required for values)
  2. Needs areas of world taxonomization
  3. Needs FAO zone taxonomization (for fishes, see higher)

2. Sample values for each type of tag

For a subset of tag types (e.g. categories, labels, ingredients analysis, packaging), define values for 1 example.

Generic types of values

Types of values that can be on multiple types of tags (e.g. categories, labels, ingredients)

  • logo
  • short description (e.g. to be displayed next to a logo)
  • longer description
  • positive attributes
  • negative attributes / warnings
  • recommendation(s): suggestions to users when they scan a product
    • e.g. for ingredient palm-oil, suggest to prefer products without palm oil or with RSPO certified palm oil

Meat category ?


Different paragraphs if alone and combined with labels ?

    • Can you provide one set of example values for both cases?
    • We can think about having tags combinations properties, but obviously it does complexify things quite a bit

Organic label

fr:ab-agriculture-biologique

# At least 95% organic ingredients
explanation_short_organic_ingredients:en: fr:+ de 95% d'ingrédients biologiques, en:At least 95% organic ingredients
explanation_organic_ingredients:fr: fr:Composé d'au moins 95 % d'ingrédients issus d'un mode de production biologique
explanation_icon_organic_ingredients:en:organic
explanation_order:1
# No GMOs
explanation_short_no_gmos:fr: fr:Absence d'OGM (traces <0,9% éventuellement possibles)
explanation_fr_no_gmos:fr: fr:Absence d'OGM (possibilité de traces fortuites, accidentelles ou inévitables, dans la limite de 0,9 %)
explanation_icon_no_gmos:en:no_gmo
explanation_order:2
# Independant certification
explanation_short_certification:fr: fr:Certifié par un organisme indépendant
explanation_certification:fr: fr:Certifié par un organisme agréé par les pouvoirs publics français et répondant aux critères d'indépendance, d'impartialité, de compétence et d'efficacité définis par la norme européenne EN 45011
explanation_icon_certification:en:certification_mark
explanation_order:3
#French law
explanation_short_french_regulations:fr: fr:Respect de la réglementation française
explanation_french_regulations:fr: fr:Respect de la réglementation en vigueur en France
explanation_icon_french_regulations:en:marianne
explanation_order:4


Palm oil ingredient analysis ?


Glass bottle packaging ?

  • indication that it should be recycled
  • 1 bullet point about the weight / high energy cost to manufacture glass?
  • 1 bullet point about the high recyclability of glass
  • Packaging is not as simple as that. It works for glass and some other values, but that's about it. We need to tackle plastic, which is the hardest part. We need to also give general instructions (washing the packaging before throwing). We need to point upstream solutions (eg: buy in bulk) -- Pierre
    • The goal here is to have a few sample values to experiment, you can include one more complex example too. -- Stéphane

3. Actual properties values for the most important tags

4. Decision on how to display the properties

There are in fact 2 questions:

How do we want to display the properties

  • Are properties ordered (e.g. for bullet points)
  • Are properties typed (this bullet point is about that)
  • Are properties classified as positive or negative
  • Different levels
    • e.g. just a logo that can be clicked to reveal more details etc. or logo + tagline and then more details
  • ...

Mockups

Where do we decide on how the properties are displayed

Smart server

The server decides what to present and how to present it, and just push presentation content to the client.

e.g. the server can just send back an ordered list of bullet points, possibly with an indication of an icon

Pros:

  • No code changes / deployment needed on the app when we decide to add new types of properties etc.

Cons:

  • The app cannot make decisions to highlight specific properties (e.g. for personalization)

Smart client

The server pass very rich and structured data to the client, and the client is responsible for deciding what to present and how to present it. >> We've tried it for V2.

Hybrid between smart client and smart server

False dichotomy, we'll probably do a bit of both. The server could send back already processed data (eg ordered list with icons), and final steps could be done by the client, by having very carefully crafted and generic client code.

5. Definition of the API request and response format that supports the use cases for the 20 examples

6. Server side API implementation for the 20 examples

We can hardcode the values or make something smarted, the important thing is to return values for the 20 examples through the API.

7. Client side API implementation in Smoothie

8. Client side API implementation on the OFF web site

9. Client side API implementation on the Android and iOS apps

10. Client side API implementation on 3rd party apps