Food production is one of the biggest contributors to greenhouse gas emission, as well as having diverse effects on our environment, from habitat destruction due to conquering virgin lands for agriculture or the pollution of land, water and air by chemicals. However, not all foods are equal: distinct food types are associated with wildly varying environmental foot prints. For example, producing a kg of beef causes more than 2.5 times as much CO2 emission than the same weight of tofu. Although the environmental costs of certain food groups, such as meat, are well-known, not many of us are aware of the comparison of other groups. As a vegetarian suffering from cheese addiction, I was surprised to find out that the environmental cost of cheese is nearly twice as much that of chicken meat!

What it does

Our aim while developing Kukiko was to raise awareness of the differences in the environmental costs of various food groups and facilitate eco-friendly choices when choosing a recipe to cook. Kukiko is a Chrome browser extension that scrapes pages displaying a recipe and calculates the cost of each ingredient. It then marks those with the highest negative impact on our environment and attempts to give polite suggestion for a better, friendlier alternative.

How we built it

We built the extension in "vanilla" Javascript. To provide the dataset on the environmental costs of different ingredients, we also created a MySql application server in Python, running in a Docker container. Unfortunately we did not have the time to integrate the extension with the database server, but given the tiny size of our database, we could use a static, predefined json table in the extension.

Challenges we ran into

We were a small group of two and neither of us had any experience in Web Development or in Javascript, so learning time was our biggest enemy. We found Javascript not the most comfortable of languages, and the multi-layered nature of a Chrome extension did not make debugging easy. We were also surprised to find out how difficult it is to integrate various javascript tools with Chrome Extensions (e.g. node.js or mysql) and how messy the source code of websites can be (making the scraping more challenging).

Accomplishments that we're proud of

In these 40 hours, we got from zero to a working Chrome Extension; and one that we would be happy to use.

What we learned

On the data side, it was interesting to see how different the environmental footprints of a given food type can be depending on the source you consult. For example, the CO2 emission values we found for almond milk, made from the water-intensive almonds, were anywhere between a third of that for cow milk to nearly as much as the original animal product; and then we didn't even look at other metrics like biodiversity loss. Making an informed choice really isn't easy, no matter how hard one tries!

On the technical side, Chrome Extensions are easy to start up, but complicated to use for more involved purposes. In order to have a fully functional application with database access and user information, one has to know about multiple frameworks, application servers and how these all are integrated together.

What's next for Kukiko

We had a lot of ideas that we did not manage to implement in the time-frame of the Hackathon. Here are a few key ones:

  • Improve the current, primitive scraping function. (e.g. to avoid our greedy name matching algorithm interpreting butter beans as butter; being perfectly happy with nearly half a kilo of butter in a vegetable soup)
  • Suggest similar, alternative recipes that have a smaller ecological footprint
  • Display similar information for items on a restaurant menu by text recognition and then scraping the web for fitting recipes for the detected dish
  • Gamify the experience by introducing a user database and keeping track of eco-credits; making environmentally friendly choices shareable on social media platforms and including interactive visualisations about the sources of environmental effects (e.g. transport, pollution, water needs)
Share this project: