Skip to main content

🎉 We released Spotlight 1.5.10 check it out

Version: 1.5.10

layout

This module allows user customize layout to start Spotlight from a python script/notebook.

A Spotlight layout consists of multiple widgets, grouped into tabs and splits.

Functions

layout(*nodes, orientation=None)

Create a new layout with the given orientation and given nodes inside.

split(*nodes, weight=1, orientation=None)

Create a new split with the given weight, orientation and given nodes inside.

tab(*widgets, weight=1)

Create a new tab with the given weight and given widgets inside.

histogram(name=None, column=None, stack_by_column=None, filter=False)

Add configured histogram to Spotlight layout.

inspector(name=None, lenses=None, num_columns=4)

Add an inspector widget with optionally preconfigured viewers (lenses).

Example

>>> from renumics.spotlight import layout
>>> from renumics.spotlight.layout import lenses
>>> spotlight_layout = layout.layout(
... layout.inspector(
... "My Inspector",
... [
... lenses.scalar("bool"),
... lenses.scalar("float"),
... lenses.scalar("str"),
... lenses.scalar("datetime"),
... lenses.scalar("category"),
... lenses.scalar("int"),
... lenses.text("str", name="text"),
... lenses.html("str", name="HTML (safe)"),
... lenses.html("str", name="HTML", unsafe=True),
... lenses.markdown("str", name="MD"),
... lenses.array("embedding"),
... lenses.array("window"),
... lenses.array("array"),
... lenses.sequences("sequence"),
... lenses.sequences(["sequence1", "sequence2"], name="sequences"),
... lenses.mesh("mesh"),
... lenses.image("image"),
... lenses.video("video"),
... lenses.audio("audio"),
... lenses.audio("audio", window_column="window", name="windowed audio"),
... lenses.spectrogram("audio"),
... lenses.spectrogram(
... "audio",
... window_column="window",
... name="windowed spectrogram",
... ),
... ],
... num_columns=2,
... )
... )

scatterplot(name=None, x_column=None, y_column=None, color_by_column=None, size_by_column=None, filter=False)

Add configured scatter plot to Spotlight layout.

similaritymap(name=None, columns=None, reduction_method=None, color_by_column=None, size_by_column=None, filter=False, *, umap_metric=None, umap_balance=None, pca_normalization=None)

Add configured similarity map to Spotlight layout.

table(name=None, active_view='all', visible_columns=None, sort_by_columns=None, order_by_relevance=False)

Add configured table to Spotlight layout.

issues(name=None)

Add a widget displaying data issues.

wordcloud(name=None, column=None, min_word_length=None, stop_words=None, scaling=None, max_word_count=None, filter=None)

Add configured confusion matrix to Spotlight layout.

confusion_matrix(name=None, x_column=None, y_column=None)

Add configured confusion matrix to Spotlight layout.

metric(name=None, metric=None, columns=None)

Add configured metric widget to Spotlight layout.