Green Bite attempts to calculate sustainability scores for food. Sometimes it even works! 🤷♂️
Part of my masters thesis: Ingredient matching to determine the sustainability of online recipes. (Information Science, UiB: 2022).
Using this formula
(amount_kg * land_usage) + (amount_kg * greenhouse_gas_emissions) = sustainability_score
- The SHARP database. Environmental impacts of 40,000 foods commonly eaten in 40 countries.
- Simple weight tables to convert between volumetric and mass measurements.
- Alot of assumptions and simplifications. Take the results with a shovel of salt. 🧂
- Make sure you have Docker installed and that it is running.
-
✨ Clone repo
git clone git@github.com:arienshibani/green-bite.git
-
🏗️ Navigate into repo and build the image
docker build .
-
🐋 Run container
docker run -p 80:80 green-bite
Open API specification should now be available locally! 👉 http://0.0.0.0/docs
GET http://0.0.0.0/parse/ingredient/1%20kg%20of%20bacon
Response 👇
{
"inputIngredientString": "1 kg of bacon",
"ingredientMatched": "bacon",
"sustainabilityScore": 26.05213129,
"details": {
"quantity": 1,
"measurement": "kg",
"description": "bacon"
}
}