Saltar al contenido principal

TimeSeriesPlotExplorer

Explorer
DashAI.back.exploration.explorers.TimeSeriesPlotExplorer

Plot one or more numeric columns against a date column, over time.

Select the date column plus the series to look at. The dates are read with the format the column already carries, sorted, and handed to the plot as real datetimes, so the horizontal axis is a genuine time axis: gaps show up as gaps and irregular spacing is visible rather than flattened into evenly spaced categories.

This is the plot to look at before forecasting anything, since trend, seasonality, level shifts, missing stretches and outliers are all obvious here and nearly invisible in a summary table.

Several numeric columns can be selected at once and are drawn as separate lines sharing the time axis.

Parameters

markers : boolean, default=False
Draw a point at each observation as well as the line. Useful for short or irregular series, where the line alone hides how many readings there actually are.

Methods

get_results(self, exploration_path: str, options: Dict[str, Any]) -> List[DashAI.back.core.artifacts.Artifact]

Defined on TimeSeriesPlotExplorer

Load and return the saved figure for the frontend.

Parameters

exploration_path : str
Path to the JSON file saved by save_notebook.
options : Dict[str, Any]
Rendering options from the frontend (unused).

Returns

List[Artifact]
A single-element list with the plotly artifact of the saved figure.

launch_exploration(self, dataset: 'DashAIDataset', explorer_info: DashAI.back.dependencies.database.models.Explorer)

Defined on TimeSeriesPlotExplorer

Draw the selected series against the selected date column.

Parameters

dataset : DashAIDataset
The prepared dataset holding the selected columns.
explorer_info : Explorer
Explorer record with the column names and optional display name.

Returns

plotly.graph_objects.Figure
An interactive line plot with a time axis.

save_notebook(self, notebook_info: DashAI.back.dependencies.database.models.Notebook, explorer_info: DashAI.back.dependencies.database.models.Explorer, save_path: 'Path', result: Any) -> str

Defined on TimeSeriesPlotExplorer

Save the figure to disk (JSON content, .pickle extension).

Parameters

notebook_info : Notebook
The notebook database record (unused).
explorer_info : Explorer
The explorer record used for filename generation.
save_path : Path
Directory where the file will be saved.
result : Any
The Plotly figure returned by launch_exploration.

Returns

str
The path of the saved file as a POSIX string.

validate_columns(cls, explorer_info: DashAI.back.dependencies.database.models.Explorer, column_spec: Dict[str, Dict[str, str]]) -> bool

Defined on TimeSeriesPlotExplorer

Check the selection is one date column plus at least one series.

Parameters

explorer_info : Explorer
The database record for the explorer instance, including the selected columns.
column_spec : Dict[str, Dict[str, str]]
A mapping from column name to a dict with at least "type" and "dtype".

Returns

bool
True if the selection holds exactly one Date column and at least one numeric column, and the inherited checks also pass.

get_credential(self, name: str)

Defined on ConfigObject

Resolve a registered credential component by name.

Parameters

name : str
Credential component class name (e.g. "HuggingFaceCredential").

Returns

BaseCredential
An instance of the requested credential component.

get_metadata(cls) -> Dict[str, Any]

Defined on BaseExplorer

Get metadata for the explorer, used by the DashAI frontend.

Returns

Dict[str, Any]
Dictionary containing display name, description, image preview path, category, icon, color, allowed semantic types, allowed dtypes, and input cardinality constraints.

get_schema(cls) -> dict

Defined on ConfigObject

Generates the component related Json Schema.

Returns

dict
Dictionary representing the Json Schema of the component.

prepare_dataset(self, loaded_dataset: 'DashAIDataset', columns: List[Dict[str, Any]]) -> 'DashAIDataset'

Defined on BaseExplorer

Prepare the dataset by selecting only the columns needed for this exploration.

Parameters

loaded_dataset : DashAIDataset
The full dataset loaded from storage.
columns : List[Dict[str, Any]]
List of column descriptor dicts, each containing at least "columnName". Optional keys: "id", "valueType", "dataType".

Returns

DashAIDataset
Dataset restricted to the requested columns.

validate_and_transform(self, raw_data: dict) -> dict

Defined on ConfigObject

It takes the data given by the user to initialize the model and returns it with all the objects that the model needs to work.

Parameters

raw_data : dict
A dictionary with the data provided by the user to initialize the model.

Returns

dict
A validated dictionary with the necessary objects.

validate_parameters(cls, params: Dict[str, Any]) -> bool

Defined on BaseExplorer

Validate explorer parameters against the explorer's schema.

Parameters

params : Dict[str, Any]
The configuration parameters to validate.

Returns

BaseExplorerSchema
The validated and parsed schema instance. Subclasses that override this method may return a bool to indicate pass/fail without returning the model instance.