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"
}
}