Closed pd-dudkiewicz closed 9 months ago
https://api.data.gov/docs/developer-manual/ api key: 4zjAvTZf1QlLw2AbfaeMP7QOyxXUJcCRiE0XAIv4
Sample GET requests: https://api.nal.usda.gov/fdc/v1/foods/search?api_key=4zjAvTZf1QlLw2AbfaeMP7QOyxXUJcCRiE0XAIv4&query=Bread https://api.nal.usda.gov/fdc/v1/foods/search?api_key=4zjAvTZf1QlLw2AbfaeMP7QOyxXUJcCRiE0XAIv4
https://corgis-edu.github.io/corgis/csv/food/ +ready csv +appears to be calculated per 100g -no calorie count (able to count from fat,carbs,total lipid) -many products are repeated, need to pick one of a kind (as there is 5000 positions every 10th should do the job)
https://tools.myfooddata.com/nutrition-facts-database-spreadsheet.php
+xlsx (I have already converted to JSON) +servings per 100g +calories, fat, carbs, protein given (I rounded fat carbs, protein to integers)
example:
{
"name": "Bread White Wheat",
"kcal": "238",
"carbs ": "44",
"protein": "11",
"fat": "2"
},
{
"name": "Bagels Wheat",
"kcal": "250",
"carbs ": "49",
"protein": "10",
"fat": "2"
},
{
"name": "Cream Puff Eclair Custard Or Cream Filled Iced",
"kcal": "334",
"carbs ": "37",
"protein": "4",
"fat": "19"
},
{
"name": "Tortillas Ready-To-Bake Or -Fry Flour Shelf Stable",
"kcal": "297",
"carbs ": "49",
"protein": "8",
"fat": "8"
},
Let's use https://corgis-edu.github.io/corgis/csv/food/
Script nr 1:
Script nr 2:
JSON with 640 products created successfully.