emodpy_hiv.demographics.country_models module#

class emodpy_hiv.demographics.country_models.AgeBin(start, end, delimiter=None)[source]#

Bases: object

exception InvalidAgeBinFormat[source]#

Bases: Exception

exception NotMergeable[source]#

Bases: Exception

STR_FORMAT = '[%s%s%s)'#
SPLIT_REGEX = re.compile('^\\[(?P<start>[0-9.]+)(?P<delimiter>[^0-9.]+)(?P<end>[0-9.]+)\\)$')#
DEFAULT_DELIMITER = ':'#
ALL = 'all'#
merge(other_bin)[source]#

Create a single AgeBin representing two adjacent AgeBins. Keeps delimiter of ‘self’. :param other_bin: merge self with this other AgeBin object (self is lower age than other_bin) :return: an AgeBin object with delimiter set to self.delimiter (not other_bin.delimiter)

contains(other_bin)[source]#

Is other_bin contained within the bounds of self? :param other_bin: an AgeBin object :return: True/False

to_tuple()[source]#
classmethod from_string(str)[source]#
classmethod merge_bins(bins)[source]#
classmethod can_upsample_bins(bins, target_bin)[source]#
emodpy_hiv.demographics.country_models.load_country_model_demographics_default(country_model: str) HIVDemographics[source]#