Difference between revisions of "Products quantities"

From Open Food Facts wiki
Jump to navigation Jump to search
Line 2: Line 2:
 
=== Logic to handle it ===
 
=== Logic to handle it ===
 
=== Existing libraries to parse weights and quantities ===
 
=== Existing libraries to parse weights and quantities ===
 +
* https://github.com/iancanderson/ingreedy
 +
 
=== Possible calculations ===
 
=== Possible calculations ===
 
* Weight per item
 
* Weight per item

Revision as of 16:00, 9 April 2015

How to handle it

Logic to handle it

Existing libraries to parse weights and quantities

Possible calculations

  • Weight per item
    • Is the same item always the same weight (ham slices)
    • Useful if you eat one of the cakes in the packaging, and want to know how many calories you ate without having to weight the cake
  • Percentage of water
    • Useful to calculate actual cost if we know the price
    • Useful to fix calorie calculation for some products
  • Calculate packaging weight by making the difference between actual weight and advertised weight
  • Calculate weight per volume for products (1dL of water is 1kg, but this changes for various products that also have a mention of their volume)
  • Some products will have multilingual weights
    • we can check that the conversion is well done if we have both values
    • we can display the value in several metrics if we have a sanitized value in one metric

Countries

France

Product name Quantity as stated by user Product page URL
Brassé nature 1 kg (8 pots) - [2 x (4 x 125 g)] (link)
Emmental Coeur de Meule (28 % MG) 275 g [250 g + 25 g (10 %) gratuit] (link)
Basilico 2 * 400 g (800 g) (link)
Frais Malo Sucré 4X100g (link)
Twix 2*25g (link)
16 mini-nems Poulet, menthe, Légumes, coriandre - Précuits - Surgelés 200 g [160 g (2 x 8 pièces) mini-nems + 40 g sauce nuoc mâm] (link)
9 barres au chocolat au lait et aux céréales 211,5 g (9x23,5g) (link)
Fondant au chocolat 220g (2 unités, 2 x (60 g + 50 g)) (link)
Kinder Bueno 2 x 21.5 g = 43 g (link)
Prince Goût Chocolat 300 g (15 biscuits de 20 g) (link)
Eau minérale Contrex 1 Litre (link)
Brioche Harrys Tranchée la recette Originale 18tranche (link)
FERRERO ROCHER Boîte de 30 375 g, 30 pièces (link)
Kiri® (32 % MG) à la crème de lait 240 g (12 Portions) (link)
Bouchées de Poulet à la provençale 400 g (12 à 18 bouchées) (link)
Thon entier au naturel Poids net 190 g, poids net égoutté 140 g (link)
Haricots beurre très fins contenance : 4250ml, poids net total : 4000g, poids net égoutté : 2210g (link)
Lentilles (Lot de 3 boîtes) 3 x [200 g (130 g net égoutté), 212 ml] (link)
Délices du Potager - Mini poireaux 330 g (dont 180 g net), 370 mL (link)
Chewing Gum Hollywood 28 g - 20 dragées (link)
Fruit d'Or pro-activ® (35% MG) Tartine 260 g - Unilever 260 g (26 portions de 10 g) (link)
Galettes, tout au beurre 130 g pour 20 galettes (link)
Ketchup P'tits Heinz 280 ml - 310 g (link)
Original Earl Grey 25 sachets (link)
Cappellettis Tofu, Epinards Bio - 220 g - Céréal Bio 220 g (1 personne) (link)
KUB ® Or 128 g (16 bâtonnets de 2 cubes) (link)
Oeufs de poules Elevées en Plein Air (x 12) calibre Moyen - Carrefour 12 (calibre Moyen => 53 à 63 g) (link)
Belvita sablé lait 8 sachets de 4 (link)
Escargots de Bourgogne Extra Gros - 400 g - E 400 g, 425 ml (3 douzaines) (link)
nestle 228g (4x57g) / 48 cl (4x12cl) (link)