1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
# ┃ ██████ ██████ ██████ █ █ █ █ █ █▄ ▀███ █ ┃
# ┃ ▄▄▄▄▄█ █▄▄▄▄▄ ▄▄▄▄▄█ ▀▀▀▀▀█▀▀▀▀▀ █ ▀▀▀▀▀█ ████████▌▐███ ███▄ ▀█ █ ▀▀▀▀▀ ┃
# ┃ █▀▀▀▀▀ █▀▀▀▀▀ █▀██▀▀ ▄▄▄▄▄ █ ▄▄▄▄▄█ ▄▄▄▄▄█ ████████▌▐███ █████▄ █ ▄▄▄▄▄ ┃
# ┃ █ ██████ █ ▀█▄ █ ██████ █ ███▌▐███ ███████▄ █ ┃
# ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
# ┃ Copyright (c) 2017, the Perspective Authors. ┃
# ┃ ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ┃
# ┃ This file is part of the Perspective library, distributed under the terms ┃
# ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
# ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
=
"""Define the traitlet interface with `PerspectiveJupyterWidget` on the
front end. Attributes which are set here are synchronized between the
front-end and back-end.
Examples:
>>> widget = perspective.PerspectiveWidget(
... data, group_by=["a", "b", "c"])
PerspectiveWidget(group_by=["a", "b", "c"])
>>> widget.split_by=["b"]
>>> widget
PerspectiveWidget(group_by=["a", "b", "c"], split_by=["b"])
"""
# `perspective-viewer` options
=
=
=
=
=
=
=
=
=
=
=
# used to tell the frontend which table to connect to
=
=
=
=
=
# @validate("plugin")
# def _validate_plugin(self, proposal):
# return validate_plugin(proposal.value)
# @validate("columns")
# def _validate_columns(self, proposal):
# return validate_columns(proposal.value)
# @validate("group_by")
# def _validate_group_by(self, proposal):
# return validate_group_by(proposal.value)
# @validate("split_by")
# def _validate_split_by(self, proposal):
# return validate_split_by(proposal.value)
# @validate("aggregates")
# def _validate_aggregates(self, proposal):
# return validate_aggregates(proposal.value)
# @validate("sort")
# def _validate_sort(self, proposal):
# return validate_sort(proposal.value)
# @validate("filter")
# def _validate_filter(self, proposal):
# return validate_filter(proposal.value)
# @validate("expressions")
# def _validate_expressions(self, proposal):
# return validate_expressions(proposal.value)
# @validate("plugin_config")
# def _validate_plugin_config(self, proposal):
# return validate_plugin_config(proposal.value)
# @validate("title")
# def _validate_title(self, proposal):
# return validate_title(proposal.value)
return