Skip to content

Latest commit

 

History

History
231 lines (168 loc) · 8.87 KB

nutritional_adequacy.org

File metadata and controls

231 lines (168 loc) · 8.87 KB

Preface

import cfe
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt

r = cfe.result.from_dataset('Indian ICRISAT_small.ds',engine='netcdf4')
UseNutrients=['Protein','Calories','Iron']

# Reference period, market
t,m = 75,1

# Reference budget (find mean in reference period & market):
reference_x = r.get_predicted_expenditures().mean('j').sum('i').sel(t=t,m=m)

p = r.prices.sel(t=t,m=m,drop=True)
p = p.to_dataframe('i').squeeze().dropna()
p

Nutritional requirements

Individuals have nutritional requirements established by nutrition scientists. Here are some standards established by the Indian National Institute of Nutrition:

Nutritional Needs of individuals

Recommended Daily Allowances: India

Sex-AgeCaloriesProteinFatCalciumIronBetacaroteneThiamineRiboflavinNiacinAscorbic Acid
C 0-0.5500.2.325
C 0.5-11950052800.3.425
C 1-3106016.72760093200.5.6840
C 4-6135020.125600133200.7.81140
C 7-9169029.530600164800.81.1340
B 10-12219039.9358002148001.11.31540
G 10-12201040.4358002748001.1.21340
B 13-15275054.3458003248001.41.61640
G 13-15233051.9408002748001.21.41440
B 16-17302061.5508002848001.51.81740
G 16-17244055.5358002648001.1.21440
M273060306001748001.41.41840
W2230552512002148001.11.31440

Recommended Daily Allowances: Tanzania

Sex-AgeCaloriesProteinVitamin AVitamin B6Vitamin B12Vitamin CVitamin DVitamin ECalciumIronMagnesiumZinc
C 0-268013.053958330.350.72528.7553850437.54.32551.253.775
C 2-590013.84000000.551.0530550005505.05684.45
C 6-9126019.5818754000000.91.6533.75565006756.875945.4
C 10-14165031.47124000001.352.4338.5584008409.221286.65
C 15-17202042.1264000001.67341.6759670966.6710.867153.337.6
Men280045.83446000001.52.445510000115092607
Women229045.83445000001.42.445550001150202204.9

Nutritional Needs of Households

Our data on demand and nutrients is at the household level; we can’t directly compare household level nutrition with individual level requirements. What we can do is add up minimum individual requirements, and see whether household total exceed these. This isn’t a guarantee that all individuals have adequate nutrition (since the way food is allocated in the household might be quite unequal, or unrelated to individual requirements), but it is necessary if all individuals are to have adequate nutrition.

For the average household in the ICRISAT villages, the number of different kinds of people can be computed by averaging over households:

# In first round, averaged over households and villages

zbar = r.z.sel(t=r.firstround,drop=True).mean(['j','m'])[:-1].squeeze() # Leave out log HSize

zbar = zbar.to_dataframe().squeeze()

Now, the inner/dot/matrix product between zbar and the rda DataFrame of requirements will give us minimum requirements for the average household:

rda = pd.read_pickle('indian_rda.df').T

# May need to tweak types or alignment to match RDA and zbar types:
rda0,zbar0=rda.align(zbar,axis=1)

# This matrix product gives minimum nutrient requirements for average
# household in 1975
hh_rda = rda0.replace('',0)@zbar0

# RDA is /daily/, but  demands in ICRISAT data are /annual/:
hh_rda = hh_rda*365

Nutritional Adequacy of Food Demands

Food Conversion Table

As usual, we need data to convert foods to nutrients:

from eep153_tools.sheets import read_sheets

DataURL = 'https://docs.google.com/spreadsheets/d/13Ig5hZif-NSHtgkKRp_cEgKXk0lOsdUB2BAD6O_FnRo'
key = DataURL.split('/')[-1]

fct = read_sheets(key,sheet='FCT').set_index('i')

Prices

def my_prices(p0,p=p,i='Coconut'):
    p = p.copy()
    p.loc[i] = p0
    return p

Nutrient Demand

We can also use our demand functions to compute nutrition as a function of prices and budget.

def nutrient_demand(x,p):
    with warnings.catch_warnings():
        warnings.simplefilter("ignore")
        c = r.demands(x,p)

    fct0,c0 = fct.align(c,axis=0,join='inner')
    N = fct0.T@c0

    N = N.loc[~N.index.duplicated()]
    
    return N

With this nutrient_demand function in hand, we can see how nutrient outcomes vary with budget, given prices:

import numpy as np
import matplotlib.pyplot as plt

X = np.linspace(reference_x/5,reference_x*5,50)

UseNutrients = ['Protein','Calories','Iron','Calcium']

df = pd.concat({myx:np.log(nutrient_demand(myx,p))[UseNutrients] for myx in X},axis=1).T
ax = df.plot()

ax.set_xlabel('log budget')
ax.set_ylabel('log nutrient')

Now how does nutrition vary with prices?

USE_GOOD = 'Jowar/Sorghum'

ref_price = r.prices.sel(i=USE_GOOD,t=t,m=m,drop=True)

P = np.linspace(1,5,20).tolist()

ndf = pd.DataFrame({p0:np.log(nutrient_demand(reference_x,my_prices(p0,i=USE_GOOD)))[UseNutrients] for p0 in P}).T

ax = ndf.plot()

ax.set_xlabel('log price')
ax.set_ylabel('log nutrient')

Nutritional Adequacy

Since we can trace out demands for nutrients as a function of $(x,p)$, and we’ve computed minimum nutritional requirements for the average household, we can normalize nutritional intake to check the adequacy of diet.

def nutrient_adequacy_ratio(x,p):
    return nutrient_demand(x,p)/hh_rda

In terms of normalized nutrients, any household with more than one unit of any given nutrient (or zero in logs) will be consuming a minimally adequate level of the nutrient; below this level there’s clearly nutritional inadequacy. For this reason the ratio of actual nutrients to required nutrients is termed the “nutrient adequacy ratio,” or NAR.

X = np.linspace(reference_x/5,reference_x*5,50)

ndf = pd.concat({x:np.log(nutrient_adequacy_ratio(x,p))[UseNutrients] for x in X},axis=1).T

ax = ndf.plot()

ax.set_xlabel('log budget')
ax.set_ylabel('log nutrient adequacy ratio')
ax.axhline(0)

As before, we can also vary relative prices. Here we trace out nutritional adequacy varying the price of a single good:

poorer_x = reference_x/2

Pscale = np.linspace(1,3,20).tolist()

log_nar = {s0:np.log(nutrient_adequacy_ratio(poorer_x,my_prices(s0,p,i=USE_GOOD)))[UseNutrients] for s0 in Pscale}

log_nar = pd.DataFrame(log_nar).T

ax = log_nar.plot(ylabel='log NAR',xlabel='Price')


ax.axhline(0)
ax.axvline(p[USE_GOOD])