Search
DURATION

DURATION

The duration attribute reflects whether power is available when needed and only applies to households with electricity access. For example, in Tier 5, households get 23 hours or more of electricity per day, whereas households in Tier 3 get less than 16 hours of electricity per day and less than 4 hours during the daytime.

HIT_PATH = '../../../../src/'
institution_id = 7
lang = 'en'
import os,sys, folium
sys.path.insert(0, os.path.normpath(os.path.join(os.path.abspath(''), HIT_PATH)))
import hedera_types as hedera
import odk_interface as odk

mfi = hedera.mfi(institution_id,setPathBook=True)
data = mfi.read_survey(mfi.odk_data_name)
mfi.HH = odk.households(data)
attribute = 'E_Duration'

MTF Ranking

import matplotlib.pyplot as plt
plt.rcParams.update({'font.size': 18})
mfi.tier_pie(attribute)

MTF Ranking vs. Location

import matplotlib.pyplot as plt
plt.rcParams.update({'font.size': 18})
mfi.stacked_tier_per_category(attribute,mfi.offices,
                              'locality',
                              mfi.offices,legend=True)

MTF Ranking vs. Power Source

import matplotlib.pyplot as plt
plt.rcParams.update({'font.size': 18})
mfi.stacked_tier_per_category(attribute,hedera.keys().powerSources,
                              'primary_electricity_source',
                              hedera.names('en').powerSources)

MTF Ranking vs. Income Quintile

import matplotlib.pyplot as plt
plt.rcParams.update({'font.size': 18})
mfi.tiers_per_quintile(attribute,legend=True)