interactive_plotting module

interactive_plotting.bk_basic_interactive(doc, df=None, plot_height=700, plot_width=900, dot_size=5)[source]

run a basic interactive chart as a server app - powered by the bokeh plotting library. Run the app in the jupyter notebook as follows:

from functools import partial
import pandas as pd

import interactive_plotting as ip

from bokeh.io import show, output_notebook

from bokeh.application.handlers import FunctionHandler
from bokeh.application import Application

output_notebook()

proposal = 'p1'
df = pd.read_pickle('dill/ds_' + proposal + '.pkl')

handler = FunctionHandler(partial(ip.bk_basic_interactive, df=df))

app = Application(handler)
show(app)
inputs
doc (required input)

do not change this input

df (dataframe)

calculated dataset input, this is a required input

plot_height (integer)

height of plot in pixels

plot_width (integer)

width of plot in pixels

Add plot_height and/or plot_width parameters as kwargs within the partial method:

handler = FunctionHandler(partial(ip.bk_basic_interactive,
                                  df=df,
                                  plot_height=450,
                                  plot_width=625))

Note: the “df” argument is not optional, a valid dataset variable must be assigned.