Surfaced by the #218 adversarial review (workflow wuiofz6p0)
Modern food_expenditures (transformations.food_expenditures_from_acquired) sums Expenditure over the acquisition-source level s — but the canonical builder (build_transforms.food_acquired_to_canonical) sets Expenditure = NaN on produced / in-kind s-rows. Net: food_expenditures is purchased value only, for every country.
Verified (BF): food_expenditures summed over s = purchased-only; produced rows present in food_acquired (Quantity retained) but Expenditure structurally 0/NaN. For GhanaSPS, own-production + in-kind ≈ 30.4% of total food value.
The question (library-wide, NOT #218-specific)
- By design?
food_expenditures = cash outlay, so own-production (imputed value) legitimately excluded. The total-acquisition VALUE is reconstructable: food_quantities × food_prices(units='unitprice').
- Or a gap? Total acquisition value (purchased + imputed own-production + in-kind) is a common analytic need (rural welfare), and forcing every analyst to reconstruct it is error-prone.
Options
- Document
food_expenditures as purchased-only + a recipe / helper for total acquisition value.
- Add a
value= kwarg or a food_value derived table that imputes produced/in-kind value from unit prices.
- Carry Expenditure on produced/in-kind rows where the source reports it (e.g. GhanaSPS).
Needs a design decision before the Phase-3 canonicalizations (#218) bake in one convention. Design: slurm_logs/DESIGN_218_food_legacy_retirement.org (rev-2, 'Separate, library-wide question').
Surfaced by the #218 adversarial review (workflow wuiofz6p0)
Modern
food_expenditures(transformations.food_expenditures_from_acquired) sumsExpenditureover the acquisition-source levels— but the canonical builder (build_transforms.food_acquired_to_canonical) setsExpenditure = NaNon produced / in-kinds-rows. Net:food_expendituresis purchased value only, for every country.Verified (BF):
food_expendituressummed overs= purchased-only; produced rows present infood_acquired(Quantity retained) but Expenditure structurally 0/NaN. For GhanaSPS, own-production + in-kind ≈ 30.4% of total food value.The question (library-wide, NOT #218-specific)
food_expenditures= cash outlay, so own-production (imputed value) legitimately excluded. The total-acquisition VALUE is reconstructable:food_quantities × food_prices(units='unitprice').Options
food_expendituresas purchased-only + a recipe / helper for total acquisition value.value=kwarg or afood_valuederived table that imputes produced/in-kind value from unit prices.Needs a design decision before the Phase-3 canonicalizations (#218) bake in one convention. Design:
slurm_logs/DESIGN_218_food_legacy_retirement.org(rev-2, 'Separate, library-wide question').