param dashboard

The InteractiveImage command provided with datashader makes it simple to make an interactive plot of a very large dataset, but very often one will want to add additional interactive controls to filter your data, select columns for plotting, etc., which is not supported by InteractiveImage. One way to do that is to use ParamNB to instantiate some parameters and then have it run the subsequent cell whenever one of those parameters changes (via paramnb.Widgets(...,next_n=1) ).

This notebook illustrates a cleaner way using a HoloViews stream to connect the widgets and the plot. Requires conda install -c ioam/label/dev holoviews paramnb and installing GeoViews (which is only important for the map tile support).


In [1]:
import holoviews as hv
import geoviews as gv
import param, paramnb
import pandas as pd

from colorcet import cm
from bokeh.models import WMTSTileSource
from holoviews.operation.datashader import datashade
from holoviews.streams import RangeXY


%time df = pd.read_csv('../data/nyc_taxi.csv', usecols = ['passenger_count', \
                       'pickup_x', 'pickup_y', 'dropoff_x', 'dropoff_y'])