food
python3 /vegan/venues/stages/vegan/__status/main/status.proc.py besties/food_USDA/nature_v2/_status/**/*.py
important
treasure {
}
"nature" is the previous version of "treasure"
limitations
measured ingredient structures
The structure of the measured ingredients
is not given by the API.
Therefore, some assumptions about the
measured ingredients are made.
This is different from the NIH API, where the
structure of the measured ingredients is
given.
utilitity
retrieve and parse a new food "nature":
#
# This retrieves a food's data from USDA.
#
import vegan.besties.food_USDA.deliveries.one as retrieve_1_food
food_USDA = retrieve_1_food.presently (
FDC_ID = 2642759,
API_ellipse = ""
)
#
# This parses USDA foods into the nature format.
#
# This should use the shared:
# vegan.shows.natures
#
import vegan.besties.food_USDA.nature as food_USDA_nature
nature = food_USDA_nature.create (food_USDA ["data"])
structure is is "shows/nature"
unquantified ingredients:
https://www.nltk.org/