With Wolfram Food data and Wolfram Language LLM capabilities, you can compare and visualize the nutritional differences between recipes.
Use RecipeSuggest from the Wolfram Prompt Repository to get the ingredients for a broccoli casserole. In this example, we request a recipe that does not include bell peppers or garlic:
Retrieve the nutrition data for these ingredients with the NutritionReport resource function. The default NutritionReport provides calories, fat, protein and carbohydrates.
Copy the main ingredients for the broccoli casserole into the resource function. Here we include the hyphen in the "AdditionalFluff" list, so that we don't have to remove the recipe's hyphens manually:
Copy the food entities and quantities to further assess the nutritional differences using colorful visualizations:
In[5]:=
casseroleWithDairy=EntityInstance
food
foodtype
:exactly
broccoli
FOODTYPE
addedfoodtypes
:exactlynone
vegetablepart
:
floret
VEGETABLEPART
,
2
c
,EntityInstance
food
foodtype
:exactly
cheddarcheese
FOODTYPE
addedfoodtypes
:exactlynone
processingtype
:
shredded
PROCESSINGTYPE
,
1
c
,EntityInstance
food
foodtypegroup
:
milks
FOODTYPEGROUP
addedfoodtypes
:exactlynone
,
1
c
,EntityInstance
food
foodtype
:exactly
breadcrumb
FOODTYPE
addedfoodtypes
:exactlynone
,
1
2
c
,EntityInstance
food
foodtype
:exactly
butter
FOODTYPE
addedfoodtypes
:exactlynone
,
2
tbsp
;
First, compare the calorie distributions in the dairy and non-dairy versions of the broccoli casserole:
Total the calories for each recipe to compare the overall calories:
The recipes are surprisingly close in total calories despite the significant differences in their ingredients:
Next, compare the grams of fat, protein and carbohydrates for the two recipes:
The dairy ingredients contribute to the slightly higher fat content of the first casserole, while olive oil is the primary fat source in the second casserole. Cheddar cheese is a major source of the higher protein in the first recipe. Carbohydrates are higher in the second casserole due to the use of both rice and breadcrumbs.