tlo.methods.demography module ============================= .. automodule:: tlo.methods.demography .. autoclass:: Demography Bases: :class:`tlo.core.Module` **PARAMETERS:** .. list-table:: :widths: 25 25 50 :header-rows: 1 * - Item - Type - Description * - max_age_initial - INT - The oldest age (in whole years) in the initial population * - pop_2010 - DATA_FRAME - Population in 2010 for initialising population * - district_num_to_district_name - DICT - Mapping from district_num to district name * - district_num_to_region_name - DICT - Mapping from district_num to region name * - districts_in_region - DICT - Set of districts (by name) that are within a region (by name) * - all_cause_mortality_schedule - DATA_FRAME - All-cause age-specific mortality rates from WPP * - fraction_of_births_male - REAL - Birth Sex Ratio * - gbd_causes_of_death_data - DATA_FRAME - Proportion of deaths in each age/sex group attributable to each possible cause of death in the GBD dataset. **PROPERTIES:** .. list-table:: :widths: 25 25 50 :header-rows: 1 * - Item - Type - Description * - is_alive - BOOL - Whether this individual is alive * - date_of_birth - DATE - Date of birth of this individual * - date_of_death - DATE - Date of death of this individual * - sex - CATEGORICAL - Male or female. Possible values are: [M, F, ] * - mother_id - INT - Unique identifier of mother of this individual * - district_num_of_residence - INT - The district number in which the person is resident * - cause_of_death - CATEGORICAL - The cause of death of this individual (the tlo_cause defined by the module). Possible values are: [SET_AT_RUNTIME, ] * - district_of_residence - CATEGORICAL - The district (name) of residence (mapped from district_num_of_residence).. Possible values are: [SET_AT_RUNTIME, ] * - region_of_residence - CATEGORICAL - The region of residence (mapped from district_num_of_residence).. Possible values are: [SET_AT_RUNTIME, ] * - age_exact_years - REAL - The age of the individual in exact years * - age_years - INT - The age of the individual in years * - age_range - CATEGORICAL - The age range category of the individual. Possible values are: [0-4, 5-9, 10-14, 15-19, 20-24, 25-29, 30-34, 35-39, 40-44, 45-49, 50-54, 55-59, 60-64, 65-69, 70-74, 75-79, 80-84, 85-89, 90-94, 95-99, 100+, ] * - age_days - INT - The age of the individual in whole days **Class attributes:** AGE_RANGE_CATEGORIES : ['0-4', '5-9', '10-14', '15-19', '20-24', '25-29', '30-34', '35-39', '40-44', '45-49', '50-54', '55-59', '60-64', '65-69', '70-74', '75-79', '80-84', '85-89', '90-94', '95-99', '100+'] AGE_RANGE_LOOKUP : {0: '0-4', 1: '0-4', 2: '0-4', 3: '0-4', 4: '0-4', 5: '5-9', 6: '5-9', 7: '5-9', 8: '5-9', 9: '5-9', 10: '10-14', 11: '10-14', 12: '10-14', 13: '10-14', 14: '10-14', 15: '15-19', 16: '15-19', 17: '15-19', 18: '15-19', 19: '15-19', 20: '20-24', 21: '20-24', 22: '20-24', 23: '20-24', 24: '20-24', 25: '25-29', 26: '25-29', 27: '25-29', 28: '25-29', 29: '25-29', 30: '30-34', 31: '30-34', 32: '30-34', 33: '30-34', 34: '30-34', 35: '35-39', 36: '35-39', 37: '35-39', 38: '35-39', 39: '35-39', 40: '40-44', 41: '40-44', 42: '40-44', 43: '40-44', 44: '40-44', 45: '45-49', 46: '45-49', 47: '45-49', 48: '45-49', 49: '45-49', 50: '50-54', 51: '50-54', 52: '50-54', 53: '50-54', 54: '50-54', 55: '55-59', 56: '55-59', 57: '55-59', 58: '55-59', 59: '55-59', 60: '60-64', 61: '60-64', 62: '60-64', 63: '60-64', 64: '60-64', 65: '65-69', 66: '65-69', 67: '65-69', 68: '65-69', 69: '65-69', 70: '70-74', 71: '70-74', 72: '70-74', 73: '70-74', 74: '70-74', 75: '75-79', 76: '75-79', 77: '75-79', 78: '75-79', 79: '75-79', 80: '80-84', 81: '80-84', 82: '80-84', 83: '80-84', 84: '80-84', 85: '85-89', 86: '85-89', 87: '85-89', 88: '85-89', 89: '85-89', 90: '90-94', 91: '90-94', 92: '90-94', 93: '90-94', 94: '90-94', 95: '95-99', 96: '95-99', 97: '95-99', 98: '95-99', 99: '95-99'} OPTIONAL_INIT_DEPENDENCIES : {'ScenarioSwitcher'} **Functions (defined or overridden in class Demography):** .. automethod:: __init__ .. automethod:: read_parameters .. automethod:: pre_initialise_population .. automethod:: initialise_population .. automethod:: initialise_simulation .. automethod:: on_birth .. automethod:: _edit_init_pop_to_prevent_persons_greater_than_max_age .. automethod:: process_causes_of_death .. automethod:: do_death .. automethod:: create_mappers_from_causes_of_death_to_label .. automethod:: calc_py_lived_in_last_year .. automethod:: compute_initial_model_to_data_popsize_ratio .. autoclass:: AgeUpdateEvent Bases: :class:`tlo.events.RegularEvent`, :class:`tlo.events.Event`, :class:`tlo.events.PopulationScopeEventMixin` **Class attributes:** __annotations__ : {} **Functions (defined or overridden in class AgeUpdateEvent):** .. automethod:: __init__ .. automethod:: apply .. autoclass:: OtherDeathPoll Bases: :class:`tlo.events.RegularEvent`, :class:`tlo.events.Event`, :class:`tlo.events.PopulationScopeEventMixin` **Class attributes:** __annotations__ : {} **Functions (defined or overridden in class OtherDeathPoll):** .. automethod:: __init__ .. automethod:: get_mort_risk_per_poll .. automethod:: get_all_cause_mort_risk_per_poll .. automethod:: get_proportion_of_deaths_to_represent_as_other_deaths .. automethod:: apply .. autoclass:: InstantaneousDeath Bases: :class:`tlo.events.Event`, :class:`tlo.events.IndividualScopeEventMixin` **Functions (defined or overridden in class InstantaneousDeath):** .. automethod:: __init__ .. automethod:: apply .. autoclass:: DemographyLoggingEvent Bases: :class:`tlo.events.RegularEvent`, :class:`tlo.events.Event`, :class:`tlo.events.PopulationScopeEventMixin` **Class attributes:** __annotations__ : {} **Functions (defined or overridden in class DemographyLoggingEvent):** .. automethod:: __init__ .. automethod:: apply