BrushSummaryWidget¶
-
class
pandas_visual_analysis.widgets.brush_summary.
BrushSummaryWidget
(data_source, row, index, relative_size, max_height)[source]¶ Bases:
pandas_visual_analysis.widgets.base_widget.BaseWidget
The BrushSummaryWidget displays how a metric changes for the selection compared to the whole data. It shows all of the data as the baseline and displays the change in absolute values and as a percentage value. In addition it also displays arrows indicating the change with both color and direction. The magnitude of the change is illustrated as the size of the arrow to see the sensitivity at a glance.
- Parameters
data_source (
DataSource
) –pandas_visual_analysis.data_source.DataSource
for the widget.row (
int
) – The row the widget is in.index (
int
) – Index of the row the widget is in.relative_size (
float
) – The space the widget has in a row which is then converted to the width. (e.g. 0.33 => 33%)max_height (
int
) – height in pixels the plot has to have
-
build
()[source]¶ This method returns an IPython Widget root node containing all the children for this widget.
- Return type
Widget
-
observe_brush_indices_change
(sender)[source]¶ This method observes the changes in the brush selection. In order to actually observe changes it has to be registered in
set_observers()
.- Parameters
sender – The instance that sent the signal.
-
on_deselection
(trace, points)[source]¶ This method implements the behaviour of changes in the deselection of this plot. Should reset the brushed selection of
pandas_visual_analysis.data_source.DataSource
in order to propagate the change.- Parameters
trace – The trace object which triggered the deselection.
points – The object containing the points in the ‘point_inds’ field.
-
on_selection
(trace, points, state)[source]¶ This method implements the behaviour of changes in the selection of this plot. Should set the brushed indices property of
pandas_visual_analysis.data_source.DataSource
in order to propagate the change.- Parameters
trace – The trace object which triggered the selection.
points – The object containing the points in the ‘point_inds’ field.
state – State of the input device.