openfoodfacts-server icon indicating copy to clipboard operation
openfoodfacts-server copied to clipboard

Rounding question on the average Nutri-Score of white rice (B vs. A)

Open aleene opened this issue 5 years ago • 3 comments

What

  • I looked at the category white rices and saw that the average nutriscore value was -0.71. This is however rounded to Nutri-Score B.
  • I would expect Nutri-Score A, with rounding to -1 or for all negative raw values.

Part of

  • #5517

aleene avatar Jun 03 '19 06:06 aleene

That seems to be correct, according to the specs: https://github.com/openfoodfacts/openfoodfacts-server/blob/25d4175330f9fadbba8bc80ec0afea358a9b4c3d/lib/ProductOpener/Food.pm#L4397-L4421

hangy avatar Jun 04 '19 20:06 hangy

It could be interpreted either way. -0.71 is above -1 (and thus not A) and less than 0 (and thus not B). As it is an average score, I guess we could round the score to the nearest integer. Or keep the current behaviour.

stephanegigandet avatar Jun 05 '19 17:06 stephanegigandet

Is it fixed by the recode ? @stephanegigandet

teolemon avatar Jan 10 '20 14:01 teolemon