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

Yes, and no. I would like to be able combine Food Entities that are in Wolfram's repository with Food entities that I have to create myself because they are not in their repository. I can't seem to get that to work. Unless I download their entire Food entity list and create a repository from that, which is probably prohibitively expensive resource-wise.

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