LayerGroup#

class LayerGroup(**kwargs)[source]#

Bases: dict

A generic class for individual setting group and some methods to operate on each.

Parameters:

kwargs (dict) – data dictionary for the setting group

Notes

Settings currently supported include : households (H), schools (S), workplaces (W), and long term care facilities (LTCF).

Methods

set_layer_group(**kwargs)[source]#

Set layer group values.

validate(layer_str='')[source]#

Check that information supplied to make a household is valid and update to the correct type if necessary.

member_ages(age_by_uid, subgroup_member_uids=None)[source]#

Return the ages of members in the layer group given the pop object.

Parameters:
  • age_by_uid (np.ndarray) – mapping of age to uid

  • subgroup_member_uids (np.ndarray, list) – subgroup of uids to return ages for

Returns:

ages of members in group or subgroup

Return type:

nd.ndarray