Skip to content

Commit

Permalink
Various docs improvements a new Integrations guide (#1173)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximlt committed Oct 13, 2023
1 parent 36f6058 commit 360663a
Show file tree
Hide file tree
Showing 18 changed files with 1,092 additions and 213 deletions.
10 changes: 6 additions & 4 deletions README.md
Expand Up @@ -46,7 +46,7 @@ Head over to the [getting started guide](https://hvplot.holoviz.org/getting_star
hvPlot can be installed on Linux, Windows, or Mac with ``conda``:

```bash
conda install -c pyviz hvplot
conda install hvplot
```

or with ``pip``:
Expand Down Expand Up @@ -125,12 +125,14 @@ hvPlot is completely free and open-source. It is licensed under the [BSD 3-Claus

## Support & Feedback

Get support from or provide feedback to the [HoloViz Community](https://holoviz.org/community.html).
- Usage questions and showcases -> [HoloViz Community](https://holoviz.org/community.html)
- Bug reports and feature requests -> [Github](https://github.com/holoviz/hvplot)
- Developer discussions -> [Discord](https://discord.gg/rb6gPXbdAr)

For more detail check out the [HoloViz Community Guide](https://holoviz.org/community.html).

## Contributions

We would love to work with you no matter whether you want to contribute to issue management, PRs, documentation, blog posts, community support or social media communication.

To get started with the code or docs check out the [Developer Guide](https://hvplot.holoviz.org/developer_guide/index.html).

Reach out on [Gitter](https://gitter.im/pyviz/pyviz) to discuss with the developers, join the weekly triaging or join the bi-weekly HoloViz call.
4 changes: 2 additions & 2 deletions doc/getting_started/index.md
Expand Up @@ -39,11 +39,11 @@ Learn how to turn data pipelines into widget-based interactive applications with
[Learn more »](interactive)
:::

:::{grid-item-card} {octicon}`browser;2.5em;sd-mr-1` `explorer()`
:::{grid-item-card} {octicon}`browser;2.5em;sd-mr-1` `.explorer()`
:link: explorer
:link-type: doc

Start to use `explorer()` to explore data in a web application.
Start to use `.hvplot.explorer()` to explore data in a web application.

+++
[Learn more »](explorer)
Expand Down
8 changes: 4 additions & 4 deletions doc/getting_started/installation.md
Expand Up @@ -5,11 +5,11 @@
| Latest release | [![Github release](https://img.shields.io/github/release/holoviz/hvplot.svg?label=tag&colorB=11ccbb)](https://github.com/holoviz/hvplot/releases) [![PyPI version](https://img.shields.io/pypi/v/hvplot.svg?colorB=cc77dd)](https://pypi.python.org/pypi/hvplot) [![hvplot version](https://img.shields.io/conda/v/pyviz/hvplot.svg?colorB=4488ff&style=flat)](https://anaconda.org/pyviz/hvplot) [![conda-forge version](https://img.shields.io/conda/v/conda-forge/hvplot.svg?label=conda%7Cconda-forge&colorB=4488ff)](https://anaconda.org/conda-forge/hvplot) [![defaults version](https://img.shields.io/conda/v/anaconda/hvplot.svg?label=conda%7Cdefaults&style=flat&colorB=4488ff)](https://anaconda.org/anaconda/hvplot) |
| Python | [![Python support](https://img.shields.io/pypi/pyversions/hvplot.svg)](https://pypi.org/project/hvplot/) |

hvPlot supports Python 3.8, 3.9, 3.10 and 3.11 on Linux, Windows, or Mac. The recommended way to install hvPlot is using the [conda](https://conda.io/en/latest/) command provided by [Anaconda](https://docs.anaconda.com/anaconda/install/index.html) or [Miniconda](https://docs.conda.io/en/latest/miniconda.html):
hvPlot supports Python 3.8 and above on Linux, Windows, or Mac. hvPlot can be installed with [conda](https://conda.io/en/latest/):

conda install -c pyviz hvplot
conda install hvplot

or using PyPI:
or with `pip`:

pip install hvplot

Expand All @@ -20,4 +20,4 @@ For versions of `jupyterlab>=3.0` the necessary extension is automatically bundl

To run the guides in this site create an environment with the required dependencies:

conda create -n hvplot-env -c pyviz -c conda-forge -c nodefaults hvplot geoviews datashader xarray pandas geopandas dask streamz networkx intake intake-xarray intake-parquet s3fs scipy spatialpandas pooch rasterio fiona plotly matplotlib jupyterlab
conda create -n hvplot-env -c conda-forge -c nodefaults hvplot geoviews datashader xarray pandas geopandas dask streamz networkx intake intake-xarray intake-parquet s3fs scipy spatialpandas pooch rasterio fiona plotly matplotlib jupyterlab
2 changes: 1 addition & 1 deletion doc/index.md
Expand Up @@ -378,7 +378,7 @@ align: center
---
```

**`explorer()` to explore data in a web application**
**`.hvplot.explorer()` to explore data in a web application**

The *Explorer* is a [Panel](https://panel.holoviz.org) web application that can be displayed in a Jupyter notebook and that can be used to quickly create customized plots.

Expand Down
4 changes: 4 additions & 0 deletions doc/user_guide/index.rst
Expand Up @@ -41,6 +41,9 @@ rather than Matplotlib.
* `Introduction <Introduction.html>`_
Introduction to hvPlot and how to start using it.

* `Integrations <Integrations.html>`_
How hvPlot integrates with the Python ecosystem.

* `Plotting with Bokeh <Plotting.html>`_
Overview of plotting your data with hvPlot and Bokeh.

Expand Down Expand Up @@ -98,6 +101,7 @@ rather than Matplotlib.
:maxdepth: 2

Introduction <Introduction>
Integrations <Integrations>
Plotting with Bokeh <Plotting>
Plotting with Matplotlib <Plotting_with_Matplotlib>
Plotting with Plotly <Plotting_with_Plotly>
Expand Down
84 changes: 70 additions & 14 deletions examples/getting_started/explorer.ipynb
Expand Up @@ -2,65 +2,121 @@
"cells": [
{
"cell_type": "markdown",
"id": "a8d569ea",
"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."
"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 itself. 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": "markdown",
"id": "e5f15c29-1e4e-4965-88cd-b2bc844ea1a7",
"metadata": {},
"source": [
":::{note}\n",
"The Explorer has been added to hvPlot in version <code>0.8.0</code> with support for Pandas objects. Support for Xarray objects has been added in version <code>0.9.0</code>. Support for more data types will be added in future versions, in the meantime please report any issue or feature request <a href='https://github.com/holoviz/hvplot/'>on GitHub</a>.\n",
":::"
]
},
{
"cell_type": "markdown",
"id": "ddd88f96-1fe4-4990-90f6-b3ba8de51f23",
"metadata": {},
"source": [
"## Set up"
]
},
{
"cell_type": "markdown",
"id": "433023f4-5ebc-4585-9fc8-1c3f26cfd880",
"metadata": {},
"source": [
"Setting up the explorer is pretty simple in a notebook, you just need to make sure you have loaded the extension, either via a data type import (e.g. `import hvplot.pandas`) or directly (e.g. `hvplot.extension('bokeh')`)."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8dad379b-fcbf-4f18-84ec-6c0a07187f4d",
"metadata": {},
"outputs": [],
"source": [
"import hvplot\n",
"from bokeh.sampledata.penguins import data as df"
"import hvplot.pandas # noqa"
]
},
{
"cell_type": "markdown",
"id": "4ec628be-25e5-42d7-9ef5-6419c78b5140",
"metadata": {},
"source": [
"## Basic usage"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8f88635d-63a4-414c-a0ea-72605e0c896f",
"metadata": {},
"outputs": [],
"source": [
"hvplot.extension('bokeh')"
"from bokeh.sampledata.penguins import data as df\n",
"\n",
"df.head(2)"
]
},
{
"cell_type": "markdown",
"id": "8d638734-0a96-4d7a-8b9f-9c46403a0b3f",
"metadata": {},
"source": [
"The explorer is available on the `.hvplot` namespace together with the other plotting methods. It accepts most of the parameters accepted by the `.hvplot()` API. For the purpose of producing a nice example on the documentation we will instantiate an explorer with some pre-defined parameters; usually you would instantiate it without so many parameters."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e9c01a9f",
"metadata": {},
"outputs": [],
"source": [
"explorer = hvplot.explorer(df)\n",
"explorer = df.hvplot.explorer(x='bill_length_mm', y='bill_depth_mm', kind='scatter', by=['species'])\n",
"explorer"
]
},
{
"cell_type": "markdown",
"id": "99aee979",
"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:"
"Once you are done exploring the data you may want to record the settings you have configured or save the plot. The easiest option consists of opening the *Code* tab next to *Plot* and copy/pasting the code displayed in a new notebook cell, executing it will generate exactly the same code as seen in the explorer.\n",
"\n",
"The code string is also available on the `code` attribute:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5b59f550-7d99-44a0-bc96-4e7131daafcd",
"metadata": {},
"outputs": [],
"source": [
"eval(explorer.code)"
]
},
{
"cell_type": "markdown",
"id": "2a3f891b-214f-4635-84a5-bd425df7c8db",
"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",
"```"
"## Conclusion"
]
},
{
"cell_type": "markdown",
"id": "0dbb3916",
"metadata": {},
"source": [
"For information on using `explorer()` take a look at the [User Guide](../user_guide/Explorer.ipynb)."
"For information on using `.hvplot.explorer()` take a look at the [User Guide](../user_guide/Explorer.ipynb)."
]
}
],
Expand Down

0 comments on commit 360663a

Please sign in to comment.