commonpower.data_forecasting.data_sources.CalendarDataSource

class CalendarDataSource(date_range: List[datetime], frequency: timedelta = datetime.timedelta(seconds=3600), seasons_only: bool = False)[source]

Bases: ArrayDataSource

DataSource which returns calendar information.

Parameters:
  • date_range (List[datetime]) – Date range to simulate.

  • frequency (timedelta, optional) – Frequency of data to simulate. Defaults to timedelta(hours=1).

  • seasons_only (bool, optional) – If True, only the season information is returned, otherwise the exact month. Defaults to False.

Methods

get_date_range

Returns the date range data is available for.

get_limits

Returns the limits for each variable in the data source.

get_variables

Returns the list of element names that data is available for.