hiv_workflow.lib.utils.analysis module

exception hiv_workflow.lib.utils.analysis.InvalidDateException

Bases: Exception

exception hiv_workflow.lib.utils.analysis.InvalidAgeBinException

Bases: Exception

exception hiv_workflow.lib.utils.analysis.InvalidDataframeColumnException

Bases: Exception

hiv_workflow.lib.utils.analysis.model_population_in_year(year, obs_population, df, low_age=None, high_age=None, age_bin=None, year_col='Year', population_col='Population', verbose=False)

Computes age [15, 50) (inclusive, exclusive) population from the provided DataFrame in the given year :param year: an Integer. Any offsets are dealt with by this method. Ratio of census population to computed model population is also returned. :param df: data to determine population from :return: model populaton as a numeric, ratio of census/model pop as numeric