LassoSelectTool जोड़ना

Bokeh के साथ इंटरएक्टिव डेटा विज़ुअलाइज़ेशन

George Boorman

Core Curriculum Manager, DataCamp

निरीक्षक (Inspectors)

 

  • CrosshairTool
    • crosshair क्रॉसहेयर टूल

 

 

  • HoverTool
    • hover होवर टूल

CrosshairTool

1 https://docs.bokeh.org/en/latest/docs/user_guide/tools.html#userguide-tools-inspectors
Bokeh के साथ इंटरएक्टिव डेटा विज़ुअलाइज़ेशन

Bokeh डेटा सोर्स ऑब्जेक्ट्स

from bokeh.models import ColumnDataSource

source = ColumnDataSource(data=nba)
fig = figure(x_axis_label="Minutes Played", y_axis_label="Points Per Game")
fig.circle(x="assists", y="points", source=source)
output_file(filename="ColumnDataSource.html") show(fig)

nba_scatter

Bokeh के साथ इंटरएक्टिव डेटा विज़ुअलाइज़ेशन

HoverTool सेट करना

from bokeh.models import ColumnDataSource
source = ColumnDataSource(data=nba)

TOOLTIPS = [("Name", "@player"), ("Team", "@team")]
fig = figure(x_axis_label="Assists", y_axis_label="Points",
tooltips=TOOLTIPS)
fig.circle(x="assists", y="points", source=source) output_file("name_and_team.html") show(fig)
Bokeh के साथ इंटरएक्टिव डेटा विज़ुअलाइज़ेशन

HoverTool क्रिया में

HoverTool

Bokeh के साथ इंटरएक्टिव डेटा विज़ुअलाइज़ेशन

सांख्यिक डेटा दिखाना

TOOLTIPS = [("Name", "@player"), ("Team", "@team"),

("Points", "@points"), ("Assists", "@assists")]
fig = figure(x_axis_label="Assists", y_axis_label="Points", tooltips=TOOLTIPS) fig.circle(x="assists", y="points", source=source) output_file("hovertool.html") show(fig)

Unformatted HoverTool

Bokeh के साथ इंटरएक्टिव डेटा विज़ुअलाइज़ेशन

HoverTool को फ़ॉर्मैट करना

TOOLTIPS = [("Name", "@player"), ("Team", "@team"),

("Points", "@points{0.2f}"), ("Assists", "@assists{0.2f}")]
fig = figure(x_axis_label="Assists", y_axis_label="Points", tooltips=TOOLTIPS) fig.circle(x="assists", y="points", source=source) output_file("formatted_hovertool.html") show(fig)

formatted_hovertool

Bokeh के साथ इंटरएक्टिव डेटा विज़ुअलाइज़ेशन

अभ्यास करते हैं!

Bokeh के साथ इंटरएक्टिव डेटा विज़ुअलाइज़ेशन

Preparing Video For Download...