Group Abstract Group Abstract

Message Boards Message Boards

1
|
2.8K Views
|
3 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Create a custom food entity?

Posted 3 years ago

Is there any way I can create a custom "FoodType" item for my own purposes (when I can't find a particular food entity in Wolfram's repository)? Example below of an energy drink with EntityProperties; how can I make this into a FoodType item? I'm looking to do nutrition tracking combining food entities that Wolfram does know about with ones that I'll need to add on my own because Wolfram does not know about them.

gfuelfazeberry = <|
  EntityProperty["Food", "TotalCaloriesContentPerServing"] -> 
   Quantity[0, "DietaryCalories"],
  EntityProperty["Food", "TotalFatContentPerServing"] -> 
   Quantity[0, "Grams"],
  EntityProperty["Food", "SodiumContentPerServing"] -> 
   Quantity[65, "Milligrams"],
  EntityProperty["Food", "TotalCarbohydratesContentPerServing"] -> 
   Quantity[0, "Grams"],
  EntityProperty["Food", "TotalSugarContentPerServing"] -> 
   Quantity[0, "Grams"],
  EntityProperty["Food", "TotalProteinContentPerServing"] -> 
   Quantity[0, "Grams"],
  EntityProperty["Food", "PotassiumContentPerServing"] -> 
   Quantity[210, "Milligrams"],
  EntityProperty["Food", "NiacinContentPerServing"] -> 
   Quantity[4.0, "Milligrams"],
  EntityProperty["Food", "VitaminB12ContentPerServing"] -> 
   Quantity[0.6, "Micrograms"],
  EntityProperty["Food", "VitaminCContentPerServing"] -> 
   Quantity[45, "Milligrams"],
  EntityProperty["Food", "VitaminB6ContentPerServing"] -> 
   Quantity[0.4, "Milligrams"],
  EntityProperty["Food", "SodiumDailyValuePercent"] -> 
   Quantity[3, "Percent"],
  EntityProperty["Food", "PotassiumDailyValuePercent"] -> 
   Quantity[4, "Percent"],
  EntityProperty["Food", "NiacinDailyValuePercent"] -> 
   Quantity[25, "Percent"],
  EntityProperty["Food", "VitaminB12DailyValuePercent"] -> 
   Quantity[25, "Percent"],
  EntityProperty["Food", "VitaminCDailyValuePercent"] -> 
   Quantity[50, "Percent"],
  EntityProperty["Food", "VitaminB6DailyValuePercent"] -> 
   Quantity[25, "Percent"] ,
  EntityProperty["Food", "CaffeineContentPerServing"] -> 
   Quantity[300, "Milligrams"],
  EntityProperty["Food", "DefaultServingSizeVolume"] -> 
   Quantity[16, "FluidOunces"],
  EntityProperty["FoodType", Entity["FoodType", "EnergyDrink"]],
  EntityProperty["Food", "UniversalProductCodes"] -> "850011881019",
  EntityProperty["Food", "BrandName"] -> "GFUEL",
  EntityProperty["Food", "Flavor"] -> "Fazeberry"
  |>
POSTED BY: Steven Buehler
3 Replies
Posted 2 years ago

Crossposted here.

POSTED BY: Rohit Namjoshi
Posted 3 years ago
POSTED BY: Steven Buehler
Posted 3 years ago
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard