epymorph.geography.custom
Implements a generic geo scope capable of representing arbitrary geographies.
CustomScope
CustomSelection
dataclass
CustomSelection(
scope: GeoScopeT_co,
selection: NDArray[bool_],
grouping: GeoGrouping | None,
aggregation: GeoAggMethod | None,
)
Bases: GeoSelection[CustomScope]
A GeoSelection
on a CustomScope
.
Typically you will create one of these by calling methods on a GeoSelector
instance.
group
group(grouping: GeoGrouping) -> GeoGroup[CustomScope]
Groups the geo axis using the specified grouping.
Parameters:
-
grouping
(GeoGrouping
) –The grouping to use.
Returns:
-
GeoGroup[CustomScope]
–The grouping strategy.
CustomSelector
dataclass
CustomSelector(
_scope: GeoScopeT_co,
_selection_class: type[GeoSelectionT_co],
)