Examples
Basic Examples (1)
Get nutrition information about the foods specified in a piece of text:
Scope (3)
Get nutrition information as an ASCII table, with columns delimited by pipe characters ("|"):
Get nutrition information as a nested List:
Use TableForm to display this output with foods varying horizontally and nutrition properties varying vertically:
Get nutrition information as a nested Association:
Options (6)
DelimiterCharacter (1)
Use "DelimiterCharacter" to specify how to split up foods in a string:
NutritionProperties (2)
Specify the desired nutrition properties using the "NutritionProperties" option:
Lists of valid "Food" properties can be obtained using EntityValue:
Finding a particular property of interest can be simplified by querying particular EntityClass expressions:
RemoveAfterComma (2)
Use "RemoveAfterComma"→False if there is important information to be retained after commas:
The default setting "RemoveAfterComma"→True ignores the preparation of the chicken in this example, and thus returns different results:
AdditionalFluff (1)
There are some words that are filtered out of food strings by default as they do not impact nutrition. Use "AdditionalFluff" if there are additional strings that can be removed to improve interpretation (note that "fluff" strings are case-sensitive):
Possible Issues (2)
More specific foods can be difficult to find data for:
Use simple strings with only necessary information to get better results:
Use options and specific input formats to help NutritionReport understand what information is essential:
Note that some "Food" properties are non-quantitative in nature. Using these in NutritionReport can cause errors:
A large subset of strictly quantitative nutritional properties can be obtained as follows:
Publisher
Isabel Skidmore
Version History
-
1.1.0
– 20 October 2025
-
1.0.0
– 14 April 2023
Related Resources
Author Notes
Other output formats that show nice reports, pie charts, etc. can be added with time.
There is also endless tweaking to the string cleaning process that can be done; I have included common strings that I find to be irrelevant to nutrition but there could always be more. The more specific the default behavior is the less versatile, so I like to keep it flexible for users by using an option.