cassionData Analysis

Back to the lessonLesson 6 of 8The market is an outcome too

The goat that lost 62% of its value while its price fell 18%

The same deck as the downloads, rendered as a page. Start the slideshow to present it full screen — arrow keys or a click advance one slide, Escape leaves.

Slides · PDFSlides · PowerPoint

  1. Slide 1 / 23

    What this lesson covers

    • A price is a number about a market, not about a household
    • What the wage series alone would have told you
    • What the goat series alone would have told you
    • The three ratios worth computing
    • Two warnings
    • Report the ratio, not just the prices
    • What comes next
    Speaker notes
    A day's casual labour bought 4.82 kg of maize at the 2023 harvest and 2.48 kg at the 2024 lean peak. A goat bought 69.4 kg and then 26.7. Neither the wage series nor the goat series shows that, because it is a ratio.
  2. Slide 2 / 23

    A price is a number about a market, not about a household

    • Terms of trade are that ratio — expressed in the units the household thinks in
    Speaker notes
    Maize at 159 gourdes a kilogram tells you nothing about whether anyone can buy it. That question needs the other side of the transaction: what the household has to sell, or to earn, in order to buy. Terms of trade are that ratio, expressed in the units the household thinks in.
  3. Slide 3 / 23

    A price is a number about a market, not about a household — In Python

    import pandas as pd
    
    prices = pd.read_csv("market-prices-2024.v1.csv")
    clean = prices[(prices["price_htg"] >= 10) &
                   ~((prices["commodity"] == "maize") &
                     (prices["market_id"] == "MK005"))]
    
    series = clean.pivot_table(index="period", columns="commodity",
                               values="price_htg", aggfunc="median")
    
    series["wage_to_maize"] = series["daily-wage-casual-labour"] / series["maize"]
    series["goat_to_maize"] = series["goat"] / series["maize"]
    print(series[["maize", "daily-wage-casual-labour", "goat",
                  "wage_to_maize", "goat_to_maize"]].round(2))
  4. Slide 4 / 23

    A price is a number about a market, not about a household — In R

    library(dplyr)
    
    prices |>
      filter(price_htg >= 10, !(commodity == "maize" & market_id == "MK005")) |>
      summarise(price = median(price_htg), .by = c(period, commodity)) |>
      tidyr::pivot_wider(names_from = commodity, values_from = price) |>
      mutate(wage_to_maize = `daily-wage-casual-labour` / maize,
             goat_to_maize = goat / maize)
  5. Slide 5 / 23

    A price is a number about a market, not about a household

    MonthMaizeWageGoatWage → kg maizeGoat → kg maize
    Dec 202374.9361.35,1954.8269.4
    Jul 2023130.1368.94,3322.8433.3
    Dec 202481.4388.55,9004.7772.5
    Jul 2024159.3395.64,2542.4826.7
  6. Slide 6 / 23

    What the wage series alone would have told you

    • The daily wage rose 10% over two years — from 361 to 396 gourdes
    • A day's work bought 4.82 kg of maize at the 2023 harvest and 2.48 kg at the 2024 lean peak — a 49% fall in purchasing…
    Speaker notes
    The daily wage rose 10% over two years, from 361 to 396 gourdes. Read on its own, that is stability, perhaps mild improvement. A day's work bought 4.82 kg of maize at the 2023 harvest and 2.48 kg at the 2024 lean peak — a 49% fall in purchasing power while the wage went up.
  7. Slide 7 / 23

    What the wage series alone would have told you — In Python

    wage = series["wage_to_maize"]
    print(f"wage rose {series['daily-wage-casual-labour']['2024-07'] / series['daily-wage-casual-labour']['2023-12'] - 1:+.1%}")
    print(f"purchasing power fell {wage['2024-07'] / wage['2023-12'] - 1:+.1%}")
  8. Slide 8 / 23

    What the wage series alone would have told you — In R

    # One number goes up, the other goes down, and they are the same households.
  9. Slide 9 / 23

    What the wage series alone would have told you

    • This is the single most useful ratio in a food security analysis of a labour-dependent population — and it takes two…
    Speaker notes
    This is the single most useful ratio in a food security analysis of a labour-dependent population, and it takes two columns and a division.
  10. Slide 10 / 23

    What the goat series alone would have told you — In Python

    goat = series["goat_to_maize"]
    print(f"goat price change: "
          f"{series['goat']['2024-07'] / series['goat']['2023-12'] - 1:+.1%}")
    print(f"goat terms of trade: {goat['2024-07'] / goat['2023-12'] - 1:+.1%}")
    Speaker notes
    Worse, because the goat price moves the wrong way. Livestock prices fall during the lean season: everyone is selling at once, the animals are in poor condition, and buyers know both. So a pastoral or agro-pastoral household faces rising cereal prices and falling livestock prices at the same moment.
  11. Slide 11 / 23

    What the goat series alone would have told you — In R

    # -18% and -62%. The second is the one the household experiences.
  12. Slide 12 / 23

    What the goat series alone would have told you

    • The goat price fell 18%. The goat's purchasing power fell 62% — A herder who sold one goat for 69 kg of maize in…
    • Neither series shows that — The maize series shows a price rise; the goat series shows a modest price fall; only the…
    Speaker notes
    The goat price fell 18%. The goat's purchasing power fell 62%. A herder who sold one goat for 69 kg of maize in December 2023 needed to sell two and a half goats for the same maize at the 2024 peak — which is exactly the mechanism by which a herd disappears in one bad year. Neither series shows that. The maize series shows a price rise; the goat series shows a modest price fall; only the ratio shows a collapse.
  13. Slide 13 / 23

    The three ratios worth computing

    RatioWhose access it describesRead it against
    Wage to stapleCasual labourers, 26.7% of these householdsKilograms per day worked
    Livestock to stapleLivestock-dependent households, 7.8% hereKilograms per animal
    Cash-crop to stapleFarmers selling one crop and buying another, 29.5% subsistence hereKilograms per kilogram
  14. Slide 14 / 23

    The three ratios worth computing — In Python

    livelihoods = pd.read_csv("food-security-survey-2024.v1.csv")["main_livelihood"]
    print(livelihoods.value_counts(normalize=True).round(3))
  15. Slide 15 / 23

    The three ratios worth computing — In R

    survey |> count(main_livelihood) |> mutate(share = n / sum(n)) |> arrange(-share)
  16. Slide 16 / 23

    The three ratios worth computing

    • Compute the ratio that matches the livelihood you are analysing — A wage-to- cereal figure describes nothing about a…
    Speaker notes
    Compute the ratio that matches the livelihood you are analysing. A wage-to- cereal figure describes nothing about a household living on remittances, and the survey's main_livelihood column is what tells you which ratio belongs to which group and how many people are in it.
  17. Slide 17 / 23

    Two warnings

    • Terms of trade are not a welfare measure — They say how much food a unit of income or of assets buys
    • The denominator has to be the staple people actually eat — Rice is imported here and moves with the exchange rate…
    Speaker notes
    Terms of trade are not a welfare measure. They say how much food a unit of income or of assets buys. They say nothing about how many units the household has, and a household with no goats is unaffected by a goat-to-maize collapse and may be worse off than one that has them. The denominator has to be the staple people actually eat. Rice is imported here and moves with the exchange rate rather than the harvest; maize is local and moves with the season. A terms-of-trade series built on rice would show a much flatter picture and would be describing a different household.
  18. Slide 18 / 23

    Two warnings — In Python

    series["wage_to_rice"] = (series["daily-wage-casual-labour"]
                              / series["rice-imported"])
    print(series[["wage_to_maize", "wage_to_rice"]].loc[
        ["2023-12", "2023-07", "2024-12", "2024-07"]].round(2))
  19. Slide 19 / 23

    Two warnings — In R

    # Two staples, two stories. Say which one the population eats.
  20. Slide 20 / 23

    Report the ratio, not just the prices — Example

    Terms of trade, median across a balanced panel of 10 markets
    
                              Dec 2023   Jul 2024   Change
      Maize, HTG/kg               74.9      159.3    +113%
      Casual wage, HTG/day       361.3      395.6     +10%
      Goat, HTG/head           5,195.1    4,254.4     -18%
    
      Wage buys, kg maize          4.82       2.48     -49%
      Goat buys, kg maize          69.4       26.7     -62%
    
      Terms of trade are computed on maize, the local staple. On imported rice
      the wage ratio falls 29% over the same period rather than 49%. 34.5% of
      surveyed households depend on casual labour or livestock as their main
      livelihood; a further 29.5% on subsistence farming.
  21. Slide 21 / 23

    Report the ratio, not just the prices

    • The last line is what turns a market table into an analysis — The ratio matters in proportion to how many households…
    Speaker notes
    The last line is what turns a market table into an analysis. The ratio matters in proportion to how many households live on that side of it, and that number comes from the household survey rather than from the price file.
  22. Slide 22 / 23

    What comes next

    • You now have four household indicators and two market ratios, from two independent sources, all pointing at the same lean season.
    Speaker notes
    You now have four household indicators and two market ratios, from two independent sources, all pointing at the same lean season. The last unit is what an IPC analysis does with them — and why the answer is a table rather than a formula.
  23. Slide 23 / 23

    Where this goes next

    Read the full lesson, with runnable code Back to the lesson