sgria (sistema de gestão das redes de informação alimentar) · • include waste banana, raw...

73
FoodCASE training Practical part 2: Work with compiler client 1

Upload: others

Post on 25-Sep-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

FoodCASE trainingPractical part 2: Work with compiler client

1

Page 2: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Creating source food and value

2

Page 3: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Three levels of food composition

AppleProtein 0.3 g/100gProtein 200 mg/50g

AppleProtein 0.35 g/100gFat 0.3 g/100g…Energy 231.9 kJ/100 g

Initial Data Aggregated Data Recipe Data

Apple PieProtein 2.68 g/100 gFat 4.86 g/100 g…Energy 560 kJ/100 g

Aggregation wizardRecipe wizard

3

Page 4: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Create a new single food

4

Page 5: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Document food & Save

5

Page 6: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Create a new single component

6

Page 7: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

7

Document value & Save

Page 8: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

8

Page 9: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Add all values to food

9

Page 10: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Create a reference

Page 11: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Document reference

Page 12: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

12

Attach to source value

Page 13: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Data Quality Framework

• Data input validation

• Differentiate– Hard constraints (red)

– Soft constraints (orange)

– Indicators (orange)

Page 14: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Data Aggregation

14

Page 15: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Three levels of food composition

AppleProtein 0.3 g/100gProtein 200 mg/50g

AppleProtein 0.35 g/100gFat 0.3 g/100g…Energy 231.9 kJ/100 g

Initial Data Aggregated Data Recipe Data

Apple PieProtein 2.68 g/100 gFat 4.86 g/100 g…Energy 560 kJ/100 g

Aggregation wizardRecipe wizard

15

Page 16: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Select food and values for aggregation

16

Page 17: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Start aggregation process

17

Page 18: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Definition of aggregation

18

Page 19: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Food Data Aggregation

• Use single source values with weighting

AppleProtein 0.3 g/100gProtein 200 mg/50g

AppleProtein 0.35 g/100g…

Page 20: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Define target matrix unit / Specify weights / Add or remove values / Select

calculation method 20

Page 21: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Food Data Aggregation

• Use single source values with weighting

• Borrow values from other foods

AppleProtein 0.3 g/100gProtein 200 mg/50g

PearProtein 0.4 g/100gFat 0.3 g/100g

AppleProtein 0.35 g/100gFat 0.3 g/100g…

Page 22: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Borrow values

22

AppleProtein 0.3 g/100g

AppleProtein 0.35 g/100gFat 0.3 g/100g…

PearProtein 0.4 g/100gFat 0.3 g/100g

Borrow

Source Level Aggregated Level

PearProtein 0.4 g/100gFat 0.3 g/100g

Borrow

Page 23: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Food Data Aggregation

• Use single source values with weighting

• Borrow values from other foods

• Calculate values by formula

AppleProtein 0.35 g/100gFat 0.3 g/100g…Energy 231.9 kJ/100 g

ENERCJ[kJ] = 17*PROT[g] + 17*CHO[g] + 37*FAT[g] + 29*ALC[g] + 13*OA[g] + 10*POLYL[g]

Page 24: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Food Data Aggregation

AppleProtein 0.35 g/100gFat 0.3 g/100g…Energy 231.9 kJ/100 g

Interpret formula calculate formula

Page 25: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Food Data Aggregation

• Use single source values with weighting

• Borrow values from other foods

• Calculate values by formula

• Calculate fatty acid values by formula

Page 26: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Search for suitable FACF and document it

26

Page 27: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Food Data Aggregation

• Use single source values with weighting

• Borrow values from other foods

• Calculate values by formula

• Calculate fatty acid values by formula

• Use component patterns

Page 28: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Food Data Aggregation

• Use single source values with weighting

• Borrow values from other foods

• Calculate values by formula

• Calculate fatty acid values by formula

• Use component patterns

• Generated values

Component Required

Protein yes

Calcium yes

Vitamin C yes

Create Vit C valueBecause its required

Component Value

Protein 5 g

Calcium 8 mg

Vitamin C 0 mg

Source valueProtein 5 g

Borrowed valueCalcium 8 mg

Page 29: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Food Data Aggregation

• Use single source values with weighting

• Borrow values from other foods

• Calculate values by formula

• Calculate fatty acid values by formula

• Use component patterns

• Generated values

• Absolute values

Comp1 50gComp2 30gComp3 20g

Food X Food X

Comp1 is fixedto 20g

Rest is scaled by 80/50

Comp1 20gComp2 48gComp3 32g

There are values that are not directly analytical values but define contentfor certain nutrients. E.g. values from legislation: dried fruits have maximal 10% water.

Page 30: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Food Data Aggregation

• Use single source values with weighting

• Borrow values from other foods

• Calculate values by formula

• Calculate fatty acid values by formula

• Use component patterns

• Generated values

• Absolute values

• Include waste

Banana, raw without waste -> banana, raw with waste

1/3 of weight is waste

Comp x 70g -> 46.7gComp y 20g -> 13.3gComp z 10g -> 6.6g

Matrix unit = per 100g total food [T]

Page 31: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

31

Select patterns

Page 32: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

32

Define components that always must be present in aggregted

food

See which gets generated

Page 33: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

33

Define fixed values

Page 34: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

34

Banana, raw without waste -> banana, raw with waste

1/3 of weight is waste

Comp x 70g -> 46.7gComp y 20g -> 13.3gComp z 10g -> 6.6g

Matrix unit = per 100g total food [T]

Define food waste

Page 35: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Coming soon

Apple PieVitamin A 0 ug/100g

Apple PieProtein 2.68 g/100 gFat 4.86 g/100 g…Energy 560 kJ/100 g

Aggregated Data Recipe Data

AppleProtein 0.35 g/100 gFat 0.3 g/100 g…Energy 231.9 kJ/100 g

Source Data

Page 36: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Change to aggregated levelSearch & Open food to document

36

Page 37: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Document aggregated food

37

Page 38: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Now, it’s time for exercising

38

Page 39: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Exercises

• 2a – 2j

• 2i and 2j, also use patterns, generated values, and fixed values

• 2k and 2l if you have time

39

Page 40: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Recipe calculation

40

Page 41: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Three levels of food composition

AppleProtein 0.3 g/100gProtein 200 mg/50g

AppleProtein 0.35 g/100gFat 0.3 g/100g…Energy 231.9 kJ/100 g

Initial Data Aggregated Data Recipe Data

Apple PieProtein 2.68 g/100 gFat 4.86 g/100 g…Energy 560 kJ/100 g

Aggregation wizardRecipe wizard

41

Page 42: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Recipe calculation

Create recipe

42

Page 43: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Recipe calculation

AppleProtein 0.3 g/100gProtein 200 mg/50g

AppleProtein 0.35 g/100gFat 0.3 g/100g…Energy 231.9 kJ/100 g

Initial Data Aggregated Data Recipe Data

Apple PieProtein 2.68 g/100 gFat 4.86 g/100 g…Energy 560 kJ/100 g

Aggregation wizardRecipe wizard

Ingredients can only beaggregated foods becauseeach component exists only once.

Page 44: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g
Page 45: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

45

Select ingredients and move it to the Clipboard

Page 46: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Define recipe

46

Page 47: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Recipe calculation

• Define ingredients, amounts and prep methods

• Calculate fat uptake

• Calculate salt uptake

• Source values

• Borrowed values

• Fixed values

• Component patterns

• Calculate values by formula

• Missing values

Page 48: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Define recipe

48

Page 49: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Recipe calculation

• Define ingredients, amounts and prep methods

• Calculate fat uptake

• Calculate salt uptake

• Source values

• Borrowed values

• Fixed values

• Component patterns

• Calculate values by formula

• Missing values

Page 50: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Recipe calculation

• Define ingredients, amounts and prep methods

• Calculate fat uptake

• Calculate salt uptake

• Source values

• Borrowed values

• Fixed values

• Component patterns

• Calculate values by formula

• Missing values

Page 51: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Recipe calculation

• Define ingredients, amounts and prep methods

• Calculate fat uptake

• Calculate salt uptake

• Source values

• Borrowed values

• Fixed values

• Component patterns

• Calculate values by formula

• Missing values

Page 52: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Recipe calculation

• Define ingredients, amounts and prep methods

• Calculate fat uptake

• Calculate salt uptake

• Source values

• Borrowed values

• Fixed values

• Component patterns

• Calculate values by formula

• Missing values

Page 53: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Recipe calculation

• Define ingredients, amounts and prep methods

• Calculate fat uptake

• Calculate salt uptake

• Source values

• Borrowed values

• Fixed values

• Component patterns

• Calculate values by formula

• Missing values

There are values that are not directly analytical values but define contentfor certain nutrients. E.g. values from legislation: dried fruits have maximal 10% water.

Comp1 50gComp2 30gComp3 20g

Food X Food X

Comp1 is fixedto 20g

Rest is scaled by 80/50

Comp1 20gComp2 48gComp3 32g

Page 54: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Recipe calculation

• Define ingredients, amounts and prep methods

• Calculate fat uptake

• Calculate salt uptake

• Source values

• Borrowed values

• Fixed values

• Component patterns

• Calculate values by formula

• Missing values

Page 55: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Recipe calculation

• Define ingredients, amounts and prep methods

• Calculate fat uptake

• Calculate salt uptake

• Source values

• Borrowed values

• Fixed values

• Component patterns

• Calculate values by formula

• Missing values

AppleProtein 0.35 g/100gFat 0.3 g/100g…Energy 231.9 kJ/100 g

ENERCJ[kJ] = 17*PROT[g] + 17*CHO[g] + 37*FAT[g] + 29*ALC[g] + 13*OA[g] + 10*POLYL[g]

Page 56: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Recipe calculation

• Define ingredients, amounts and prep methods

• Calculate fat uptake

• Calculate salt uptake

• Source values

• Borrowed values

• Fixed values

• Component patterns

• Calculate values by formula

• Missing values

Define what happens when one or more ingredientsdo not have a certain nutrient.

Page 57: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Missing values

57

Produce with an empty value – the component value for this recipe will be set to null

Page 58: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Document recipe

58

Page 59: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Now it’s time for cooking

59

Page 60: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Exercises

• 2m, also use component patterns, absolute values and missing values.

• 2n

60

Page 61: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Recomputation

Page 62: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Recomputation

Apple, fresh

Dough

Wheat Salt Water …

Apple pie … …

Protein

update

update

update

update

update update

Page 63: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g
Page 64: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Batch operations in FoodCASE

64

Page 65: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Select foods for batch process

65

Page 66: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Start batch process

66

Page 67: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Make changes and save & close

67

Page 68: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Batch process on single level

68

Page 69: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Batch process on aggregated level

69

Page 70: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

No batch process on recipe level-> go to aggregated level

70

Page 71: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

No clipboard on reference level

71

Page 72: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Time for exercising

72

Page 73: SGRIA (Sistema de Gestão das Redes de Informação Alimentar) · • Include waste Banana, raw without waste -> banana, raw with waste 1/3 of weight is waste Comp x 70g -> 46.7g

Exercises

• 2o-2q

73