In [1]:
from bokeh.crossfilter.models import CrossFilter
from bokeh.sampledata.autompg import autompg
from bokeh.document import Document
from bokeh.session import Session
from bokeh.plotting import *

autompg['cyl'] = autompg['cyl'].astype(str)
autompg['origin'] = autompg['cyl'].astype(str)
app = CrossFilter.create(df=autompg)

document = Document()
session = Session()
session.use_doc('crossfilter')
session.load_document(document)


Using saved session configuration for http://localhost:5006/
To override, pass 'load_from_config=False' to Session

In [2]:
app


Out[2]:
<bokeh.crossfilter.models.CrossFilter at 0x7f7f444873c8>

In [3]:
document.add(app)
session.store_document(document)


Out[3]:
[<bokeh.models.tickers.BasicTicker at 0x7f7f22416780>,
 <bokeh.models.tools.PanTool at 0x7f7f223d4048>,
 <bokeh.models.renderers.GlyphRenderer at 0x7f7f223ca748>,
 <bokeh.models.tools.BoxZoomTool at 0x7f7f223cad68>,
 <bokeh.models.axes.LinearAxis at 0x7f7f223cae10>,
 <bokeh.models.widgets.inputs.Select at 0x7f7f223ca9e8>,
 <bokeh.models.tools.ResizeTool at 0x7f7f223caa20>,
 <bokeh.plotting.Figure at 0x7f7f223caac8>,
 <bokeh.models.markers.Circle at 0x7f7f4f1be0b8>,
 <bokeh.models.ranges.DataRange1d at 0x7f7f22416828>,
 <bokeh.models.markers.Circle at 0x7f7f4f1a7400>,
 <bokeh.models.widgets.inputs.Select at 0x7f7f240a8668>,
 <bokeh.models.ranges.DataRange1d at 0x7f7f224167f0>,
 <bokeh.models.formatters.BasicTickFormatter at 0x7f7f22416748>,
 <bokeh.models.tools.WheelZoomTool at 0x7f7f223caef0>,
 <bokeh.models.widgets.inputs.Select at 0x7f7f2552e400>,
 <bokeh.models.tools.ResetTool at 0x7f7f223ca908>,
 <bokeh.models.tools.PreviewSaveTool at 0x7f7f223caf28>,
 <bokeh.models.sources.ColumnDataSource at 0x7f7f224166d8>,
 <bokeh.models.widgets.inputs.Select at 0x7f7f4a9af198>,
 <bokeh.models.tickers.BasicTicker at 0x7f7f223cae48>,
 <bokeh.models.grids.Grid at 0x7f7f223caa58>,
 <bokeh.models.sources.ColumnDataSource at 0x7f7f22416470>,
 <bokeh.crossfilter.models.CrossFilter at 0x7f7f444873c8>,
 <bokeh.models.tools.BoxSelectTool at 0x7f7f223ca8d0>,
 <bokeh.models.plots.PlotContext at 0x7f7f21df5f98>,
 <bokeh.models.axes.LinearAxis at 0x7f7f22416898>,
 <bokeh.models.grids.Grid at 0x7f7f223cac18>,
 <bokeh.models.tools.ToolEvents at 0x7f7f223cac50>,
 <bokeh.models.formatters.BasicTickFormatter at 0x7f7f223cadd8>]

In [4]:
session.show(app)



In [ ]: