gabm.abm.attributes.region module

Ethnicity module for GABM.

class gabm.abm.attributes.region.Region(region_id: RegionID, description: str)

Bases: GABMAttribute

A Region.

Attributes:

id (RegionID): Unique identifier for the region. description (str): The description of the region.

class gabm.abm.attributes.region.RegionID(region_id: int)

Bases: GABMAttributeID

A unique identifier for a Region attribute.

Attributes:

id (int): The unique identifier for the region attribute.

CENTRAL = RegionID(5)
EAST = RegionID(6)
NORTH = RegionID(2)
NORTH_EAST = RegionID(3)
NORTH_WEST = RegionID(1)
SOUTH = RegionID(8)
SOUTH_EAST = RegionID(9)
SOUTH_WEST = RegionID(7)
UNKNOWN = RegionID(0)
WEST = RegionID(4)
class gabm.abm.attributes.region.RegionMap

Bases: GABMAttributeMap

A mapping of RegionIds to Region.

By default, the map is initialized as follows:

items: Dict[RegionID, Region] = {
    RegionID.UNKNOWN: Region(RegionID.UNKNOWN, "unknown"),
    RegionID.NORTH_WEST: Region(RegionID.NORTH_WEST, "north-west"),
    RegionID.NORTH: Region(RegionID.NORTH, "north"),
    RegionID.NORTH_EAST: Region(RegionID.NORTH_EAST, "north-east"),
    RegionID.WEST: Region(RegionID.WEST, "west"),
    RegionID.CENTRAL: Region(RegionID.CENTRAL, "central"),
    RegionID.EAST: Region(RegionID.EAST, "east"),
    RegionID.SOUTH_WEST: Region(RegionID.SOUTH_WEST, "south-west"),
    RegionID.SOUTH: Region(RegionID.SOUTH, "south"),
    RegionID.SOUTH_EAST: Region(RegionID.SOUTH_EAST, "south-east")
}
super().__init__(items)