diff --git a/README.md b/README.md index 96c118395..f451c50c3 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ | Latest dev release | [![Github tag](https://img.shields.io/github/tag/holoviz/hvplot.svg?label=tag&colorB=11ccbb)](https://github.com/holoviz/hvplot/tags) [![dev-site](https://img.shields.io/website-up-down-green-red/https/pyviz-dev.github.io/hvplot.svg?label=dev%20website)](https://pyviz-dev.github.io/hvplot/) | | 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/) | -| Docs | [![gh-pages](https://img.shields.io/github/last-commit/holoviz/hvplot/gh-pages.svg)](https://github.com/holoviz/hvplot/tree/gh-pages) [![site](https://img.shields.io/website-up-down-green-red/http/hvplot.holoviz.org.svg)](http://hvplot.holoviz.org) | +| Docs | [![gh-pages](https://img.shields.io/github/last-commit/holoviz/hvplot/gh-pages.svg)](https://github.com/holoviz/hvplot/tree/gh-pages) [![site](https://img.shields.io/website-up-down-green-red/http/hvplot.holoviz.org.svg)](https://hvplot.holoviz.org) | | Binder | [![Binder](https://img.shields.io/badge/launch%20v0.8.0-binder-579aca.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFkAAABZCAMAAABi1XidAAAB8lBMVEX///9XmsrmZYH1olJXmsr1ol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HqCu5uvI1n6JuRXI+S1Mco54YmYTwcn6Aeic+kssXi8XpXC4V3t7/ADuTNKaQJdScAAAAAElFTkSuQmCC)](https://mybinder.org/v2/gh/holoviz/hvplot/v0.8.0?urlpath=lab/tree/examples) | | Support | [![Discourse](https://img.shields.io/discourse/status?server=https%3A%2F%2Fdiscourse.holoviz.org)](https://discourse.holoviz.org/c/hvplot/8) | diff --git a/doc/index.md b/doc/index.md index a523af97c..c6ac44c54 100644 --- a/doc/index.md +++ b/doc/index.md @@ -181,7 +181,7 @@ align: center :::: -`.hvplot()` sources its power in the [HoloViz](https://holoviz.org/) ecosystem. With [HoloViews](https://holoviews.org/) you get the ability to easily layout and overlay plots, with [Panel](https://panel.holoviz.org) you can get more interactive control of your plots with widgets, with [DataShader](https://datashader.org/) you can visualize and interactively explore very large data, and with [GeoViews](http://geoviews.org/) you can create geographic plots. +`.hvplot()` sources its power in the [HoloViz](https://holoviz.org/) ecosystem. With [HoloViews](https://holoviews.org/) you get the ability to easily layout and overlay plots, with [Panel](https://panel.holoviz.org) you can get more interactive control of your plots with widgets, with [DataShader](https://datashader.org/) you can visualize and interactively explore very large data, and with [GeoViews](https://geoviews.org/) you can create geographic plots. ::::{tab-set} diff --git a/examples/datasets.yaml b/examples/datasets.yaml index f0c588b0e..c6473b32b 100644 --- a/examples/datasets.yaml +++ b/examples/datasets.yaml @@ -18,7 +18,7 @@ sources: args: urlpath: '{{ CATALOG_DIR }}/data/crime.csv' metadata: - url: https://www.ucrdatatool.gov/Search/Crime/State/StatebyState.cfm + url: https://web.archive.org/web/20201031163816/https://www.ucrdatatool.gov/Search/Crime/State/StatebyState.cfm plots: example: kind: line diff --git a/examples/getting_started/hvplot.ipynb b/examples/getting_started/hvplot.ipynb index dd7f0785c..c24287471 100644 --- a/examples/getting_started/hvplot.ipynb +++ b/examples/getting_started/hvplot.ipynb @@ -8,14 +8,14 @@ "\n", "* [Pandas](https://pandas.pydata.org): DataFrame, Series (columnar/tabular data)\n", "* [Rapids cuDF](https://docs.rapids.ai/api/cudf/stable/): GPU DataFrame, Series (columnar/tabular data)\n", - "* [Dask](https://dask.pydata.org): DataFrame, Series (distributed/out of core arrays and columnar 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", "\n", - "Several of these libraries have the concept of a high-level plotting API that lets a user generate common plot types very easily. The native plotting APIs are generally built on [Matplotlib](http://matplotlib.org), which provides a solid foundation, but it means that users miss out on the benefits of modern, interactive plotting libraries built for the web like [Bokeh](http://bokeh.pydata.org) and [HoloViews](http://holoviews.org).\n", + "Several of these libraries have the concept of a high-level plotting API that lets a user generate common plot types very easily. The native plotting APIs are generally built on [Matplotlib](https://matplotlib.org), which provides a solid foundation, but it means that users miss out on the benefits of modern, interactive plotting libraries built for the web like [Bokeh](https://bokeh.pydata.org) and [HoloViews](https://holoviews.org).\n", "\n", "**hvPlot** provides a high-level plotting API built on HoloViews that provides a general and consistent API for plotting data in all the abovementioned formats. hvPlot can integrate neatly with the individual libraries if an extension mechanism for the native plot APIs is offered, or it can be used as a standalone component." ] @@ -26,7 +26,7 @@ "source": [ "## Basic usage\n", "\n", - "hvPlot provides an alternative for the static plotting API provided by [Pandas](http://pandas.pydata.org) and other libraries, with by default an interactive [Bokeh](http://bokeh.pydata.org)-based plotting API that supports panning, zooming, hovering, and clickable/selectable legends. Let's first create some data." + "hvPlot provides an alternative for the static plotting API provided by [Pandas](https://pandas.pydata.org) and other libraries, with by default an interactive [Bokeh](https://bokeh.pydata.org)-based plotting API that supports panning, zooming, hovering, and clickable/selectable legends. Let's first create some data." ] }, { @@ -115,7 +115,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "When used with [streamz](http://streamz.readthedocs.io) DataFrames, hvPlot can very easily plot streaming data to get a [live updating plot](../user_guide/Streaming.html):" + "When used with [streamz](https://streamz.readthedocs.io) DataFrames, hvPlot can very easily plot streaming data to get a [live updating plot](../user_guide/Streaming.html):" ] }, { @@ -244,7 +244,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "hvPlot is designed to work well in and outside the Jupyter notebook, and thanks to built-in [Datashader](http://datashader.org) support scales easily to millions or even billions of datapoints:\n", + "hvPlot is designed to work well in and outside the Jupyter notebook, and thanks to built-in [Datashader](https://datashader.org) support scales easily to millions or even billions of datapoints:\n", "\n", "" ] diff --git a/examples/user_guide/Customization.ipynb b/examples/user_guide/Customization.ipynb index bc9fbc450..3dffc9ef6 100644 --- a/examples/user_guide/Customization.ipynb +++ b/examples/user_guide/Customization.ipynb @@ -231,7 +231,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "In general, the objects returned by hvPlot are regular HoloViews objects, which can be overlaid, laid out, composed and customized like all other HoloViews objects. The [HoloViews](http://holoviews.org) website explains all the functionality available, but what's on this hvPlot website should be enough to get you up and running for typical usage. " + "In general, the objects returned by hvPlot are regular HoloViews objects, which can be overlaid, laid out, composed and customized like all other HoloViews objects. The [HoloViews](https://holoviews.org) website explains all the functionality available, but what's on this hvPlot website should be enough to get you up and running for typical usage. " ] } ], diff --git a/examples/user_guide/Geographic_Data.ipynb b/examples/user_guide/Geographic_Data.ipynb index 71a725a86..951e9dc4c 100644 --- a/examples/user_guide/Geographic_Data.ipynb +++ b/examples/user_guide/Geographic_Data.ipynb @@ -67,7 +67,7 @@ "source": [ "### Declaring a CRS\n", "\n", - "To declare a geographic plot we have to supply a ``cartopy.crs.CRS`` (or coordinate reference system). Coordinate reference systems are described in the [GeoViews documentation](http://geoviews.org/user_guide/Projections.html) and the full list of available CRSs is in the [cartopy documentation](https://scitools.org.uk/cartopy/docs/v0.15/crs/projections.html). " + "To declare a geographic plot we have to supply a ``cartopy.crs.CRS`` (or coordinate reference system). Coordinate reference systems are described in the [GeoViews documentation](https://geoviews.org/user_guide/Projections.html) and the full list of available CRSs is in the [cartopy documentation](https://scitools.org.uk/cartopy/docs/v0.15/crs/projections.html). " ] }, { @@ -247,7 +247,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "As you can see, hvPlot makes it simple to work with geographic data visually. For more complex plot types and additional details, see the [GeoViews](http://geoviews.org) documentation." + "As you can see, hvPlot makes it simple to work with geographic data visually. For more complex plot types and additional details, see the [GeoViews](https://geoviews.org) documentation." ] }, { diff --git a/examples/user_guide/Gridded_Data.ipynb b/examples/user_guide/Gridded_Data.ipynb index 0e87839ed..b17653890 100644 --- a/examples/user_guide/Gridded_Data.ipynb +++ b/examples/user_guide/Gridded_Data.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "hvPlot provides one API to explore data of many different types. Previous sections have exclusively worked with tabular data stored in pandas (or pandas-like) DataFrames. The other most common type of data are n-dimensional arrays. hvPlot aims to eventually support different array libraries but for now focuses on [xarray](http://xarray.pydata.org/en/stable/). XArray provides a convenient and very powerful wrapper to label the axis and coordinates of multi-dimensional (n-D) arrays. This user guide will cover how to leverage ``xarray`` and ``hvplot`` to visualize and explore data of different dimensionality ranging from simple 1D data, to 2D image-like data, to multi-dimensional cubes of data.\n", + "hvPlot provides one API to explore data of many different types. Previous sections have exclusively worked with tabular data stored in pandas (or pandas-like) DataFrames. The other most common type of data are n-dimensional arrays. hvPlot aims to eventually support different array libraries but for now focuses on [xarray](https://xarray.pydata.org/en/stable/). XArray provides a convenient and very powerful wrapper to label the axis and coordinates of multi-dimensional (n-D) arrays. This user guide will cover how to leverage ``xarray`` and ``hvplot`` to visualize and explore data of different dimensionality ranging from simple 1D data, to 2D image-like data, to multi-dimensional cubes of data.\n", "\n", "For these examples we’ll use the North American air temperature dataset:" ] @@ -263,7 +263,7 @@ "source": [ "## Rasterizing\n", "\n", - "If you are plotting a large amount of data at once, you can consider using the hvPlot interface to [Datashader](http://datashader.org), which can be enabled simply by setting `rasterize=True`.\n", + "If you are plotting a large amount of data at once, you can consider using the hvPlot interface to [Datashader](https://datashader.org), which can be enabled simply by setting `rasterize=True`.\n", "\n", "Note that by declaring that the data should not be grouped by another coordinate variable, i.e. by setting `groupby=[]`, we can plot all the datapoints, showing us the spread of air temperatures in the dataset:" ] diff --git a/examples/user_guide/Introduction.ipynb b/examples/user_guide/Introduction.ipynb index b6153cd87..825e4dc61 100644 --- a/examples/user_guide/Introduction.ipynb +++ b/examples/user_guide/Introduction.ipynb @@ -8,14 +8,14 @@ "\n", "* [Pandas](https://pandas.pydata.org): DataFrame, Series (columnar/tabular data)\n", "* [Rapids cuDF](https://docs.rapids.ai/api/cudf/stable/): GPU DataFrame, Series (columnar/tabular data)\n", - "* [Dask](https://dask.pydata.org): DataFrame, Series (distributed/out of core arrays and columnar 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", "\n", - "Many of these libraries have the concept of a high-level plotting API that lets a user generate common plot types very easily. The native plotting APIs are generally built on [Matplotlib](http://matplotlib.org), which provides a solid foundation, but means that users miss out the benefits of modern, interactive plotting libraries for the web like [Bokeh](http://bokeh.pydata.org) and [HoloViews](http://holoviews.org).\n", + "Many of these libraries have the concept of a high-level plotting API that lets a user generate common plot types very easily. The native plotting APIs are generally built on [Matplotlib](https://matplotlib.org), which provides a solid foundation, but means that users miss out the benefits of modern, interactive plotting libraries for the web like [Bokeh](https://bokeh.pydata.org) and [HoloViews](https://holoviews.org).\n", "\n", "**hvPlot** provides a high-level plotting API built on HoloViews that provides a general and consistent API for plotting data in all the formats mentioned above.\n", "\n", @@ -101,7 +101,7 @@ "source": [ "## .hvplot()\n", "\n", - "If we instead change `%matplotlib inline` to `import hvplot.pandas` and use the ``df.hvplot`` method, it will now display an interactively explorable [Bokeh](http://bokeh.pydata.org) plot with panning, zooming, hovering, and clickable/selectable legends:" + "If we instead change `%matplotlib inline` to `import hvplot.pandas` and use the ``df.hvplot`` method, it will now display an interactively explorable [Bokeh](https://bokeh.pydata.org) plot with panning, zooming, hovering, and clickable/selectable legends:" ] }, { @@ -148,7 +148,7 @@ "source": [ "## Switching the plotting extension to Matplotlib or Plotly\n", "\n", - "While the default plotting extension of hvPlot is [Bokeh](http://bokeh.pydata.org), it is possible to load either Matplotlib or Plotly with `.extension()` and later switch from a plotting library to another with `.output()`. More information about working with multiple plotting backends can be found in the [plotting extensions guide](Plotting_Extensions.ipynb)." + "While the default plotting extension of hvPlot is [Bokeh](https://bokeh.pydata.org), it is possible to load either Matplotlib or Plotly with `.extension()` and later switch from a plotting library to another with `.output()`. More information about working with multiple plotting backends can be found in the [plotting extensions guide](Plotting_Extensions.ipynb)." ] }, { diff --git a/examples/user_guide/NetworkX.ipynb b/examples/user_guide/NetworkX.ipynb index e1739a0e6..184cdf3c7 100644 --- a/examples/user_guide/NetworkX.ipynb +++ b/examples/user_guide/NetworkX.ipynb @@ -134,7 +134,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "In addition to being able to set scalar style values hvPlot also supports the HoloViews concept of [style mapping](http://holoviews.org/user_guide/Style_Mapping.html#styling-mapping), which uses so called ``dim`` transforms to map attributes of the graph nodes and edges to vary the visual attributes of the plot. For example we might construct a graph with edge weights and node sizes as attributes. The plotting function will extract these attributes which means they can be used to scale visual properties of the plot such as the ``edge_width``, ``edge_color`` or ``node_size``:" + "In addition to being able to set scalar style values hvPlot also supports the HoloViews concept of [style mapping](https://holoviews.org/user_guide/Style_Mapping.html#styling-mapping), which uses so called ``dim`` transforms to map attributes of the graph nodes and edges to vary the visual attributes of the plot. For example we might construct a graph with edge weights and node sizes as attributes. The plotting function will extract these attributes which means they can be used to scale visual properties of the plot such as the ``edge_width``, ``edge_color`` or ``node_size``:" ] }, { @@ -380,7 +380,7 @@ "source": [ "### Circular Tree\n", "\n", - "URL: https://networkx.github.io/documentation/stable/auto_examples/drawing/plot_circular_tree.html" + "URL: https://networkx.org/documentation/stable/auto_examples/graphviz_layout/plot_circular_tree.html" ] }, { @@ -674,7 +674,7 @@ "\n", "This example illustrates the sudden appearance of a giant connected component in a binomial random graph.\n", "\n", - "https://networkx.github.io/documentation/stable/auto_examples/drawing/plot_giant_component.html" + "https://networkx.org/documentation/stable/auto_examples/graphviz_layout/plot_giant_component.html" ] }, { diff --git a/examples/user_guide/Pandas_API.ipynb b/examples/user_guide/Pandas_API.ipynb index 60d94a2db..bc181ed75 100644 --- a/examples/user_guide/Pandas_API.ipynb +++ b/examples/user_guide/Pandas_API.ipynb @@ -943,7 +943,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Formatters can be set using format strings, by declaring bokeh TickFormatters, or using custom functions. See [HoloViews Tick Docs](http://holoviews.org/user_guide/Customizing_Plots.html#Axis-ticks) for more information." + "Formatters can be set using format strings, by declaring bokeh TickFormatters, or using custom functions. See [HoloViews Tick Docs](https://holoviews.org/user_guide/Customizing_Plots.html#Axis-ticks) for more information." ] }, { diff --git a/examples/user_guide/Plotting.ipynb b/examples/user_guide/Plotting.ipynb index b941abfb3..abec3e42e 100644 --- a/examples/user_guide/Plotting.ipynb +++ b/examples/user_guide/Plotting.ipynb @@ -22,9 +22,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "As we learned the hvPlot API closely mirrors the [Pandas plotting API](https://pandas.pydata.org/pandas-docs/stable/visualization.html), but instead of generating static images when used in a notebook, it uses HoloViews to generate either static or dynamically streaming Bokeh plots. Static plots can be used in any context, while streaming plots require a live [Jupyter notebook](http://jupyter.org), a deployed [Bokeh Server app](https://bokeh.pydata.org/en/latest/docs/user_guide/server.html), or a deployed [Panel](https://panel.pyviz.org) app.\n", + "As we learned the hvPlot API closely mirrors the [Pandas plotting API](https://pandas.pydata.org/pandas-docs/stable/visualization.html), but instead of generating static images when used in a notebook, it uses HoloViews to generate either static or dynamically streaming Bokeh plots. Static plots can be used in any context, while streaming plots require a live [Jupyter notebook](https://jupyter.org), a deployed [Bokeh Server app](https://bokeh.pydata.org/en/latest/docs/user_guide/server.html), or a deployed [Panel](https://panel.pyviz.org) app.\n", "\n", - "HoloViews provides an extensive, very rich set of objects along with a powerful set of operations to apply, as you can find out in the [HoloViews User Guide](http://holoviews.org/user_guide/index.html). But here we will focus on the most essential mechanisms needed to make your data visualizable, without having to worry about the mechanics going on behind the scenes.\n", + "HoloViews provides an extensive, very rich set of objects along with a powerful set of operations to apply, as you can find out in the [HoloViews User Guide](https://holoviews.org/user_guide/index.html). But here we will focus on the most essential mechanisms needed to make your data visualizable, without having to worry about the mechanics going on behind the scenes.\n", "\n", "We will be focusing on two different datasets:\n", "\n", @@ -566,7 +566,7 @@ "different plots. Individual plots can be composed using the ``*`` and\n", "``+`` operators, which overlay and compose plots into layouts\n", "respectively. For more information on composing objects, see the\n", - "HoloViews [User Guide](http://holoviews.org/user_guide/Composing_Elements.html).\n", + "HoloViews [User Guide](https://holoviews.org/user_guide/Composing_Elements.html).\n", "\n", "By using these operators we can combine multiple plots into composite plots. A simple example is overlaying two plot types:" ] @@ -603,7 +603,7 @@ "source": [ "## Large data\n", "\n", - "The previous examples summarized the fairly large airline dataset using statistical plot types that aggregate the data into a feasible subset for plotting. We can instead aggregate the data directly into the viewable image using [datashader](http://datashader.org), which provides a rendering of the entire set of raw data available (as far as the resolution of the screen allows). Here we plot the 'airtime' against the 'distance':" + "The previous examples summarized the fairly large airline dataset using statistical plot types that aggregate the data into a feasible subset for plotting. We can instead aggregate the data directly into the viewable image using [datashader](https://datashader.org), which provides a rendering of the entire set of raw data available (as far as the resolution of the screen allows). Here we plot the 'airtime' against the 'distance':" ] }, { diff --git a/examples/user_guide/Plotting_with_Matplotlib.ipynb b/examples/user_guide/Plotting_with_Matplotlib.ipynb index 0e0eff0da..478612534 100644 --- a/examples/user_guide/Plotting_with_Matplotlib.ipynb +++ b/examples/user_guide/Plotting_with_Matplotlib.ipynb @@ -26,9 +26,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "As we learned the hvPlot API closely mirrors the [Pandas plotting API](https://pandas.pydata.org/pandas-docs/stable/visualization.html), but instead of generating static images when used in a notebook, it uses HoloViews to generate either static or dynamically streaming Bokeh plots. Static plots can be used in any context, while streaming plots require a live [Jupyter notebook](http://jupyter.org), a deployed [Bokeh Server app](https://bokeh.pydata.org/en/latest/docs/user_guide/server.html), or a deployed [Panel](https://panel.pyviz.org) app.\n", + "As we learned the hvPlot API closely mirrors the [Pandas plotting API](https://pandas.pydata.org/pandas-docs/stable/visualization.html), but instead of generating static images when used in a notebook, it uses HoloViews to generate either static or dynamically streaming Bokeh plots. Static plots can be used in any context, while streaming plots require a live [Jupyter notebook](https://jupyter.org), a deployed [Bokeh Server app](https://bokeh.pydata.org/en/latest/docs/user_guide/server.html), or a deployed [Panel](https://panel.pyviz.org) app.\n", "\n", - "HoloViews provides an extensive, very rich set of objects along with a powerful set of operations to apply, as you can find out in the [HoloViews User Guide](http://holoviews.org/user_guide/index.html). But here we will focus on the most essential mechanisms needed to make your data visualizable, without having to worry about the mechanics going on behind the scenes.\n", + "HoloViews provides an extensive, very rich set of objects along with a powerful set of operations to apply, as you can find out in the [HoloViews User Guide](https://holoviews.org/user_guide/index.html). But here we will focus on the most essential mechanisms needed to make your data visualizable, without having to worry about the mechanics going on behind the scenes.\n", "\n", "We will be focusing on two different datasets:\n", "\n", @@ -597,7 +597,7 @@ "different plots. Individual plots can be composed using the ``*`` and\n", "``+`` operators, which overlay and compose plots into layouts\n", "respectively. For more information on composing objects, see the\n", - "HoloViews [User Guide](http://holoviews.org/user_guide/Composing_Elements.html).\n", + "HoloViews [User Guide](https://holoviews.org/user_guide/Composing_Elements.html).\n", "\n", "By using these operators we can combine multiple plots into composite plots. A simple example is overlaying two plot types:" ] @@ -634,7 +634,7 @@ "source": [ "## Large data\n", "\n", - "The previous examples summarized the fairly large airline dataset using statistical plot types that aggregate the data into a feasible subset for plotting. We can instead aggregate the data directly into the viewable image using [datashader](http://datashader.org), which provides a rendering of the entire set of raw data available (as far as the resolution of the screen allows). Here we plot the 'airtime' against the 'distance':" + "The previous examples summarized the fairly large airline dataset using statistical plot types that aggregate the data into a feasible subset for plotting. We can instead aggregate the data directly into the viewable image using [datashader](https://datashader.org), which provides a rendering of the entire set of raw data available (as far as the resolution of the screen allows). Here we plot the 'airtime' against the 'distance':" ] }, { diff --git a/examples/user_guide/Plotting_with_Plotly.ipynb b/examples/user_guide/Plotting_with_Plotly.ipynb index af84258b7..3a17d162b 100644 --- a/examples/user_guide/Plotting_with_Plotly.ipynb +++ b/examples/user_guide/Plotting_with_Plotly.ipynb @@ -33,9 +33,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "As we learned the hvPlot API closely mirrors the [Pandas plotting API](https://pandas.pydata.org/pandas-docs/stable/visualization.html), but instead of generating static images when used in a notebook, it uses HoloViews to generate either static or dynamically streaming Bokeh plots. Static plots can be used in any context, while streaming plots require a live [Jupyter notebook](http://jupyter.org), a deployed [Bokeh Server app](https://bokeh.pydata.org/en/latest/docs/user_guide/server.html), or a deployed [Panel](https://panel.pyviz.org) app.\n", + "As we learned the hvPlot API closely mirrors the [Pandas plotting API](https://pandas.pydata.org/pandas-docs/stable/visualization.html), but instead of generating static images when used in a notebook, it uses HoloViews to generate either static or dynamically streaming Bokeh plots. Static plots can be used in any context, while streaming plots require a live [Jupyter notebook](https://jupyter.org), a deployed [Bokeh Server app](https://bokeh.pydata.org/en/latest/docs/user_guide/server.html), or a deployed [Panel](https://panel.pyviz.org) app.\n", "\n", - "HoloViews provides an extensive, very rich set of objects along with a powerful set of operations to apply, as you can find out in the [HoloViews User Guide](http://holoviews.org/user_guide/index.html). But here we will focus on the most essential mechanisms needed to make your data visualizable, without having to worry about the mechanics going on behind the scenes.\n", + "HoloViews provides an extensive, very rich set of objects along with a powerful set of operations to apply, as you can find out in the [HoloViews User Guide](https://holoviews.org/user_guide/index.html). But here we will focus on the most essential mechanisms needed to make your data visualizable, without having to worry about the mechanics going on behind the scenes.\n", "\n", "We will be focusing on two different datasets:\n", "\n", @@ -595,7 +595,7 @@ "different plots. Individual plots can be composed using the ``*`` and\n", "``+`` operators, which overlay and compose plots into layouts\n", "respectively. For more information on composing objects, see the\n", - "HoloViews [User Guide](http://holoviews.org/user_guide/Composing_Elements.html).\n", + "HoloViews [User Guide](https://holoviews.org/user_guide/Composing_Elements.html).\n", "\n", "By using these operators we can combine multiple plots into composite plots. A simple example is overlaying two plot types:" ] @@ -632,7 +632,7 @@ "source": [ "## Large data\n", "\n", - "The previous examples summarized the fairly large airline dataset using statistical plot types that aggregate the data into a feasible subset for plotting. We can instead aggregate the data directly into the viewable image using [datashader](http://datashader.org), which provides a rendering of the entire set of raw data available (as far as the resolution of the screen allows). Here we plot the 'airtime' against the 'distance':" + "The previous examples summarized the fairly large airline dataset using statistical plot types that aggregate the data into a feasible subset for plotting. We can instead aggregate the data directly into the viewable image using [datashader](https://datashader.org), which provides a rendering of the entire set of raw data available (as far as the resolution of the screen allows). Here we plot the 'airtime' against the 'distance':" ] }, { diff --git a/examples/user_guide/Statistical_Plots.ipynb b/examples/user_guide/Statistical_Plots.ipynb index cad903bd5..1be8f11f3 100644 --- a/examples/user_guide/Statistical_Plots.ipynb +++ b/examples/user_guide/Statistical_Plots.ipynb @@ -125,7 +125,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "These plot types can help you make sense of complex datasets. See [holoviews.org](http://holoviews.org) for many other plots and tools that can be used alongside those from hvPlot for other purposes." + "These plot types can help you make sense of complex datasets. See [holoviews.org](https://holoviews.org) for many other plots and tools that can be used alongside those from hvPlot for other purposes." ] } ], diff --git a/examples/user_guide/Streaming.ipynb b/examples/user_guide/Streaming.ipynb index 9a90d1c1d..8cba1babb 100644 --- a/examples/user_guide/Streaming.ipynb +++ b/examples/user_guide/Streaming.ipynb @@ -6,7 +6,7 @@ "source": [ "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](http://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", + "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", "\n", "**All plots generated by the streamz plotting interface dynamically stream data from Python into the web browser. The web version for this page includes *screen captures* of the streaming visualizations, not live streaming data.**\n", "\n", @@ -45,7 +45,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "" + "" ] }, { diff --git a/examples/user_guide/Timeseries_Data.ipynb b/examples/user_guide/Timeseries_Data.ipynb index e8c05272a..e4ebe709f 100644 --- a/examples/user_guide/Timeseries_Data.ipynb +++ b/examples/user_guide/Timeseries_Data.ipynb @@ -164,7 +164,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Note that xarray supports grouping and aggregation using a similar syntax. To learn more about timeseries in xarray, see the [xarray timeseries docs](http://xarray.pydata.org/en/stable/time-series.html)." + "Note that xarray supports grouping and aggregation using a similar syntax. To learn more about timeseries in xarray, see the [xarray timeseries docs](https://xarray.pydata.org/en/stable/time-series.html)." ] } ], diff --git a/examples/user_guide/Viewing.ipynb b/examples/user_guide/Viewing.ipynb index 7aa84657a..618deb318 100644 --- a/examples/user_guide/Viewing.ipynb +++ b/examples/user_guide/Viewing.ipynb @@ -113,7 +113,7 @@ "\n", "\n", "\n", - "For static plots this will simply save a temporary file and open it, however for dynamic and [datashaded](http://datashader.org) plots it will automatically launch a Bokeh server, enabling all the dynamic features.\n", + "For static plots this will simply save a temporary file and open it, however for dynamic and [datashaded](https://datashader.org) plots it will automatically launch a Bokeh server, enabling all the dynamic features.\n", "\n", "" ] diff --git a/examples/user_guide/Widgets.ipynb b/examples/user_guide/Widgets.ipynb index 392b7419b..2d19cc9da 100644 --- a/examples/user_guide/Widgets.ipynb +++ b/examples/user_guide/Widgets.ipynb @@ -162,7 +162,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "To learn more about Panel and how to use it with output from hvPlot, see the [Panel docs on the HoloViews pane](http://panel.pyviz.org/reference/panes/HoloViews.html). To learn more about available widgets, see the Widgets' section of the [Panel Reference Gallery](http://panel.pyviz.org/reference/index.html)." + "To learn more about Panel and how to use it with output from hvPlot, see the [Panel docs on the HoloViews pane](https://panel.pyviz.org/reference/panes/HoloViews.html). To learn more about available widgets, see the Widgets' section of the [Panel Reference Gallery](https://panel.pyviz.org/reference/index.html)." ] } ], diff --git a/hvplot/plotting/core.py b/hvplot/plotting/core.py index c5f18f4d8..67b40079b 100644 --- a/hvplot/plotting/core.py +++ b/hvplot/plotting/core.py @@ -482,8 +482,8 @@ def scatter(self, x=None, y=None, **kwds): References ---------- - - Bokeh: http://docs.bokeh.org/en/latest/docs/user_guide/plotting.html#scatter-markers - - HoloViews: http://holoviews.org/reference/elements/matplotlib/Scatter.html + - Bokeh: https://docs.bokeh.org/en/latest/docs/user_guide/plotting.html#scatter-markers + - HoloViews: https://holoviews.org/reference/elements/matplotlib/Scatter.html - Pandas: https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.plot.scatter.html - Plotly: https://plotly.com/python/line-and-scatter/ - Matplotlib: https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.scatter.html @@ -534,8 +534,8 @@ def area(self, x=None, y=None, y2=None, stacked=True, **kwds): References ---------- - - Bokeh: http://docs.bokeh.org/en/latest/docs/user_guide/plotting.html#directed-areas - - HoloViews: http://holoviews.org/reference/elements/matplotlib/Area.html + - Bokeh: https://docs.bokeh.org/en/latest/docs/user_guide/plotting.html#directed-areas + - HoloViews: https://holoviews.org/reference/elements/matplotlib/Area.html - Pandas: https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.plot.area.html - Plotly: https://plotly.com/python/filled-area-plots/ - Matplotlib: https://matplotlib.org/stable/gallery/lines_bars_and_markers/fill_between_demo.html @@ -709,7 +709,7 @@ def heatmap(self, x=None, y=None, C=None, colorbar=True, **kwds): References ---------- - - Bokeh: http://docs.bokeh.org/en/latest/docs/gallery/categorical_heatmap.html + - Bokeh: https://docs.bokeh.org/en/latest/docs/gallery/categorical_heatmap.html - HoloViews: https://holoviews.org/reference/elements/bokeh/HeatMap.html - Matplotlib: https://matplotlib.org/stable/gallery/images_contours_and_fields/image_annotated_heatmap.html - Plotly: https://plotly.com/python/heatmaps/ diff --git a/hvplot/tests/test_links.py b/hvplot/tests/test_links.py index 4a4e25ad5..feced6fe3 100644 --- a/hvplot/tests/test_links.py +++ b/hvplot/tests/test_links.py @@ -1,32 +1,70 @@ -"""Urls in docstrings etc. should be valid""" +"""Urls in docstrings etc. should be valid and secure, i.e. + +- exist, i.e. provide a 200 response +- use https:// instead of http:// unless + - https:// is not supported by the web site + - https:// cannot be used. For example in SVGs. +""" import pathlib import re from concurrent.futures import ThreadPoolExecutor, as_completed from urllib.request import urlopen +import glob import pytest -URL_REGEX = r"(?i)\b((?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'\".,<>?«»“”‘’]))" +# Note: The regex will find urls from code cells in notebooks ending with '\\' because the are really inside \"some_url\" +URL_REGEX = r"(?i)\b((?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'\".,<>?«»“”‘’]))" # pylint: disable=line-too-long ROOT = pathlib.Path(__file__).parent PACKAGE_ROOT = ROOT.parent MAX_WORKERS = 10 +POST_FIXES = [".py", ".ipynb", ".md", ".yaml"] +SKIP_URLS = [ + "https://anaconda.org/anaconda/hvplot", + "https://anaconda.org/conda-forge/hvplot", + "https://anaconda.org/pyviz/hvplot", + "https://creativecommons.org/publicdomain/zero/1.0/", + "https://github.com/rasterio/rasterio", + "https://www.dask.org", + "pyproject.toml/equivalent", +] def _get_files_to_check(): - return [PACKAGE_ROOT / "plotting" / "core.py"] + for post_fix in POST_FIXES: + for file in glob.glob("**/*" + post_fix, recursive=True): + yield pathlib.Path(file) + + +FIXTURES = [pytest.param(file, id=str(file)) for file in _get_files_to_check()] -FIXTURES = [pytest.param(file, id=file.name) for file in _get_files_to_check()] +def _skip_url(url: str): + if url in SKIP_URLS: + return True + if url.startswith("https://github.com/holoviz/hvplot/pull/"): + return True + if url.startswith("https://img.shields.io"): + return True + if url.startswith("assets.holoviews.org/data/"): + return True + if url.startswith("Math.PI"): + return True + return False +def _clean_url(url: str): + if url.endswith("\\"): + return url[0:-1] + return url def _find_urls(text): url = re.findall(URL_REGEX, text) - return set(x[0] for x in url) + return set(_clean_url(x[0]) for x in url if not _skip_url(x[0])) -def _url_exists(url): - return urlopen(url).status == 200 +def _request_a_response(url): + return urlopen(url) def _verify_urls(urls): @@ -35,16 +73,20 @@ def _verify_urls(urls): with ThreadPoolExecutor(max_workers=MAX_WORKERS) as executor: futures = {} for url in urls: - futures[executor.submit(_url_exists, url)] = url + futures[executor.submit(_request_a_response, url)] = url for future in as_completed(futures): url = futures[future] try: - if not _url_exists(url): - raise ValueError(f"The url {url} did not respond with status 200.") - except Exception as ex: # pylint: disable=broad-except - raise ValueError(f"The url {url} did not respond with status 200.") from ex - return True + result = future.result() + except Exception as ex: + raise ValueError(f"The url {url} raised an exception") from ex + if not result.status == 200: + raise ValueError( + f"The url {url} responded with status {result.status}, not 200." + ) + + return True # @pytest.mark.parametrize(["file"], FIXTURES)