Histogram with density plot and slider filter

Dear mailing list,

I would like to create a histogram in bokeh with a density plot plus a slider filter which allows interactive filtering of the data frame based on the values in a column of my dataset. Currently, I have the blocks to create a static bokeh histogram with a density plot however I dont know how to create the appropriate callback fun.

from bokeh.io import output_file, show
from bokeh.plotting import figure
from bokeh.sampledata.autompg import autompg as df
from numpy import histogram, linspace
from scipy.stats.kde import gaussian_kde
pdf = gaussian_kde(df.hp)

x = linspace(0,250,50)

p = figure(plot_height=300)
p.line(x, pdf(x))

# plot actual hist for comparison
hist, edges = histogram(df.hp, density=True, bins=20)
p.quad(top=hist, bottom=0, left=edges[:-1], right=edges[1:], alpha=0.4)

show(p)