{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "The *Explorer* is a [Panel](https://panel.holoviz.org)-based web application with which you can easily explore your data. While using `.hvplot()` is a convenient way to create plots from data, it assumes some *a piori* knowledge about the data itself and its structure, and also knowdlege about `.hvplot()`'s API. The *Explorer* is a graphical interface that offers a simple way to select and visualize the kind of plot you want to see your data with, and many options to customize that plot." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import hvplot\n", "from bokeh.sampledata.penguins import data as df" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "hvplot.extension('bokeh')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "explorer = hvplot.explorer(df)\n", "explorer" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Once you are done exploring the data you may want to save the plot or record the settings you have configured. The *Explorer* offers the `.save` method to save a plot and the `.settings()` method to obtain a dictionary of the settings. The `.plot_code()` method can also be used to get a code string that can easily be copy/pasted to another cell to create a plot with `.hvplot()`. Assuming we would have set the *Explorer* to create a scatter plot we would get:" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "```python\n", "explorer.plot_code()\n", "```\n", "\n", "```bash\n", "\"df.hvplot(by=['species'], kind='scatter', x='bill_length_mm', y=['bill_depth_mm'])\"\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "For information on using `explorer()` take a look at the [User Guide](../user_guide/Explorer.ipynb)." ] } ], "metadata": { "language_info": { "name": "python", "pygments_lexer": "ipython3" } }, "nbformat": 4, "nbformat_minor": 5 }