Skip to content

Commit

Permalink
docs: update links & fix warnings (#1402)
Browse files Browse the repository at this point in the history
  • Loading branch information
amaloney authored Jan 29, 2025
1 parent 00220d8 commit d461169
Show file tree
Hide file tree
Showing 13 changed files with 55 additions and 55 deletions.
2 changes: 1 addition & 1 deletion doc/getting_started/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Getting Started
Installation
------------

Datashader supports Python 3.9, 3.10, 3.11 and 3.12 on Linux, Windows, or Mac
Datashader supports Python 3.10, 3.11, 3.12 and 3.13 on Linux, Windows, or Mac
and can be installed with conda::

conda install datashader
Expand Down
4 changes: 2 additions & 2 deletions examples/FAQ.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"If you have a very small number of data points (in the hundreds\n",
"or thousands) or curves (in the tens or several tens, each with\n",
"hundreds or thousands of points), then conventional plotting packages\n",
"like [Bokeh](https://bokeh.pydata.org) may be more suitable. With conventional browser-based\n",
"like [Bokeh](https://bokeh.org) may be more suitable. With conventional browser-based\n",
"packages, all of the data points are passed directly to the browser for\n",
"display, allowing specific interaction with each curve or point,\n",
"including display of metadata, linking to sources, etc. This approach\n",
Expand Down Expand Up @@ -100,5 +100,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
6 changes: 3 additions & 3 deletions examples/getting_started/1_Introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"\n",
"**Datashader turns even the largest datasets into images, faithfully preserving the data's distribution.**\n",
"\n",
"Datashader is an [open-source](https://github.com/bokeh/datashader/) Python library for analyzing and visualizing large datasets. Specifically, Datashader is designed to \"rasterize\" or \"aggregate\" datasets into regular grids that can be analyzed further or viewed as images, making it simple and quick to see the properties and patterns of your data. Datashader can plot a billion points in a second or so on a 16GB laptop, and scales up easily to out-of-core, distributed, or GPU processing for even larger datasets.\n",
"Datashader is an [open-source](https://github.com/holoviz/datashader/) Python library for analyzing and visualizing large datasets. Specifically, Datashader is designed to \"rasterize\" or \"aggregate\" datasets into regular grids that can be analyzed further or viewed as images, making it simple and quick to see the properties and patterns of your data. Datashader can plot a billion points in a second or so on a 16GB laptop, and scales up easily to out-of-core, distributed, or GPU processing for even larger datasets.\n",
"\n",
"This page of the getting-started guide will give a simple example to show how it works, and the following page will show how to use Datashader as a standalone library for generating arrays or images directly\n",
"([Pipeline](2_Pipeline.ipynb)). Next we'll show how to use Datashader as a component in a larger visualization system like [HoloViews](http://holoviews.org) or [Bokeh](http://bokeh.pydata.org) that provides interactive plots with dynamic zooming, labeled axes, and overlays and layouts ([3-Interactivity](3-Interactivity.ipynb)). More detailed information about each topic is then provided in the [User Guide](../user_guide/).\n",
"([Pipeline](2_Pipeline.ipynb)). Next we'll show how to use Datashader as a component in a larger visualization system like [HoloViews](https://holoviews.org) or [Bokeh](https://bokeh.org) that provides interactive plots with dynamic zooming, labeled axes, and overlays and layouts ([3-Interactivity](3-Interactivity.ipynb)). More detailed information about each topic is then provided in the [User Guide](../user_guide/).\n",
"\n",
"## Example: NYC taxi trips\n",
"\n",
Expand Down Expand Up @@ -91,5 +91,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
26 changes: 13 additions & 13 deletions examples/getting_started/2_Pipeline.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Datashader can work many different data objects provided by different data libraries depending on the type of data involved, such as columnar data in [Pandas](http://pandas.pydata.org) or [Dask](http://dask.pydata.org) dataframes, gridded multidimensional array data using [xarray](http://xarray.pydata.org), columnar data on GPUs using [cuDF](https://github.com/rapidsai/cudf), multidimensional arrays on GPUs using [CuPy](https://cupy.chainer.org/), and ragged arrays using [SpatialPandas](https://github.com/holoviz/spatialpandas) (see the [Performance User Guide](../10_Performance.ipynb) for a guide to selecting an appropriate library). Here, we're using a Pandas dataframe, with 50,000 rows by default:"
"Datashader can work many different data objects provided by different data libraries depending on the type of data involved, such as columnar data in [Pandas](https://pandas.pydata.org) or [Dask](https://dask.org) dataframes, gridded multidimensional array data using [xarray](https://xarray.dev), columnar data on GPUs using [cuDF](https://github.com/rapidsai/cudf), multidimensional arrays on GPUs using [CuPy](https://cupy.chainer.org/), and ragged arrays using [SpatialPandas](https://github.com/holoviz/spatialpandas) (see the [Performance User Guide](../10_Performance.ipynb) for a guide to selecting an appropriate library). Here, we're using a Pandas dataframe, with 50,000 rows by default:"
]
},
{
Expand Down Expand Up @@ -177,7 +177,7 @@
"source": [
"### 2D Reductions\n",
"\n",
"One you have determined your mapping, you'll next need to choose a reduction operator to use when aggregating multiple datapoints into a given pixel. For points, each datapoint is mapped into a single pixel, while the other glyphs have spatial extent and can thus map into multiple pixels, each of which operates the same way. All glyphs act like points if the entire glyph is contained within that pixel. Here we will talk only about \"datapoints\" for simplicity, which for an area-based glyph should be interpreted as \"the part of that glyph that falls into this pixel\".\n",
"Once you have determined your mapping, you'll next need to choose a reduction operator to use when aggregating multiple datapoints into a given pixel. For points, each datapoint is mapped into a single pixel, while the other glyphs have spatial extent and can thus map into multiple pixels, each of which operates the same way. All glyphs act like points if the entire glyph is contained within that pixel. Here we will talk only about \"datapoints\" for simplicity, which for an area-based glyph should be interpreted as \"the part of that glyph that falls into this pixel\".\n",
"\n",
"All of the currently supported reduction operators are incremental, which means that we can efficiently process datasets in a single pass. Given an aggregate bin to update (typically corresponding to one eventual pixel) and a new datapoint, the reduction operator updates the state of the bin in some way. (Actually, datapoints are normally processed in batches for efficiency, but it's simplest to think about the operator as being applied per data point, and the mathematical result should be the same.) A large number of useful [reduction operators](https://datashader.org/api.html#reductions) are supplied in `ds.reductions`, including:\n",
"\n",
Expand Down Expand Up @@ -213,7 +213,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The result of will be an [xarray](http://xarray.pydata.org) `DataArray` data structure containing the bin values (typically one value per bin, but more for multiple category or multiple-aggregate operators) along with axis range and type information.\n",
"The result of will be an [xarray](https://xarray.dev) `DataArray` data structure containing the bin values (typically one value per bin, but more for multiple category or multiple-aggregate operators) along with axis range and type information.\n",
"\n",
"We can visualize this array in many different ways by customizing the pipeline stages described in the following sections, but for now we'll simply render images using the default parameters to show the effects of a few different aggregate operators:"
]
Expand Down Expand Up @@ -359,7 +359,7 @@
"\n",
"Now that the data has been projected and aggregated into a 2D or 3D gridded data structure, it can be processed in any way you like, before converting it to an image as will be described in the following section. At this stage, the data is still stored as bin data, not pixels, which makes a very wide variety of operations and transformations simple to express. \n",
"\n",
"For instance, instead of plotting all the data, we can easily plot only those bins in the 99th percentile by count (left), or apply any [NumPy ufunc](http://docs.scipy.org/doc/numpy/reference/ufuncs.html) to the bin values (whether or not it makes any sense!):"
"For instance, instead of plotting all the data, we can easily plot only those bins in the 99th percentile by count (left), or apply any [NumPy ufunc](https://docs.scipy.org/doc/numpy/reference/ufuncs.html) to the bin values (whether or not it makes any sense!):"
]
},
{
Expand Down Expand Up @@ -388,11 +388,11 @@
"metadata": {},
"outputs": [],
"source": [
"sel1 = agg_d3_d5.where(aggc.sel(cat='d3') == aggc.sel(cat='d5')).astype('uint32')\n",
"sel2 = agg.where(aggc.sel(cat='d3') == aggc.sel(cat='d5')).astype('uint32')\n",
"sel1 = agg_d3_d5.where(aggc.sel(cat='d3') == aggc.sel(cat='d5'), other=-1).astype('uint32')\n",
"sel2 = agg.where(aggc.sel(cat='d3') == aggc.sel(cat='d5'), other=-1).astype('uint32')\n",
"\n",
"tf.Images(tf.shade(sel1, name=\"d3+d5 where d3==d5\"),\n",
" tf.shade(sel2, name=\"d1+d2+d3+d4+d5 where d3==d5\"))"
"tf.Images(tf.shade(sel1, name='d3+d5 where d3==d5'),\n",
" tf.shade(sel2, name='d1+d2+d3+d4+d5 where d3==d5'))"
]
},
{
Expand All @@ -408,7 +408,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The [xarray documentation](http://xarray.pydata.org/en/stable/computation.html) describes all the various transformations you can apply from within xarray, and of course you can always extract the data values and operate on them outside of xarray for any transformation not directly supported by xarray, then construct a suitable xarray object for use in the following stage. Once the data is in the aggregate array, you generally don't have to worry much about optimization, because it's a fixed-sized grid regardless of your data size, and so it is very straightforward to apply arbitrary transformations to the aggregates."
"The [xarray documentation](https://docs.xarray.dev/en/stable/user-guide/computation.html) describes all the various transformations you can apply from within xarray, and of course you can always extract the data values and operate on them outside of xarray for any transformation not directly supported by xarray, then construct a suitable xarray object for use in the following stage. Once the data is in the aggregate array, you generally don't have to worry much about optimization, because it's a fixed-sized grid regardless of your data size, and so it is very straightforward to apply arbitrary transformations to the aggregates."
]
},
{
Expand Down Expand Up @@ -782,7 +782,7 @@
"source": [
"#### Colormapping with negative values\n",
"\n",
"The above examples all use positive data values to avoid confusion when there is no colorbar or other explicit indication of a z (color) axis range. Negative values are also supported, in which case for a non-categorical plot you should normally use a [diverging colormap](https://colorcet.holoviz.org/user_guide/Continuous.html#Diverging-colormaps,-for-plotting-magnitudes-increasing-or-decreasing-from-a-central-point:):"
"The above examples all use positive data values to avoid confusion when there is no colorbar or other explicit indication of a z (color) axis range. Negative values are also supported, in which case for a non-categorical plot you should normally use a [diverging colormap](https://colorcet.holoviz.org/user_guide/Continuous.html#diverging-colormaps-for-plotting-magnitudes-increasing-or-decreasing-from-a-central-point)"
]
},
{
Expand All @@ -793,7 +793,7 @@
"source": [
"from colorcet import coolwarm, CET_D8\n",
"dfn = df.copy()\n",
"dfn.val.replace({20:-20, 30:0, 40:-40}, inplace=True)\n",
"dfn[\"val\"] = dfn[\"val\"].replace({20: -20, 30: 0, 40: -40})\n",
"aggn = ds.Canvas().points(dfn,'x','y', agg=ds.mean(\"val\"))\n",
"\n",
"tf.Images(tf.shade(aggn, name=\"Sequential\", cmap=[\"lightblue\",\"blue\"], how=\"linear\"),\n",
Expand Down Expand Up @@ -881,7 +881,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"See [the API docs](https://datashader.org/api.html#transfer-functions) for more details. Image composition operators to provide for the `how` argument of `tf.stack` (e.g. `over` (default), `source`, `add`, and `saturate`) are listed in [composite.py](https://raw.githubusercontent.com/holoviz/datashader/main/datashader/composite.py) and illustrated [here](http://cairographics.org/operators).\n",
"See [the API docs](https://datashader.org/api.html#transfer-functions) for more details. Image composition operators to provide for the `how` argument of `tf.stack` (e.g. `over` (default), `source`, `add`, and `saturate`) are listed in [composite.py](https://raw.githubusercontent.com/holoviz/datashader/main/datashader/composite.py) and illustrated [here](https://cairographics.org/operators).\n",
"\n",
"## Embedding\n",
"\n",
Expand All @@ -896,5 +896,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 1
"nbformat_minor": 4
}
Loading

0 comments on commit d461169

Please sign in to comment.