gabm.abm.attributes.wealth module
Wealth module for GABM.
- class gabm.abm.attributes.wealth.Wealth(wealth_id: WealthID, description: str)
Bases:
GABMAttributeFor representing wealth.
- Attributes:
id (WealthID): Unique identifier for the wealth. description (str): The description of the wealth.
- class gabm.abm.attributes.wealth.WealthID(wealth_id: int)
Bases:
GABMAttributeIDA unique identifier for a Wealth attribute.
- Attributes:
wealth_id (int): The unique identifier for the wealth attribute.
- MEDIAN_TO_Q3 = WealthID(4)
- NEGATIVE = WealthID(1)
- Q1_TO_MEDIAN = WealthID(3)
- Q3_TO_TOP_10 = WealthID(5)
- TOP_0_001 = WealthID(10)
- TOP_0_01_TO_TOP_0_001 = WealthID(9)
- TOP_0_1_TO_TOP_0_01 = WealthID(8)
- TOP_10_TO_TOP_1 = WealthID(6)
- TOP_1_TO_TOP_0_1 = WealthID(7)
- UNKNOWN = WealthID(0)
- ZERO_TO_Q1 = WealthID(2)
- class gabm.abm.attributes.wealth.WealthMap
Bases:
GABMAttributeMapA mapping of WealthIds to Wealth.
By default, the map is initialized as follows:
self.wealth_map: Dict[WealthID, Wealth] = { WealthID.UNKNOWN: Wealth(WealthID.UNKNOWN, "unknown"), WealthID.NEGATIVE: Wealth(WealthID.NEGATIVE, "negative"), WealthID.ZERO_TO_Q1: Wealth(WealthID.ZERO_TO_Q1, "zero to q1"), WealthID.Q1_TO_MEDIAN: Wealth(WealthID.Q1_TO_MEDIAN, "q1 to median"), WealthID.MEDIAN_TO_Q3: Wealth(WealthID.MEDIAN_TO_Q3, "median to q3"), WealthID.Q3_TO_TOP_10: Wealth(WealthID.Q3_TO_TOP_10, "q3 to top 10%"), WealthID.TOP_10_TO_TOP_1: Wealth(WealthID.TOP_10_TO_TOP_1, "top 10% to top 1%"), WealthID.TOP_1_TO_TOP_0_1: Wealth(WealthID.TOP_1_TO_TOP_0_1, "top 1% to top 0.1%"), WealthID.TOP_0_1_TO_TOP_0_01: Wealth(WealthID.TOP_0_1_TO_TOP_0_01, "top 0.1% to top 0.01%"), WealthID.TOP_0_01_TO_TOP_0_001: Wealth(WealthID.TOP_0_01_TO_TOP_0_001, "top 0.01% to top 0.001%"), WealthID.TOP_0_001: Wealth(WealthID.TOP_0_001, "top 0.001%") }