demographics_overlay
DemographicsOverlay
Bases: DemographicsBase
In contrast to class :py:obj:emod_api:emod_api.demographics.Demographics this class does not set any defaults.
It inherits from :py:obj:emod_api:emod_api.demographics.DemographicsBase so all functions that can be used to
create demographics can also be used to create an overlay file. Parameters can be changed/set specifically by
passing node_id, individual attributes, and individual attributes to the constructor.
Source code in emod_api/demographics/demographics_overlay.py
__init__(nodes=None, idref=None, individual_attributes=None, node_attributes=None)
A class to create demographic overlays.
Args:
nodes: Overlay is applied to these nodes.
idref: a name used to indicate files (demographics, climate, and migration) are used together
individual_attributes: Object of type
:py:obj:emod_api:emod_api.demographics.PropertiesAndAttributes.IndividualAttributes
to overwrite individual attributes
node_attributes: Object of type
:py:obj:emod_api:emod_api.demographics.PropertiesAndAttributes.NodeAttributes
to overwrite individual attributes
Source code in emod_api/demographics/demographics_overlay.py
to_file(file_name='demographics_overlay.json')
Write the contents of the instance to an EMOD-compatible (JSON) file.