get_household_heads#

get_household_heads(popdict)[source]#

Get the id of the head of each household.

Parameters:

popdict (dict) – population dictionary

Returns:

Dictionary of the id of the head of the household for each household.

Return type:

dict

Note

In static populations the id of the head of the household is the minimum id of the household members. With vital dynamics turned on and populations growing or changing households over time, this method will need to change and the household head or reference person will need to be specified at creation and when those membership events occur.