Institutional food procurement · open source

Swiftly calculate impacts of food purchases

This project offers dining services, sustainability offices, and procurement teams a method for translating a list of food purchases — a few rows or a few thousand — into estimates of greenhouse gas emissions, animal lives, water consumption, land use, and eutrophication. Such calculations can be helpful in attempts to achieve sustainability goals, but have tended to be slow, laborious, imprecise and/or expensive.

PROCUREMENT FILE 21.8 lbs · soup, chicken noodle CO₂e Water Land Animal lives

One procurement line, translated into four of the ten measures the pipeline reports.

The goal

A free and open source automated option

Institutions already track what they spend on food. And there is desire to estimate and reduce adverse impacts, such as GHG emissions. Systems like WRI's Cool Food Pledge and UNH's SIMAP help institutions measure these impacts, but building the ingredient-level detail behind a vendor spreadsheet has usually required manual work that many procurement offices don't have time for.

A major obstacle has been properly estimating the relative contributing weight of each element in multi-ingredient products such as pizza, chicken noodle soup, or lasagna. With careful guidance that is a task that well-prompted AI can accomplish well… not perfectly, but better in minutes for hundreds of products than most of us might do while allocating hours to the task…

This project automates that step. Point our code to a procurement file — a vendor's purchasing report as it comes, from any vendor — and it identifies ingredients, sorts them into food categories, and applies a transparent set of broadly accepted conversion factors. It reports the impacts by category, in U.S. and metric units, along with a short report on the shares of purchases by weight and by calories, such as the share that is plant-based.

Two ways to run it: a Jupyter Notebook you run yourself with your own OpenAI key, which lets you review and correct each stage, or a hosted web tool: upload a spreadsheet and the results arrive by email. Details on Get started.

What gets measured

Ten figures, per food category, from one procurement file.

The output file impacts_lbs_<yourfile>.csv (and its metric counterpart) reports the following for each of the more than 120 food categories, from beef to bivalves to barley, found in your purchases:

01

Total weight

Pounds (or kilograms) purchased in the category.

02

Calories

Total kcal represented by that weight of food.

03

CO₂ equivalent

Greenhouse gas emissions from producing the food, in lbs or kg CO₂e.

04

Carbon opportunity cost

Emissions foregone by not letting the land used revert to its natural, carbon-sequestering state.

05

Direct animal lives

Animals slaughtered directly to produce the purchased weight.

06

Total animal lives

Direct lives plus indirect ones — feed animals, and siblings lost before harvest.

07

Blue water

Surface and ground water consumed, e.g., by irrigation (mainly from Kim et al. 2020).

08

Green water

Rainwater taken up by crops, including the crops fed to farmed animals and fish.

09

Land use

Square feet or square meters of land used to produce that amount of food.

10

Eutrophication

Phosphate-equivalent runoff contributing to waterway nutrient pollution.


Shares of purchases

What share is plant-based, animal-derived, certified?

Alongside the impacts, each run writes a short report, shares_report_<yourfile>.txt, with matching tables. It gives the share of purchases by weight and by calories that is plant-based (with and without cooking oils) and animal-derived, and the impacts per 1,000 kcal purchased. Where a worksheet marks products as certified, local or plant-based, those shares are reported too.

Canned and cooked beans, rice and pasta are counted as their dry equivalent plus water, and broth as a small share of meat or vegetables plus water, so the impacts and calories of a can of beans or soup are not overstated. Stock, made mostly from bones, is counted cautiously, in soup bases too.

Experimental versions for reporting frameworks. We have experimental versions that aim to additionally facilitate measurements consistent with the full Anchors in Action and AASHE/STARS frameworks. Please contact stephen.ronan@wfa.org to request access to those versions. We would welcome your testing of those.
Find your way around

Where to go next

01

How it works

The three-stage pipeline — ingredient extraction, categorization, and impact calculation — and what each stage reads and writes.

Read the walkthrough →
02

Get started

Run the Notebook yourself, prep your spreadsheet's format, or use the hosted web tool for a lighter-weight pass.

Start the setup →
03

Data & methods

Where every conversion factor comes from, and how animal-lives and emissions figures are derived.

See the sources →
04

Downloads

Every file you need — Notebook, sample data, factor tables, documentation — in one place.

Get the files →

Don't have Jupyter set up?

The hosted web tool runs the same Notebook for you: upload a spreadsheet and the results arrive by email. Uploads are deleted within a day. Running the Notebook yourself adds the chance to review and correct each stage.

Open the web tool →