Pipeline

From a purchase order to an impact estimate

Every procurement file goes through the same three stages. The Notebook handles the transitions between them automatically, writing an intermediate file at each step so you can inspect, if necessary correct, and re-run without starting over.

STAGE 1

Identify ingredients and their weights

Each product line, e.g., "SOUP, CHICKEN NOODLE RTU LOW SODIUM," 21.8 lbs — is broken into its likely constituent ingredients (water, chicken broth, cooked chicken, noodles, vegetables), each with an estimated share of the product's total weight.

Reads: your procurement .csvitem_weights.json  →  Writes: ingredients_{file}.csv

STAGE 2

Sort each ingredient into a shared category

Every ingredient is assigned to one of about 125 categories — beef, dairy cheese, tilapia (farmed), wheat/rye, unidentified meat, and so on. The code first checks foodcategories.json which pairs ingredients with categories; if an ingredient isn't already listed there, it asks the AI model for a category and records the new pairing for you to review later for possible inclusion in the foodcategories.json file.

Reads: ingredients_{file}.csvfoodcategories.json  →  Writes: categories_{file}.csv

STAGE 3

Apply conversion factors to calculate impact

The total weight in each category is multiplied against a table of per-pound (or per-kilogram) factors — calories, CO₂e, carbon opportunity cost, direct and indirect animal lives, water withdrawals, land use, and eutrophication — to produce the final totals.

Reads: categories_{file}.csvfactors.csv  →  Writes: impacts_lbs_{file}.csvimpacts_metric_{file}.csv


Worked example

One row, followed all the way through

Consider one row of a 1780 row procurement file that lists 21.8 pounds of "SOUP, CHICKEN NOODLE RTU LOW SODIUM." Stage 1 may resolve it like this:

Row 1624 · ingredient breakdown
IngredientCategoryShareWeight
waterwater50%10.90 lbs
chicken brothliquids20%4.36 lbs
cooked chicken meatchicken10%2.18 lbs
noodlesgrains10%2.18 lbs
carrotsvegetables5%1.09 lbs
celeryvegetables4%0.87 lbs
onionsvegetables1%0.22 lbs

Once all the multi-ingredient items in the file have gone through the same process, Stage 3 sums each category's weight across the entire procurement file and reports totals like these (an excerpt):

Impacts_lbs output · excerpt
CategoryWeightCO₂eTotal animal lives
chicken148,246 lbs652,282 lbs44,689 lives
beef41,449 lbs1,713,781 lbs51.3 lives
butter9,796 lbs109,170 lbs1.0 life
apples6,799 lbs2,434 lbs0 lives

Robustness check

It holds up across languages

As an experiment, the project's authors translated all 1,500+ products in a US Foods procurement file into French, Spanish, and German, then ran the unaltered Notebook against the translated list. Total impact figures differed by less than 2% per category compared to the English run.

Ready to run it on your own file?

The Get started page covers both the local Notebook route and the hosted web tool, plus how to reshape a vendor spreadsheet into a format the code recognizes.

Get started