inspect_viz
Data
Data source for visualizations.
Data sources can be created from any standard Python data frame (e.g. Pandas, Polars, etc.) or from a path pointing to a data file in a standard format (e.g. csv, parquet, etc.)
class Data
Attributes
columns
list[str]-
Column names for data source.
Methods
- from_dataframe
-
Create Data from a standard Python data frame (e.g. Pandas, Polars, PyArrow, etc.).
@classmethod def from_dataframe(cls, df: IntoDataFrame) -> "Data"
df
IntoDataFrame-
Data frame to read.
- from_file
-
Create Data from a data file (e.g. csv, parquet, feather, etc.).
@classmethod def from_file(cls, file: str | PathLike[str]) -> "Data"
file
str | PathLike[str]-
File to read data from. Supported formats include csv, json, xslx, parquet, feather, sas7bdat, dta, and fwf.
Component
Data visualization component (input, plot, mark, table, layout, etc.).
Visualization components are Jupyter widgets that can be used in any notebook or Jupyter based publishing system.
See the documentation on inputs, plots, marks, and interactors for details on available components.
class Component(AnyWidget)
Selection
Selection that can be filtered by inputs and other selections.
Selection types include:
Selection.intersect()
for intersecting clauses (logical “and”)Selection.union()
for unionone clauses (logical “or”)Selection.single()
for a single clause onlySelection.crossfilter()
for a cross-filtered intersection
class Selection(str)
Methods
- intersect
-
Create a new Selection instance with an intersect (conjunction) resolution strategy.
@classmethod def intersect( cls,bool = False, cross: bool = False, empty: "Selection", list["Selection"]] | None = None, include: Union[-> "Selection" )
cross
bool-
Boolean flag indicating cross-filtered resolution. If true, selection clauses will not be applied to the clients they are associated with.
empty
bool-
Boolean flag indicating if a lack of clauses should correspond to an empty selection with no records. This setting determines the default selection state.
include
Union[Selection, list[Selection]] | None-
Upstream selections whose clauses should be included as part of the new selection. Any clauses published to upstream selections will be relayed to the new selection.
- union
-
Create a new Selection instance with a union (disjunction) resolution strategy.
@classmethod def union( cls,bool = False, cross: bool = False, empty: "Selection", list["Selection"]] | None = None, include: Union[-> "Selection" )
cross
bool-
Boolean flag indicating cross-filtered resolution. If true, selection clauses will not be applied to the clients they are associated with.
empty
bool-
Boolean flag indicating if a lack of clauses should correspond to an empty selection with no records. This setting determines the default selection state.
include
Union[Selection, list[Selection]] | None-
Upstream selections whose clauses should be included as part of the new selection. Any clauses published to upstream selections will be relayed to the new selection.
- single
-
Create a new Selection instance with a singular resolution strategy that keeps only the most recent selection clause.
@classmethod def single( cls,bool = False, cross: bool = False, empty: "Selection", list["Selection"]] | None = None, include: Union[-> "Selection" )
cross
bool-
Boolean flag indicating cross-filtered resolution. If true, selection clauses will not be applied to the clients they are associated with.
empty
bool-
Boolean flag indicating if a lack of clauses should correspond to an empty selection with no records. This setting determines the default selection state.
include
Union[Selection, list[Selection]] | None-
Upstream selections whose clauses should be included as part of the new selection. Any clauses published to upstream selections will be relayed to the new selection.
- crossfilter
-
Create a new Selection instance with a cross-filtered intersect resolution strategy.
@classmethod def crossfilter( cls,bool = False, empty: "Selection", list["Selection"]] | None = None, include: Union[-> "Selection" )
empty
bool-
Boolean flag indicating if a lack of clauses should correspond to an empty selection with no records. This setting determines the default selection state.
include
Union[Selection, list[Selection]] | None-
Upstream selections whose clauses should be included as part of the new selection. Any clauses published to upstream selections will be relayed to the new selection.
Param
Parameter that can be bound from inputs.
class Param(str)
Attributes
id
str-
Unique id (automatically generated).
default
ParamValue-
Default value.
ParamValue
Type alias for parameter values (scalar or sequence of scalars).
= (
ParamValue: TypeAlias int | float | bool | str | datetime | Sequence[int | float | bool | str]
)