Skip to content

Enum References

enums

ItemTypeEnum

Bases: Enum

Kind of result of a flag. It follows from the class of the flag spec.

Source code in src/mesqual/enums.py
 6
 7
 8
 9
10
11
class ItemTypeEnum(Enum):
    """Kind of result of a flag. It follows from the class of the flag spec."""

    Model = 'Model'
    TimeSeries = 'TimeSeries'
    Other = 'Other'

VisualizationTypeEnum

Bases: Enum

How a map shows the objects of a flag.

Source code in src/mesqual/enums.py
14
15
16
17
18
19
20
21
class VisualizationTypeEnum(Enum):
    """How a map shows the objects of a flag."""

    Area = 'Area'
    Point = 'Point'
    Line = 'Line'
    Border = 'Border'
    Other = 'Other'

TopologyTypeEnum

Bases: Enum

Role of the objects of a flag in the network topology.

Nodes and node-connected elements aggregate to areas, edges to borders. A border joins two areas; the two areas need not be geographic neighbours.

Source code in src/mesqual/enums.py
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
class TopologyTypeEnum(Enum):
    """Role of the objects of a flag in the network topology.

    Nodes and node-connected elements aggregate to areas, edges to borders.
    A border joins two areas; the two areas need not be geographic neighbours.
    """

    Area = 'Area'
    Border = 'Border'
    Node = 'Node'
    NodeConnectedElement = 'NodeConnectedElement'
    Edge = 'Edge'
    Other = 'Other'

    @property
    def visualization_type(self) -> VisualizationTypeEnum:
        """Default visualization type of objects with this topology type."""
        match self:
            case TopologyTypeEnum.Node | TopologyTypeEnum.NodeConnectedElement:
                return VisualizationTypeEnum.Point
            case TopologyTypeEnum.Edge:
                return VisualizationTypeEnum.Line
            case TopologyTypeEnum.Area:
                return VisualizationTypeEnum.Area
            case TopologyTypeEnum.Border:
                return VisualizationTypeEnum.Border
        return VisualizationTypeEnum.Other

visualization_type property

visualization_type: VisualizationTypeEnum

Default visualization type of objects with this topology type.

QuantityTypeEnum

Bases: Enum

Physical property that determines how a quantity behaves under time aggregation.

For time series resampling, the type decides what happens when the time granularity changes:

  • INTENSIVE: quantities per unit, such as rates. A finer granularity (hourly to 15 min) repeats the value; a coarser one (hourly to daily) takes the mean. Examples: prices [€/MWh], power [MW], flows [MW].
  • EXTENSIVE: totals or amounts. A finer granularity splits the value; a coarser one takes the sum. Examples: welfare [€], volume [MWh], energy [MWh].
  • AMBIGUOUS: the unit alone does not decide the type. No unit in Units is ambiguous; a platform can mark its own units so. The flag spec states the type.
  • UNKNOWN: no type is known, for example for a value without unit.
Source code in src/mesqual/enums.py
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
class QuantityTypeEnum(Enum):
    """
    Physical property that determines how a quantity behaves under time aggregation.

    For time series resampling, the type decides what happens when the time
    granularity changes:

    - `INTENSIVE`: quantities per unit, such as rates. A finer granularity
      (hourly to 15 min) repeats the value; a coarser one (hourly to daily)
      takes the mean. Examples: prices [€/MWh], power [MW], flows [MW].
    - `EXTENSIVE`: totals or amounts. A finer granularity splits the value; a
      coarser one takes the sum. Examples: welfare [€], volume [MWh],
      energy [MWh].
    - `AMBIGUOUS`: the unit alone does not decide the type. No unit in `Units`
      is ambiguous; a platform can mark its own units so. The flag spec states
      the type.
    - `UNKNOWN`: no type is known, for example for a value without unit.
    """

    INTENSIVE = 'intensive'
    EXTENSIVE = 'extensive'
    AMBIGUOUS = 'ambiguous'
    UNKNOWN = 'unknown'

ComparisonTypeEnum

Bases: Enum

Various Comparison Types for DatasetComparison class' fetch method.

Source code in src/mesqual/enums.py
78
79
80
81
82
83
class ComparisonTypeEnum(Enum):
    """Various Comparison Types for DatasetComparison class' fetch method."""

    VARIATION = 'variation'  # Show only variation's model_df
    BOTH = 'both'  # Show both variation and reference side by side
    DELTA = 'delta'  # Show delta for numeric values, variation for non-numeric