openfoodfacts / openfoodfacts-server

Open Food Facts database, API server and web interface - šŸŖšŸ¦‹ Perl, CSS and JS coders welcome šŸ˜Š For helping in Python, see Robotoff or taxonomy-editor
http://openfoodfacts.github.io/openfoodfacts-server/
GNU Affero General Public License v3.0
660 stars 389 forks source link

Project Recipes: analyze the distribution of ingredients in a set of products (e.g. vegetables and meat in pizzas) #5696

Open stephanegigandet opened 3 years ago

stephanegigandet commented 3 years ago

Is your feature request related to a problem? Please describe.

We can easily compare nutrition facts for a set of products (with graphs, Nutri-Score etc.) but there is currently no way to compare their ingredients. For instance comparing the % of meat, milk, fruits, vegetables, added sugar etc. for a specific category of products.

The Project Recipes is to add features to do that, for research purposes (e.g. the makers of Agribalyse are very interested to have average recipes for categories of products, so that they can use those recipes to estimate the environmental impact of an average product), but also so that consumers and producers can quickly see how a product compares to others.

The basic features would be to select parent ingredients of interest (e.g. meat, fish, fruits etc.) and a set of products, and get information on the distribution of those parent ingredients for the set of products.

The information could be basic stats (mean, variance etc.) and distribution graphs.

We could also allow to see which products have the less or the more % of specific parent ingredients, and to compare a specific product with the average (like we have today for nutrition facts for products of the same category).

Describe the solution you'd like

The ingredients list is first analyzed with the Ingredients.pm module to identify each ingredient and estimate the percentage of each ingredient.

Then each ingredient is matched against the specified list of parents ingredients. (e.g. if we want the distribution of water, sugar and fruits, "apple" will be mapped to fruits.)

We can first implement the backend computations, make them available through scripts etc. and then build a web interface to integrate those functions with facets, graphs etc.

Describe alternatives you've considered

No response

Additional context

No response

Number of products impacted

No response

Time per product

No response

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 90 days with no activity.