Changes

Jump to navigation Jump to search
9 bytes added ,  15:41, 26 October 2021
Change in hierarchy levels so we can add more sub-levels and have a better division between sections
Line 1: Line 1: −
== Data fields ==
+
A '''data field''' is a structured information that has at least a specific usage. For example, the "product name" field allows us to easily recognize the main name printed on the packaging.
 
  −
A "data field" is a structured information that has at least a specific usage. For example, the "product name" field allows us to easily recognize the main name printed on the packaging.
      
Open Food Facts manages different kinds of data fields:
 
Open Food Facts manages different kinds of data fields:
Line 8: Line 6:  
# fields that are sometimes computed based on other fields, such as the Nutri-Score, the Nova score, etc.
 
# fields that are sometimes computed based on other fields, such as the Nutri-Score, the Nova score, etc.
   −
=== Fields completed by users ===
+
This page deals only with "Fields completed by users". All these fields can entered or modified by hand by the users.
All these fields can entered or modified by hand by the users.
+
''[to be completed]''
[to be completed]
     −
==== Product name ====
+
== Product name ==
 
The product name is the main name printed on the packaging. It can be a registered trademark such as Nutella. This data is important and useful as it's one of the most used data.
 
The product name is the main name printed on the packaging. It can be a registered trademark such as Nutella. This data is important and useful as it's one of the most used data.
   Line 23: Line 20:  
The product name shouldn't include any other information such as the brand of the product, the weight, etc.
 
The product name shouldn't include any other information such as the brand of the product, the weight, etc.
   −
Good examples:
+
In the database, the technical name for this field is <code>product_name</code>.
 +
 
 +
=== Good examples ===
 
* <code>Nesquick</code> ([https://world.openfoodfacts.org/product/3033710065967/nesquik-poudre-cacaotee-boite-nestle link])
 
* <code>Nesquick</code> ([https://world.openfoodfacts.org/product/3033710065967/nesquik-poudre-cacaotee-boite-nestle link])
   −
Bad examples:
+
=== Bad examples ===
 
* <code>Petit déjeuner Nesquick</code> => you don't have to explain, just put the name from the packaging
 
* <code>Petit déjeuner Nesquick</code> => you don't have to explain, just put the name from the packaging
 
* <code>Nutella by Ferrero</code> => you shouldn't fill the brand here, there's a field for that :)
 
* <code>Nutella by Ferrero</code> => you shouldn't fill the brand here, there's a field for that :)
 
* <code>Nesquick®</code> => Don't use symbols ®, ™, © or similar in product name data field or even in other fields.
 
* <code>Nesquick®</code> => Don't use symbols ®, ™, © or similar in product name data field or even in other fields.
   −
In the database, the technical name for this field is <code>product_name</code>.
+
== Common name ==
 
  −
==== Common name ====
   
The common name defines the product. It is the name used when you don't want or can't use the product name. This is the place where you say <code>Cocoa and hazelnuts spreads</code> instead of <code>Nutella</code>. This name is very useful for our AI (artificial intelligence): it helps to guess the category of the product.
 
The common name defines the product. It is the name used when you don't want or can't use the product name. This is the place where you say <code>Cocoa and hazelnuts spreads</code> instead of <code>Nutella</code>. This name is very useful for our AI (artificial intelligence): it helps to guess the category of the product.
   Line 40: Line 37:  
In the database, the technical name for this field is <code>generic_name</code>.
 
In the database, the technical name for this field is <code>generic_name</code>.
   −
==== Quantity ====
+
== Quantity ==
 
This is the quantity of the product, with the corresponding number of portions or unit. The best way to fill it is to enter the value as indicated on the product. Don't forget the units! If we can deduce the quantity in grams it can be used to calculate some things such as the carbon impact.
 
This is the quantity of the product, with the corresponding number of portions or unit. The best way to fill it is to enter the value as indicated on the product. Don't forget the units! If we can deduce the quantity in grams it can be used to calculate some things such as the carbon impact.
   Line 57: Line 54:  
See [https://github.com/openfoodfacts/openfoodfacts-server/issues?q=is%3Aissue+is%3Aopen+quantity+label%3Aquantity issues related to <code>quantity</code>].
 
See [https://github.com/openfoodfacts/openfoodfacts-server/issues?q=is%3Aissue+is%3Aopen+quantity+label%3Aquantity issues related to <code>quantity</code>].
   −
==== Packaging ====
+
== Packaging ==
 
This is the packaging of the product. Multiple values are allowed. There is no taxonomy for this field, so you can enter anything you find relevant including:
 
This is the packaging of the product. Multiple values are allowed. There is no taxonomy for this field, so you can enter anything you find relevant including:
 
* the substance of the packaging: glass, metal, plastic, etc.
 
* the substance of the packaging: glass, metal, plastic, etc.
Line 74: Line 71:  
See [https://github.com/openfoodfacts/openfoodfacts-server/issues?q=is%3Aissue+is%3Aopen+packaging+label%3Apackaging issues related to <code>packaging</code>].
 
See [https://github.com/openfoodfacts/openfoodfacts-server/issues?q=is%3Aissue+is%3Aopen+packaging+label%3Apackaging issues related to <code>packaging</code>].
   −
==== Brands ====
+
== Brands ==
 
This is the brands of the product. The main brand, generally clearly displayed on the front pack, should be entered first. A product can have other brands:
 
This is the brands of the product. The main brand, generally clearly displayed on the front pack, should be entered first. A product can have other brands:
 
* when a product is a brand sold by a big company: <code>Actimel</code> is sold by <code>Danone</code>, see https://world.openfoodfacts.org/product/4009700036810/actimel-granatapfel
 
* when a product is a brand sold by a big company: <code>Actimel</code> is sold by <code>Danone</code>, see https://world.openfoodfacts.org/product/4009700036810/actimel-granatapfel
Line 87: Line 84:  
See: [https://github.com/openfoodfacts/openfoodfacts-server/issues?q=is%3Aissue+is%3Aopen+ingredients+label%3Abrands issues related to <code>brands</code>].
 
See: [https://github.com/openfoodfacts/openfoodfacts-server/issues?q=is%3Aissue+is%3Aopen+ingredients+label%3Abrands issues related to <code>brands</code>].
   −
==== Categories ====
+
== Categories ==
 
[to be completed]
 
[to be completed]
   Line 100: Line 97:  
* [https://github.com/openfoodfacts/openfoodfacts-server/issues?q=is%3Aissue+is%3Aopen+category+label%3Acategories issues related to <code>categories</code>].
 
* [https://github.com/openfoodfacts/openfoodfacts-server/issues?q=is%3Aissue+is%3Aopen+category+label%3Acategories issues related to <code>categories</code>].
   −
==== Labels ====
+
== Labels ==
 
[to be completed]
 
[to be completed]
   Line 113: Line 110:  
* [https://github.com/openfoodfacts/openfoodfacts-server/issues?q=is%3Aissue+is%3Aopen+category+label%3Alabels issues related to <code>labels</code>].
 
* [https://github.com/openfoodfacts/openfoodfacts-server/issues?q=is%3Aissue+is%3Aopen+category+label%3Alabels issues related to <code>labels</code>].
   −
==== Manufacturing or processing places ====
+
== Manufacturing or processing places ==
 
[to be completed]
 
[to be completed]
    
This field lists the places where the product has been manufactured or processed.
 
This field lists the places where the product has been manufactured or processed.
   −
==== EMB code ====
+
== EMB code ==
 
[to be completed]
 
[to be completed]
   Line 130: Line 127:  
We use it to produce the world map of products: https://cestemballepresdechezvous.fr/ (fr) and https://madenear.me/ (en) [down on 2021-08-19].
 
We use it to produce the world map of products: https://cestemballepresdechezvous.fr/ (fr) and https://madenear.me/ (en) [down on 2021-08-19].
   −
==== '''Countries where sold''' ====
+
== Countries where sold ==
 
This field contains all the countries where the product is sold. If the field contains France, the product will be listed on the https://fr.openfoodfacts.org/ website.
 
This field contains all the countries where the product is sold. If the field contains France, the product will be listed on the https://fr.openfoodfacts.org/ website.
   Line 139: Line 136:  
In the database, this field is called <code>countries</code>. This field allows to compute the <code>countries_tags</code> field, the normalized version of countries, which allows to show the name of a country in the desired language, thanks to countries taxonomy. Eg: when <code>Italy</code> is entered from a page in english (say,  world.openfoodfacts.org), <code>countries_tags</code> becomes <code>en:italy</code>.
 
In the database, this field is called <code>countries</code>. This field allows to compute the <code>countries_tags</code> field, the normalized version of countries, which allows to show the name of a country in the desired language, thanks to countries taxonomy. Eg: when <code>Italy</code> is entered from a page in english (say,  world.openfoodfacts.org), <code>countries_tags</code> becomes <code>en:italy</code>.
   −
==== Ingredients ====
+
== Ingredients ==
 
This field lists the [[ingredients]] of the product. This field is '''one of the most important''' as it is used for:
 
This field lists the [[ingredients]] of the product. This field is '''one of the most important''' as it is used for:
 
* Nova calculation
 
* Nova calculation
Line 153: Line 150:     
See [https://github.com/openfoodfacts/openfoodfacts-server/issues?q=is%3Aissue+is%3Aopen+ingredients+label%3Aingredients issues related to <code>ingredients</code>].
 
See [https://github.com/openfoodfacts/openfoodfacts-server/issues?q=is%3Aissue+is%3Aopen+ingredients+label%3Aingredients issues related to <code>ingredients</code>].
==== Substances or products causing allergies or intolerances ====
+
 
 +
== Substances or products causing allergies or intolerances ==
 
The substances are ingredients that are actually in the product, which could cause common allergies. This field can be filled by hand, but is also completed by automatic ingredients analysis.
 
The substances are ingredients that are actually in the product, which could cause common allergies. This field can be filled by hand, but is also completed by automatic ingredients analysis.
   Line 164: Line 162:     
See [https://github.com/openfoodfacts/openfoodfacts-server/issues?q=is%3Aissue+is%3Aopen+traces+label%3Aallergens issues related to <code>allergens_tags</code>].
 
See [https://github.com/openfoodfacts/openfoodfacts-server/issues?q=is%3Aissue+is%3Aopen+traces+label%3Aallergens issues related to <code>allergens_tags</code>].
==== Traces ====
+
== Traces ==
 
The traces are ingredients which are not used for the product itself but lay in the factory or the production process: the product might contains traces of these ingredients. Traces are really important if you are allergic.
 
The traces are ingredients which are not used for the product itself but lay in the factory or the production process: the product might contains traces of these ingredients. Traces are really important if you are allergic.
   Line 177: Line 175:     
See [https://github.com/openfoodfacts/openfoodfacts-server/issues?q=is%3Aissue+is%3Aopen+traces+label%3Atraces issues related to <code>traces</code>].
 
See [https://github.com/openfoodfacts/openfoodfacts-server/issues?q=is%3Aissue+is%3Aopen+traces+label%3Atraces issues related to <code>traces</code>].
==== Best before date (expiration date) ====
+
 
 +
== Best before date (expiration date) ==
 
The expiration date is a way to track product changes over time and to identify the most recent version. It's a data for manual usages. At this moment (2020-03), Open Food Facts apps and website don't make any usage of this field. An issue is open to [https://github.com/openfoodfacts/openfoodfacts-server/issues/76 throw off very old products in averages], it could be useful for it.
 
The expiration date is a way to track product changes over time and to identify the most recent version. It's a data for manual usages. At this moment (2020-03), Open Food Facts apps and website don't make any usage of this field. An issue is open to [https://github.com/openfoodfacts/openfoodfacts-server/issues/76 throw off very old products in averages], it could be useful for it.
   Line 187: Line 186:     
In the database and in Product Opener software, the technical name for this field is <code>expiration_date</code>.
 
In the database and in Product Opener software, the technical name for this field is <code>expiration_date</code>.
==== Serving size ====
+
 
 +
== Serving size ==
 
Serving size has a specific goal: to let Open Food Facts app make a proportional calculation of each nutrient per serving size. If a candy's weight is 5 g, it can be chosen as the serving size: if these candies has 66 g of sugar per 100 g, it has about 3 g per candy. [https://github.com/openfoodfacts/openfoodfacts-server/blob/f25308b7d47255be83210f699f897cba87c9517f/lib/ProductOpener/Food.pm#L3835 Allowed units] are: <code>kg, g, mg, µg, oz, l, dl, cl, ml, fl.oz, fl oz, г, мг, кг, л, дл, кл, мл, 毫克, 公斤, 毫升, 公升, 吨</code>.
 
Serving size has a specific goal: to let Open Food Facts app make a proportional calculation of each nutrient per serving size. If a candy's weight is 5 g, it can be chosen as the serving size: if these candies has 66 g of sugar per 100 g, it has about 3 g per candy. [https://github.com/openfoodfacts/openfoodfacts-server/blob/f25308b7d47255be83210f699f897cba87c9517f/lib/ProductOpener/Food.pm#L3835 Allowed units] are: <code>kg, g, mg, µg, oz, l, dl, cl, ml, fl.oz, fl oz, г, мг, кг, л, дл, кл, мл, 毫克, 公斤, 毫升, 公升, 吨</code>.
   Line 194: Line 194:  
Decimals can be written with a comma (<code>,</code>) or a point (<code>.</code>).
 
Decimals can be written with a comma (<code>,</code>) or a point (<code>.</code>).
   −
Good:
+
In the database and in Product Opener software, the technical name for this field is <code>serving_size</code>. Based on <code>serving_size</code>, Open Food Facts computes a <code>serving_quantity</code> float number for 100g or 100ml. The <code>serving_quantity</code> can be found in the API or the data exports.
 +
 
 +
See [https://github.com/openfoodfacts/openfoodfacts-server/issues?q=is%3Aissue+is%3Aopen+serving+label%3Aportions issues related to <code>serving_size</code>].
 +
 
 +
=== Good examples ===
 
* <code>60 g</code> (preferred, for readability reasons)
 
* <code>60 g</code> (preferred, for readability reasons)
 
* <code>30g</code>
 
* <code>30g</code>
Line 201: Line 205:  
* <code>1L</code>
 
* <code>1L</code>
   −
Possible (while not recommended):
+
=== Possible examples (while not recommended) ===
 
* <code>cookie 25g</code>
 
* <code>cookie 25g</code>
 
* <code>One Slice (50g)</code>
 
* <code>One Slice (50g)</code>
 
* <code>97 g (0.5 cup)</code>
 
* <code>97 g (0.5 cup)</code>
   −
Bad:
+
=== Bad examples ===
 
* <code>30 gr</code> => <code>gr</code> is not a correct unit
 
* <code>30 gr</code> => <code>gr</code> is not a correct unit
 
* <code>9 candies and 2 biscuits</code> => it's not possible to calculate a ratio because we don't know the weight of this portion
 
* <code>9 candies and 2 biscuits</code> => it's not possible to calculate a ratio because we don't know the weight of this portion
 
* <code>30</code> => there is no unit
 
* <code>30</code> => there is no unit
  −
In the database and in Product Opener software, the technical name for this field is <code>serving_size</code>. Based on <code>serving_size</code>, Open Food Facts computes a <code>serving_quantity</code> float number for 100g or 100ml. The <code>serving_quantity</code> can be found in the API or the data exports.
  −
  −
See [https://github.com/openfoodfacts/openfoodfacts-server/issues?q=is%3Aissue+is%3Aopen+serving+label%3Aportions issues related to <code>serving_size</code>].
 
157

edits

Navigation menu