Contacts#
- class Contacts(data=None, layer_keys=None, **kwargs)[source]#
Bases:
FlexDict
A simple (for now) class for storing different contact layers.
- Parameters:
data (dict) – a dictionary that looks like a Contacts object
layer_keys (list) – if provided, create an empty Contacts object with these layers
kwargs (dict) – additional layer(s), merged with data
Methods
- add_layer(**kwargs)[source]#
Small method to add one or more layers to the contacts. Layers should be provided as keyword arguments.
Example:
hospitals_layer = hpv.Layer(label='hosp') sim.people.contacts.add_layer(hospitals=hospitals_layer)