data_sources.datetime

Datetime data sources and functions

data_sources.datetime.datetime_model

Model for output of datetime data

Datetime Objects

class Datetime(DataSourceOutput)

Class to store Datetime data as a xr.Dataset with some validation

data_sources.datetime.datetime_data_source

Datetime DataSource - add hour and year features

DatetimeDataSource Objects

@dataclass
class DatetimeDataSource(DataSource)

Add hour_of_day_{sin, cos} and day_of_year_{sin, cos} features.

__post_init__

def __post_init__()

Post init

get_example

def get_example(t0_dt: pd.Timestamp, x_meters_center: Number, y_meters_center: Number) -> Datetime

Get example data

Arguments:

  • t0_dt - list of timestamps
  • x_meters_center - x center of patches - not needed
  • y_meters_center - y center of patches - not needed

  • Returns - batch data of datetime features

get_locations_for_batch

def get_locations_for_batch(t0_datetimes: pd.DatetimeIndex) -> Tuple[List[Number], List[Number]]

This method is not needed for DatetimeDataSource

datetime_index

def datetime_index() -> pd.DatetimeIndex

This method is not needed for DatetimeDataSource