Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The API is based on the familiar Pandas `.plot` API and the innovative `.interac

hvPlot

- supports a wide range of data sources including [Pandas](http://pandas.pydata.org), [Polars](https://docs.pola.rs/), [XArray](http://xarray.pydata.org), [Dask](http://dask.pydata.org), [Streamz](http://streamz.readthedocs.io), [Intake](http://github.com/ContinuumIO/intake), [GeoPandas](http://geopandas.org) and [NetworkX](https://networkx.github.io/documentation/stable/).
- supports a wide range of data sources including [Pandas](http://pandas.pydata.org), [Polars](https://docs.pola.rs/), [XArray](http://xarray.pydata.org), [Dask](http://dask.pydata.org), [Intake](http://github.com/ContinuumIO/intake), [GeoPandas](http://geopandas.org) and [NetworkX](https://networkx.github.io/documentation/stable/).
- supports the plotting backends [Bokeh](https://docs.bokeh.org/en/latest/), [Matplotlib](https://matplotlib.org/) and [Plotly](https://plotly.com/python/).
- exposes the powerful tools from the [HoloViz](https://holoviz.org/) ecosystem in a familiar and convenient API.

Expand Down
1 change: 0 additions & 1 deletion binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ dependencies:
- geopandas>=0.9.0
- xarray>=0.18.2
- networkx>=2.6.3
- streamz>=0.3.0
- intake>=0.6.5
- intake-parquet>=0.2.3
- intake-xarray>=0.5.0
Expand Down
3 changes: 1 addition & 2 deletions doc/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os
import sys

from importlib.util import find_spec

Expand Down Expand Up @@ -52,7 +51,7 @@
'user_guide/Plotting_with_Plotly.ipynb',
]

if not find_spec('streamz') or sys.version_info[:2] >= (3, 14):
if not find_spec('streamz'):
collect_ignore_glob += [
'ref/plotting_options/streaming.ipynb',
]
Expand Down
15 changes: 0 additions & 15 deletions doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,21 +185,6 @@ align: center
---
:::

:::{tab-item} Streamz
```python
import hvplot.streamz
from streamz.dataframe import Random

df_streamz = Random(interval='200ms', freq='50ms')
df_streamz.hvplot()
```
```{image} ./assets/streamz_demo.gif
---
alt: Works with Streamz
align: center
---
:::

::::

`.hvplot()` can generate plots with [Bokeh](https://bokeh.org/) (default), [Matplotlib](https://matplotlib.org/) or [Plotly](https://plotly.com/).
Expand Down
2 changes: 1 addition & 1 deletion doc/ref/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ df.hvplot(kind='scatter')

Under the hood, these special imports like `import hvplot.pandas` register an accessor that returns an instance of an `hvPlotBase` class. Tabular-like data sources rely on the `hvPlotTabular` class and gridded-like sources on `hvPlot` (subclass of `hvPlotTabular` extended with methods like {meth}`image <hvplot.hvPlot.image>`):

- `hvPlotTabular`: cuDF, Dask, Fugue, Ibis, Pandas, Streamz
- `hvPlotTabular`: cuDF, Dask, Fugue, Ibis, Pandas
- `hvPlotTabularDuckDB`: DuckDB
- `hvPlotTabularPolars`: Polars
- `hvPlot`: Xarray
Expand Down
33 changes: 19 additions & 14 deletions doc/ref/data_libraries.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@
"id": "5f0d3dcc",
"metadata": {},
"source": [
"| Source | Module | Type | HoloViews interface | Comment |\n",
"| --------------------------------- | ---------------- | ----------------- | ------------------- | ----------------------------- |\n",
"| [Pandas](#libraries-pandas) | `hvplot.pandas` | Tabular | ✅ | |\n",
"| [Dask](#libraries-dask) | `hvplot.dask` | Tabular | ✅ | |\n",
"| [Geopandas](#libraries-geopandas) | `hvplot.pandas` | Tabular | ✅ | |\n",
"| [Ibis](#libraries-ibis) | `hvplot.ibis` | Tabular | ✅ | |\n",
"| [Polars](#libraries-polars) | `hvplot.polars` | Tabular | ❌ | To Pandas |\n",
"| [DuckDB](#libraries-duckdb) | `hvplot.duckdb` | Tabular | ❌ | To Pandas |\n",
"| [RAPIDS cuDF](#libraries-cudf) | `hvplot.cudf` | Tabular | ✅ | GPU |\n",
"| [Fugue](#libraries-fugue) | `hvplot.fugue` | Tabular | ❌ | Experimental |\n",
"| Source | Module | Type | HoloViews interface | Comment |\n",
"| --------------------------------- | ---------------- | ---------------- | ------------------- | ----------------------------- |\n",
"| [Pandas](#libraries-pandas) | `hvplot.pandas` | Tabular | ✅ | |\n",
"| [Dask](#libraries-dask) | `hvplot.dask` | Tabular | ✅ | |\n",
"| [Geopandas](#libraries-geopandas) | `hvplot.pandas` | Tabular | ✅ | |\n",
"| [Ibis](#libraries-ibis) | `hvplot.ibis` | Tabular | ✅ | |\n",
"| [Polars](#libraries-polars) | `hvplot.polars` | Tabular | ❌ | To Pandas |\n",
"| [DuckDB](#libraries-duckdb) | `hvplot.duckdb` | Tabular | ❌ | To Pandas |\n",
"| [RAPIDS cuDF](#libraries-cudf) | `hvplot.cudf` | Tabular | ✅ | GPU |\n",
"| [Fugue](#libraries-fugue) | `hvplot.fugue` | Tabular | ❌ | Experimental |\n",
"| [Xarray](#libraries-xarray) | `hvplot.xarray` | Multidimensional | ✅ | |\n",
"| [Intake](#libraries-intake) | `hvplot.intake` | Catalog | ❌ | |\n",
"| [Streamz](#libraries-streamz) | `hvplot.streamz` | Streaming | ✅ | |\n",
"| [NetworkX](#libraries-networkx) | - | Graph | - | [Different API](api-networkx) |\n"
"| [Intake](#libraries-intake) | `hvplot.intake` | Catalog | ❌ | |\n",
"| [Streamz](#libraries-streamz) | `hvplot.streamz` | Streaming | ✅ | **Deprecated** |\n",
"| [NetworkX](#libraries-networkx) | - | Graph | - | [Different API](api-networkx) |\n"
]
},
{
Expand Down Expand Up @@ -630,7 +630,12 @@
"metadata": {},
"source": [
"(libraries-streamz)=\n",
"### Streamz"
"### Streamz\n",
"\n",
":::{warning}\n",
"\n",
"Streamz support has been deprecated and will be removed in a future version.\n",
":::"
]
},
{
Expand Down
4 changes: 4 additions & 0 deletions doc/ref/plotting_options/streaming.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
"source": [
"# Streaming Options\n",
"\n",
":::{warning}\n",
"Streamz support has been deprecated and will be removed in a future version.\n",
":::\n",
"\n",
":::{note}\n",
"All the examples below require a live python process to experience the full interactivity of the plots.\n",
":::\n",
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/getting_started.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"To run the guides in this site locally, create an environment with the required dependencies:\n",
"\n",
"```bash\n",
"conda create -n hvplot-env -c conda-forge --override-channels hvplot geoviews datashader xarray pandas geopandas dask streamz networkx intake intake-xarray intake-parquet s3fs scipy spatialpandas pooch rasterio fiona plotly matplotlib hvsampledata jupyterlab\n",
"conda create -n hvplot-env -c conda-forge --override-channels hvplot geoviews datashader xarray pandas geopandas dask networkx intake intake-xarray intake-parquet s3fs scipy spatialpandas pooch rasterio fiona plotly matplotlib hvsampledata jupyterlab\n",
"```"
]
},
Expand Down
1 change: 0 additions & 1 deletion doc/user_guide/Introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"* [Polars](https://www.pola.rs/): Polars is a fast DataFrame library/in-memory query engine (columnar/tabular data)\n",
"* [Dask](https://www.dask.org): DataFrame, Series (distributed/out of core arrays and columnar data)\n",
"* [XArray](https://xarray.pydata.org): Dataset, DataArray (labelled multidimensional arrays)\n",
"* [Streamz](https://streamz.readthedocs.io): DataFrame(s), Series(s) (streaming columnar data)\n",
"* [Intake](https://github.com/ContinuumIO/intake): DataSource (data catalogues)\n",
"* [GeoPandas](https://geopandas.org): GeoDataFrame (geometry data)\n",
"* [NetworkX](https://networkx.github.io/documentation/stable/): Graph (network graphs)\n",
Expand Down
5 changes: 5 additions & 0 deletions doc/user_guide/Streaming.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
":::{warning}\n",
"\n",
"Streamz support has been deprecated and will be removed in a future version.\n",
":::\n",
"\n",
"hvPlot supports [streamz](https://github.com/mrocklin/streamz) DataFrame and Series objects, automatically generating streaming plots in a Jupyter notebook or deployed as a [Bokeh Server app](https://bokeh.pydata.org/en/latest/docs/user_guide/server.html). \n",
"\n",
"All hvPlot methods on streamz objects return HoloViews `DynamicMap` objects that update the plot whenever `streamz` triggers an event. For more information on `DynamicMap` and HoloViews dynamic plotting support, see the [HoloViews User Guide](https://holoviews.org/user_guide); here we will focus on using the simple, high-level hvPlot API rather than on the details of how events and data flow behind the scenes.\n",
Expand Down
2 changes: 1 addition & 1 deletion doc/user_guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pandas.plotting module.
- [Subplots](Subplots)
How to generate subplots and grids.
- [Streaming](Streaming)
How to use hvPlot for streaming plots with the streamz library.
How to use hvPlot for streaming plots with the streamz library (**Streamz support is deprecated**).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to remove this or clean it up to not be dependent on streamz because when HoloViews 1.23.0 is released the docs build will fail. We could pin HoloViews for docs build, but at some point a new release is likely gonna be needed, and because we now are versioning documentation, people will be able to still find it.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's best to remove it since it makes no sense having a notebook called streaming that does not use streamz.

- [Gridded Data](Gridded_Data)
How to use hvPlot for plotting Xarray-based gridded data.
- [Network Graphs](NetworkX)
Expand Down
5 changes: 5 additions & 0 deletions hvplot/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1451,6 +1451,11 @@ def _process_data(
datatype = 'ibis'
self.data = data
elif is_streamz(data):
warnings.warn(
'streamz support has been deprecated and will be removed in a future version.',
DeprecationWarning,
stacklevel=_find_stack_level(),
)
datatype = 'streamz'
self.data = data.example
if isinstance(self.data, pd.DataFrame):
Expand Down
12 changes: 12 additions & 0 deletions hvplot/streamz.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import warnings

from .util import _find_stack_level


def patch(name='hvplot', extension='bokeh', logo=False):
from . import hvPlotTabular, post_patch, _module_extensions

Expand All @@ -7,6 +12,13 @@ def patch(name='hvplot', extension='bokeh', logo=False):
raise ImportError(
'Could not patch plotting API onto streamz. Streamz could not be imported.'
)

warnings.warn(
'streamz support has been deprecated and will be removed in a future version.',
DeprecationWarning,
stacklevel=_find_stack_level(),
)

if 'hvplot.streamz' not in _module_extensions:
_patch_plot = lambda self: hvPlotTabular(self) # noqa: E731
_patch_plot.__doc__ = hvPlotTabular.__call__.__doc__
Expand Down
11 changes: 11 additions & 0 deletions hvplot/tests/testdeprecations.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,14 @@ def test_converter_argument_hover_formatters():
df = pd.DataFrame({'x': [0, 1], 'y': [0, 1]})
with pytest.warns(DeprecationWarning):
HoloViewsConverter(df, 'x', 'y', hover_formatters={'@{y}': 'printf'})


def test_streamz_patch():
pytest.importorskip('streamz')
with pytest.warns(
DeprecationWarning,
match='streamz support has been deprecated',
):
from hvplot.streamz import patch

patch()
2 changes: 0 additions & 2 deletions hvplot/tests/testpatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ def test_xarray_dataset_patched(self):

class TestPatchStreamz(TestCase):
def setUp(self):
if sys.version_info[:2] >= (3, 14):
raise SkipTest('streamz not compatible')
try:
import streamz # noqa
except ImportError:
Expand Down
Loading