hooks
Subsets filtering backend, containing all hooks/callback functions for subset functionality.
use_subset(data_key, subset_key='A', name='no-name', write_only=False, reducer=operator.and_, eq=solara.util.numpy_equals)
#
Provides cross filtering across a subset, all other filters are combined using the reducer.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_key
|
int
|
expected id(DataFrame) |
required |
subset_key
|
Union[Reactive[str], str]
|
the key for the subset. Can be reactive or string. |
'A'
|
name
|
str
|
name of the reducer, used to help identify in debugs |
'no-name'
|
write_only
|
bool
|
whether this filter should attach a listener. Can significantly increase performance with many filters. |
False
|
reducer
|
Callable[[T, T], T]
|
type of reduction to use on the returned cross filtering. |
and_
|
eq
|
Callable[[Any, Any], bool]
|
type of equality check to use |
numpy_equals
|
Returns:
Name | Type | Description |
---|---|---|
cross_filter |
Expression
|
combined crossfilter |
set_filter |
Callable
|
callable method to set a filter |
Source code in src/sdss_explorer/dashboard/dataclass/hooks.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
|