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, freshwater withdrawals, 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 — purchases by weight, from any vendor — and it identifies ingredients, sorts them into food categories, and applies a transparent set of broadly accepted conversion factors to produce two output files: one in U.S. units, one in metric.

Two ways to run it: a Jupyter Notebook you run yourself with your own OpenAI key (more capable, handles the full range of spreadsheet formats), or a hosted web tool for a quicker, lighter-weight pass. 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 every food category 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

Irrigation, drinking, pond, and processing water withdrawn, in gallons or liters.

08

Land use

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

09

Eutrophication

Phosphate-equivalent runoff contributing to waterway nutrient pollution.

10

By category

Every figure is broken out across 100+ food categories, from beef to bivalves to barley.

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 pipeline in your browser — a quicker way to try it, though it's less capable than running the Notebook locally.

Open the web tool