PerspectiveWidget
comes with a set of plugins that are able to visualize your data.
from perspective import PerspectiveWidget
data = {
"int": [i for i in range(4)],
"float": [i * 1.25 for i in range(4)],
"str": ["a", "b", "c", "d"],
"bool": [True, False, True, False],
"date": [date.today() for i in range(4)],
"datetime": [datetime.now() for i in range(4)]
}
Pass the plugin name into the kwargs of PerspectiveWidget
or start
. Once the viewer has been initialized, you can select plugins at the top left corner (and see the parsable names for each one).
widget = PerspectiveWidget(data, plugin="d3_x_bar")
widget
widget2 = PerspectiveWidget(data, plugin="d3_heatmap")
widget2
Plugins can be set from the notebook:
widget.plugin = "datagrid"
widget.plugin = "d3_y_line"