Skip to content

GhanaLSS Phase 3: community_prices feature + inverse price->quantity imputation (split from #109) #562

Description

@ligon

Summary

Split from #109 (GhanaLSS). The food-harmonization core of #109 is complete — food_acquired is canonical (t,i,j,u,s) and registered, and food_prices/food_quantities/food_expenditures derive at runtime. This issue tracks the Phase 3 remainder from the signed-off design (slurm_logs/DESIGN_ghanalss_food_acquired_2026-06-15.org): a new feature plus a quantity-imputation layer with open modeling questions — genuinely new framework code, deliberately separated so it didn't block closing #109.

Scope

3a. community_prices feature

Every GLSS wave fielded a dedicated market/community price survey — extract it to a community_prices feature (t, geo, j, u) -> Price:

  • 1987-88 / 1988-89: PRICE.DAT
  • 1991-92: Data/Prices/G3PRICE.DTA
  • 1998-99 / 2005-06: wave price questionnaires
  • 2016-17: g7price.dta

A worthwhile feature in its own right (and the textbook Deaton unit-value input). The value-only early waves are self-sufficient (no cross-wave price borrowing).

3b. Inverse price→quantity imputation

For waves that record expenditure but not quantity, fill Quantity = Expenditure / price using the WB/Deaton hierarchical median-price ladder (transformations.median_price_valuation, inverse), in native units (kg conversion stays a separate downstream concern). Raw food_acquired stays honest (Quantity NaN where unrecorded); the fill goes in the derived food_quantities path.

Open questions (carried from the design thread — decide before implementing)

  1. Do the fill in the derived food_quantities path (raw food_acquired stays honest), not baked into the parquet?
  2. Add an imputed-vs-reported provenance marker?
  3. Land community_prices as its own feature first, then wire the imputation onto it?
  4. Any GhanaLSS replication/baseline to parity against, or is canonical-shape + sanity the only check?

Refs

#109 (parent), slurm_logs/DESIGN_ghanalss_food_acquired_2026-06-15.org (Phases 3a/3b + decisions D2/D4).

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