Spaces:
Runtime error
Runtime error
interaction
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ def datasets_explorer_viz(df):
|
|
19 |
s = ColumnDataSource(df)
|
20 |
TOOLTIPS= [("dataset_id", "@dataset_id"), ("task", "@task")]
|
21 |
color = factor_cmap('task', palette=Category20c_20, factors=df['task'].unique())
|
22 |
-
p = figure(plot_width=1000, plot_height=
|
23 |
p.scatter('x', 'y', size=5, source=s, alpha=0.8,marker='circle',fill_color = color, line_color=color, legend_field = 'task')
|
24 |
p.legend.location = "bottom_right"
|
25 |
p.legend.click_policy="mute"
|
@@ -32,7 +32,7 @@ def datasets_explorer_viz(df):
|
|
32 |
TableColumn(field="task", title="Task"),
|
33 |
TableColumn(field="dataset_id", title="Dataset ID"),
|
34 |
]
|
35 |
-
data_table = DataTable(source=table_source, columns=columns, width=
|
36 |
p.circle('x', 'y',source=selection_source, size=5, color= 'red')
|
37 |
s.selected.js_on_change('indices', CustomJS(args=dict(umap_source=s, table_source=table_source), code="""
|
38 |
const inds = cb_obj.indices;
|
|
|
19 |
s = ColumnDataSource(df)
|
20 |
TOOLTIPS= [("dataset_id", "@dataset_id"), ("task", "@task")]
|
21 |
color = factor_cmap('task', palette=Category20c_20, factors=df['task'].unique())
|
22 |
+
p = figure(plot_width=1000, plot_height=800, tools="hover,wheel_zoom,pan,box_select", tooltips=TOOLTIPS, toolbar_location="above")
|
23 |
p.scatter('x', 'y', size=5, source=s, alpha=0.8,marker='circle',fill_color = color, line_color=color, legend_field = 'task')
|
24 |
p.legend.location = "bottom_right"
|
25 |
p.legend.click_policy="mute"
|
|
|
32 |
TableColumn(field="task", title="Task"),
|
33 |
TableColumn(field="dataset_id", title="Dataset ID"),
|
34 |
]
|
35 |
+
data_table = DataTable(source=table_source, columns=columns, width=500)
|
36 |
p.circle('x', 'y',source=selection_source, size=5, color= 'red')
|
37 |
s.selected.js_on_change('indices', CustomJS(args=dict(umap_source=s, table_source=table_source), code="""
|
38 |
const inds = cb_obj.indices;
|