indexes¶
ecoscope.platform.indexes ¶
Attributes¶
TemporalIndexType
module-attribute
¶
TemporalIndexType = Union[Year, Month, YearMonth, DayOfTheYear, DayOfTheMonth, DayOfTheWeek, Hour, Date]
UserDefinedGroupers
module-attribute
¶
UserDefinedGroupers: TypeAlias = list[ValueGrouper | TemporalGrouper | SpatialGrouper]
strftime_directives
module-attribute
¶
strftime_directives: List[TemporalIndexType] = [Year(), Month(), YearMonth(), DayOfTheYear(), DayOfTheMonth(), DayOfTheWeek(), Hour(), Date()]
Classes¶
AllGrouper ¶
Bases: BaseModel
Attributes¶
index_name
class-attribute
instance-attribute
¶
index_name: Annotated[str, AdvancedField(default=All)] = 'All'
Date
dataclass
¶
Date(directive: Literal['%Y-%m-%d'] = '%Y-%m-%d', selector_title: str = 'Date (example: 2025-01-31)', display_name: str = 'Date', sort_key: None = None)
DayOfTheMonth
dataclass
¶
DayOfTheMonth(directive: Literal['%d'] = '%d', selector_title: str = 'Day of the month as a number (example: 31)', display_name: str = 'Day of the month', sort_key: None = None)
DayOfTheWeek
dataclass
¶
DayOfTheWeek(directive: Literal['%A'] = '%A', selector_title: str = 'Day of the week (example: Sunday)', display_name: str = 'Day of the week', sort_key: Callable = index)
DayOfTheYear
dataclass
¶
DayOfTheYear(directive: Literal['%j'] = '%j', selector_title: str = 'Day of the year as a number (example: 365)', display_name: str = 'Day of the year', sort_key: None = None)
Hour
dataclass
¶
Hour(directive: Literal['%H'] = '%H', selector_title: str = 'Hour (24-hour clock) as number (example: 22)', display_name: str = 'Hour', sort_key: None = None)
Month
dataclass
¶
Month(directive: Literal['%B'] = '%B', selector_title: str = 'Month (example: September)', display_name: str = 'Month', sort_key: Callable = index)
SpatialGrouper ¶
Bases: BaseModel
Attributes¶
help_text
class-attribute
instance-attribute
¶
help_text: Annotated[str | SkipJsonSchema[None], AdvancedField(default=None, exclude=True)] = None
Methods:¶
resolve ¶
resolve(spatial_regions: AnyGeoDataFrame) -> None
TemporalGrouper ¶
Bases: BaseModel
Attributes¶
help_text
class-attribute
instance-attribute
¶
help_text: Annotated[str | SkipJsonSchema[None], AdvancedField(default=None, exclude=True)] = None
is_temporal
class-attribute
instance-attribute
¶
model_config
class-attribute
instance-attribute
¶
temporal_index
instance-attribute
¶
temporal_index: Annotated[TemporalIndexType, BeforeValidator(_coerce_temporal_index)]
ValueGrouper ¶
Bases: BaseModel
Attributes¶
help_text
class-attribute
instance-attribute
¶
help_text: Annotated[str | SkipJsonSchema[None], AdvancedField(default=None, exclude=True)] = None
model_config
class-attribute
instance-attribute
¶
Year
dataclass
¶
Year(directive: Literal['%Y'] = '%Y', selector_title: str = 'Year (example: 2024)', display_name: str = 'Year', sort_key: None = None)