gabm.abm.attributes.ethnicity module
Ethnicity module for GABM.
- class gabm.abm.attributes.ethnicity.Ethnicity(ethnicity_id: EthnicityID, description: str)
Bases:
GABMAttributeAn Ethnicity.
- Attributes:
id (EthnicityID): Unique identifier for the ethnicity. description (str): The description of the ethnicity.
- class gabm.abm.attributes.ethnicity.EthnicityID(ethnicity_id: int)
Bases:
GABMAttributeIDA unique identifier for an Ethnicity attribute.
- Attributes:
id (int): The unique identifier for the ethnicity.
- AFRICAN = EthnicityID(1)
- AMERICAN = EthnicityID(2)
- ANTIPODIAN = EthnicityID(3)
- ASIAN = EthnicityID(4)
- EUROPEAN = EthnicityID(5)
- OTHER = EthnicityID(6)
- UNKNOWN = EthnicityID(0)
- class gabm.abm.attributes.ethnicity.EthnicityMap
Bases:
GABMAttributeMapA mapping of EthnicityIds to Ethnicity.
By default, the map is initialized as follows:
items: Dict[EthnicityID, Ethnicity] = { EthnicityID.UNKNOWN: Ethnicity(EthnicityID.UNKNOWN, "unknown"), EthnicityID.AFRICAN: Ethnicity(EthnicityID.AFRICAN, "african"), EthnicityID.AMERICAN: Ethnicity(EthnicityID.AMERICAN, "american"), EthnicityID.ANTIPODIAN: Ethnicity(EthnicityID.ANTIPODIAN, "antipodian"), EthnicityID.ASIAN: Ethnicity(EthnicityID.ASIAN, "asian"), EthnicityID.EUROPEAN: Ethnicity(EthnicityID.EUROPEAN, "european"), EthnicityID.OTHER: Ethnicity(EthnicityID.OTHER, "other") } super().__init__(items)