gabm.abm.attributes.income module

Income module for GABM.

class gabm.abm.attributes.income.Income(income_id: IncomeID, description: str)

Bases: GABMAttribute

For representing income.

Attributes:

id (IncomeID): Unique identifier for the income. description (str): The description of the income.

class gabm.abm.attributes.income.IncomeID(income_id: int)

Bases: GABMAttributeID

A unique identifier for an Income attribute.

Attributes:

id (int): The unique identifier for the income.

MEDIAN_TO_Q3 = IncomeID(3)
Q1_TO_MEDIAN = IncomeID(2)
Q3_TO_TOP_10 = IncomeID(4)
TOP_0_001 = IncomeID(9)
TOP_0_01_TO_TOP_0_001 = IncomeID(8)
TOP_0_1_TO_TOP_0_01 = IncomeID(7)
TOP_10_TO_TOP_1 = IncomeID(5)
TOP_1_TO_TOP_0_1 = IncomeID(6)
UNKNOWN = IncomeID(0)
ZERO_TO_Q1 = IncomeID(1)
class gabm.abm.attributes.income.IncomeMap

Bases: GABMAttributeMap

A mapping of IncomeIds to Income.

By default, the map is initialized as follows:

items: Dict[IncomeID, Income] = {
    IncomeID.UNKNOWN: Income(IncomeID.UNKNOWN, "unknown"),
    IncomeID.ZERO_TO_Q1: Income(IncomeID.ZERO_TO_Q1, "zero to q1"),
    IncomeID.Q1_TO_MEDIAN: Income(IncomeID.Q1_TO_MEDIAN, "q1 to median"),
    IncomeID.MEDIAN_TO_Q3: Income(IncomeID.MEDIAN_TO_Q3, "median to q3"),
    IncomeID.Q3_TO_TOP_10: Income(IncomeID.Q3_TO_TOP_10, "q3 to top 10%"),
    IncomeID.TOP_10_TO_TOP_1: Income(IncomeID.TOP_10_TO_TOP_1, "top 10% to top 1%"),
    IncomeID.TOP_1_TO_TOP_0_1: Income(IncomeID.TOP_1_TO_TOP_0_1, "top 1% to top 0.1%"),
    IncomeID.TOP_0_1_TO_TOP_0_01: Income(IncomeID.TOP_0_1_TO_TOP_0_01, "top 0.1% to top 0.01%"),
    IncomeID.TOP_0_01_TO_TOP_0_001: Income(IncomeID.TOP_0_01_TO_TOP_0_001, "top 0.01% to top 0.001%"),
    IncomeID.TOP_0_001: Income(IncomeID.TOP_0_001, "top 0.001%")
}