Skip to content
Open
Show file tree
Hide file tree
Changes from all 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), [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), [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
3 changes: 0 additions & 3 deletions binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ dependencies:
- geopandas>=0.9.0
- xarray>=0.18.2
- networkx>=2.6.3
- intake>=0.6.5
- intake-parquet>=0.2.3
- intake-xarray>=0.5.0
- dask>=2021.3.0
- datashader>=0.6.5
- notebook>=5.4
Expand Down
Binary file removed doc/_static/home/intake.gif
Binary file not shown.
14 changes: 0 additions & 14 deletions doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,20 +156,6 @@ align: center
```

:::
:::{tab-item} Intake
```python
import hvplot.intake
from hvplot.sample_data import catalogue as cat

cat.us_crime.hvplot.line(x='Year', y='Violent Crime rate')
```
```{image} ./_static/home/intake.gif
---
alt: Works with Intake
align: center
---
:::

:::{tab-item} NetworkX
```python
import hvplot.networkx as hvnx
Expand Down
30 changes: 2 additions & 28 deletions doc/ref/data_libraries.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@
"| [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 | ❌ since 1.23.0 | **Deprecated** |\n",
"| [NetworkX](#libraries-networkx) | - | Graph | - | [Different API](api-networkx) |\n"
"| [Streamz](#libraries-streamz) | `hvplot.streamz` | Streaming | ✅ | |\n",
"| [NetworkX](#libraries-networkx) | - | Graph | - | [Different API](api-networkx) |\n"
]
},
{
Expand Down Expand Up @@ -591,31 +590,6 @@
"ds['A'].hvplot.image(height=150)"
]
},
{
"cell_type": "markdown",
"id": "2530f2da-2287-43d7-998d-bfb3eeb64d80",
"metadata": {},
"source": [
"## Catalog"
]
},
{
"cell_type": "markdown",
"id": "55668697-f5f5-40e6-9fd2-f023bea3e9dc",
"metadata": {},
"source": [
"(libraries-intake)=\n",
"### Intake"
]
},
{
"cell_type": "markdown",
"id": "7c01a461-5c22-48a3-b5e1-a2a3716c5bf4",
"metadata": {},
"source": [
"`.hvplot()` supports [Intake](https://github.com/intake/intake) `DataSource` objects."
]
},
{
"cell_type": "markdown",
"id": "111f4441-f5b2-4355-92aa-de79c4fe30c7",
Expand Down
4 changes: 2 additions & 2 deletions doc/tutorials/getting_started.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
"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 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 streamz networkx scipy spatialpandas pooch rasterio fiona plotly matplotlib hvsampledata jupyterlab\n",
"```\n"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions doc/user_guide/Introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"* [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",
"* [Intake](https://github.com/ContinuumIO/intake): DataSource (data catalogues)\n",
"* [Streamz](https://streamz.readthedocs.io): DataFrame(s), Series(s) (streaming columnar data)\n",
"* [GeoPandas](https://geopandas.org): GeoDataFrame (geometry data)\n",
"* [NetworkX](https://networkx.github.io/documentation/stable/): Graph (network graphs)\n",
"\n",
Expand Down Expand Up @@ -118,7 +118,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"This interactive plot makes it much easier to explore the properties of the data, without having to write code to select ranges, columns, or data values manually. Note that while pandas, dask and xarray all use the `.hvplot` method, `intake` uses hvPlot as its main plotting API, which means that is available using `.plot()`."
"This interactive plot makes it much easier to explore the properties of the data, without having to write code to select ranges, columns, or data values manually."
]
},
{
Expand Down
10 changes: 10 additions & 0 deletions hvplot/intake.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
import warnings

from packaging.version import Version

from . import hvPlot, post_patch, _module_extensions
from .util import _find_stack_level

warnings.warn(
'hvplot.intake is deprecated and will be removed in a future version. '
'Use pandas, xarray, or other supported libraries to read your data directly.',
FutureWarning,
stacklevel=_find_stack_level(),
)


def patch(name='hvplot', extension='bokeh', logo=False):
Expand Down
33 changes: 33 additions & 0 deletions hvplot/tests/testdeprecations.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
Tests for deprecation warnings.
"""

import os
import sys
import importlib
import tempfile
import pandas as pd
import pytest

from hvplot import hvPlot
from hvplot.converter import HoloViewsConverter
from hvplot.plotting import plot
from hvplot.tests.util import makeDataFrame
Expand Down Expand Up @@ -54,3 +57,33 @@ def test_sample_data_deprecation():
with pytest.warns(FutureWarning):
importlib.import_module('hvplot.sample_data')
sys.modules.pop('hvplot.sample_data', None)


def test_intake_deprecation():
pytest.importorskip('intake')
with pytest.warns(FutureWarning):
importlib.import_module('hvplot.intake')
sys.modules.pop('hvplot.intake', None)


def test_intake_datasource_hvplot_deprecation(disable_param_warnings_as_exceptions):
intake = pytest.importorskip('intake')

from intake.source.base import DataSource

# Patch .hvplot onto DataSource manually to avoid importing hvplot.intake,
# which fires its own separate FutureWarning and would pollute this test.
if not hasattr(DataSource, 'hvplot'):
DataSource.hvplot = property(lambda self: hvPlot(self))

df = pd.DataFrame({'x': [1, 2, 3], 'y': [4, 5, 6]})
with tempfile.NamedTemporaryFile(suffix='.csv', delete=False, mode='w') as f:
df.to_csv(f, index=False)
tmppath = f.name

try:
src = intake.open_csv(tmppath)
with pytest.warns(FutureWarning, match='intake DataSource'):
src.hvplot.line(x='x', y='y')
finally:
os.unlink(tmppath)
7 changes: 7 additions & 0 deletions hvplot/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,13 @@ def support_index(data):


def process_intake(data, use_dask):
warnings.warn(
'Passing an intake DataSource to hvplot is deprecated and will be removed in a '
'future version. '
'Use pandas, xarray, or other supported libraries to read your data first before passing to hvplot.',
FutureWarning,
stacklevel=_find_stack_level(),
)
Comment thread
Azaya89 marked this conversation as resolved.
if data.container not in ('dataframe', 'xarray'):
raise NotImplementedError(
'Plotting interface currently only '
Expand Down
5 changes: 2 additions & 3 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,11 @@ jinja2 = "*"
fugue = "*"
# end fugue
ibis-duckdb = ">=9.0.0" # ibis-framework[duckdb]
intake-parquet = ">=0.2.3"
intake-xarray = ">=0.5.0,<2"
intake = ">=0.6.5,<2.0.0"
ipywidgets = "*"
networkx = ">=2.6.3"
matplotlib = "*"
notebook = ">=5.4"
netcdf4 = "*"
numba = ">=0.51.0"
pillow = ">=8.2.0"
plotly = "*"
Expand Down Expand Up @@ -169,6 +167,7 @@ bokeh_sampledata = "*"
psutil = "*"
cftime = "*"
numpydoc = "*"
intake = ">=0.6.5,<2.0.0" # Kept only for deprecation tests.

[feature.test-example.dependencies]
# Dependencies required to run the examples notebooks.
Expand Down
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,6 @@ examples = [
"fugue[sql]",
"hvplot[fugue-sql]",
"ibis-framework[duckdb]", # ibis-duckdb on conda
"intake-parquet >=0.2.3",
"intake-xarray >=0.5.0,<2",
"intake >=0.6.5,<2.0.0",
"ipywidgets",
"networkx >=2.6.3",
"matplotlib",
Expand Down