From a purchase order to an impact estimate
Every procurement file goes through the same three stages, followed by a report on the shares of purchases. 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.
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 (chicken broth, chicken, noodles, vegetables), each with an estimated share of the product's total weight. Where a line gives a count or case rather than a weight, the weight is estimated. Each product is also judged plant-based or not (made mostly from plants or fungi with no animal-derived ingredient, at any level of processing).
Reads: your procurement .csv or .xlsxitem_weights.json → Writes: ingredients_{file}.csv
Sort each ingredient into a shared category
Every ingredient is assigned to one of more than 120 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.
Canned and cooked beans, rice and pasta are then split into their dry equivalent and water, because the conversion factors for those categories are per kilogram as bought dry. Broth and stock are split the same way: only a small share counts as meat, seafood or vegetables, the rest as water. In soup bases, the meat and stock count as at most a quarter of the base.
Reads: ingredients_{file}.csvfoodcategories.json → Writes: categories_{file}.csv
Apply conversion factors to calculate impact
The total weight in each category is multiplied against a table of per-kilogram factors — calories, CO₂e, carbon opportunity cost, direct and total animal lives, blue and green water consumption, land use, and eutrophication — to produce the final totals, in metric and U.S. units. For fish, beef and pork the edible share of the cut (bone-in, whole fish, fillet) is taken into account.
Reads: categories_{file}.csvfactors.csv → Writes: impacts_lbs_{file}.csvimpacts_metric_{file}.csv
Report the shares of purchases
Shares of total weight and calories: plant-based (with and without cooking oils), animal-derived, and, where the worksheet marks them, certified, local or plant-based products. Also the impacts per 1,000 kcal purchased, and lists of products worth a second look.
Reads: categories_{file}.csvimpacts files → Writes: shares_report_{file}.txtshares_{file}.csvproduct_shares_{file}.csv
One row, followed all the way through
Consider one row of a 1,777-row procurement file that lists 21.8 pounds of "SOUP, CHICKEN NOODLE RTU LOW SODIUM." Stages 1 and 2 may resolve it like this:
| Ingredient | Category | Share | Weight |
|---|---|---|---|
| chicken broth (chicken equivalent) | chicken | 2.2% | 0.48 lbs |
| water (in chicken broth) | water | 70.5% | 15.38 lbs |
| chicken | chicken | 8.1% | 1.76 lbs |
| noodles (dry equivalent) | wheat/rye | 7.8% | 1.69 lbs |
| water (in noodles) | water | 6.4% | 1.39 lbs |
| carrots | other vegetables | 3.0% | 0.66 lbs |
Two rules adjust for how the food was bought. The chicken broth (72.7% of the soup) is nearly all water, so 3% of it is counted as chicken. The cooked noodles (14.1% of the soup) count 55% of their weight as dry pasta. In both cases the rest is counted as water.
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):
| Category | Weight | CO₂e | Total animal lives |
|---|---|---|---|
| chicken | 135,490 lbs | 596,156 lbs | 54,566 lives |
| beef | 39,982 lbs | 1,653,110 lbs | 71.5 lives |
| butter | 6,749 lbs | 75,212 lbs | 0.6 lives |
| apples | 8,394 lbs | 3,005 lbs | 0 lives |
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. Most vendor reports can be used as they come.