hvPlot isn’t only a plotting library, it is dedicated to make data exploration easier. In this guide you will see how it can help you to get better control over your data pipelines. We define a data pipeline as a series of commands that transform some data, such as aggregating, filtering, reshaping, renaming, etc. A data pipeline may include a load step that will provide the input data to the pipeline, e.g. reading the data from a data base.

When you analyze some data in a notebook that is for instance held in a Pandas DataFrame, you may find yourself having to re-run many cells after changing the parameters you provide to Pandas’ methods, either to get more insights on the data or fine tune an algorithm. .interactive() is a solution to improve this rather cumbersome workflow, by which you replace the constant parameters in the pipeline by widgets (e.g. a number slider), that will automatically get displayed next to your pipeline output and will trigger an output update on changes. With this approach all your pipeline parameters are available in one place and you get full interactive control over the pipeline.

.interactive() doesn’t only work with DataFrames but also with Xarray data structures, this is what we are going to show in this guide. First we will import hvplot.xarray which is going make available the .interactive() accessor on Xarray objects.

import hvplot.xarray  # noqa
import xarray as xr