Skip to content

food_expenditures is purchased-value-only library-wide — decide: by design, or add total-acquisition-value? #575

Description

@ligon

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

  1. Document food_expenditures as purchased-only + a recipe / helper for total acquisition value.
  2. Add a value= kwarg or a food_value derived table that imputes produced/in-kind value from unit prices.
  3. 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').

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions