From e31d1a626648a8abe1f0275011fb4e8cd878efaf Mon Sep 17 00:00:00 2001 From: Marc Lichtman Date: Wed, 23 Oct 2024 01:41:07 -0400 Subject: [PATCH] fixed broken links to xarray-spatial.readthedocs.io (#298) Co-authored-by: Marc Lichtman --- datasets/nasadem/nasadem-example.ipynb | 2 +- quickstarts/storage.ipynb | 2 +- tutorials/coregistration.ipynb | 6 ++--- tutorials/local-tools.ipynb | 20 ++++++++--------- tutorials/ndvi_hotspots.ipynb | 12 +++++----- tutorials/proximity_tools.ipynb | 18 +++++++-------- tutorials/reprojection.ipynb | 2 +- tutorials/surface_analysis.ipynb | 22 +++++++++---------- ...array-spatial_classification-methods.ipynb | 12 +++++----- tutorials/zonal_statistics.ipynb | 10 ++++----- 10 files changed, 53 insertions(+), 53 deletions(-) diff --git a/datasets/nasadem/nasadem-example.ipynb b/datasets/nasadem/nasadem-example.ipynb index 86f7b0e0..6daf4b04 100644 --- a/datasets/nasadem/nasadem-example.ipynb +++ b/datasets/nasadem/nasadem-example.ipynb @@ -167,7 +167,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Now we can generate a shaded relief using [xarray-spatial](https://xarray-spatial.org/user_guide/surface.html)." + "Now we can generate a shaded relief using [xarray-spatial](https://xarray-spatial.readthedocs.io/en/latest/user_guide/surface.html)." ] }, { diff --git a/quickstarts/storage.ipynb b/quickstarts/storage.ipynb index ccbd992a..ea5bdaa3 100755 --- a/quickstarts/storage.ipynb +++ b/quickstarts/storage.ipynb @@ -11,7 +11,7 @@ "\n", "### Compute NDVI\n", "\n", - "We need something to write. To simulate a workload, let's load in a single [NAIP image](https://planetarycomputer.microsoft.com/dataset/naip#Example-Notebook) from the Planetary Computer's data catalog using [rioxarray](https://corteva.github.io/rioxarray/html/rioxarray.html) and compute the NDVI using [xrspatial](https://xarray-spatial.org/reference/_autosummary/xrspatial.multispectral.ndvi.html)." + "We need something to write. To simulate a workload, let's load in a single [NAIP image](https://planetarycomputer.microsoft.com/dataset/naip#Example-Notebook) from the Planetary Computer's data catalog using [rioxarray](https://corteva.github.io/rioxarray/html/rioxarray.html) and compute the NDVI using [xrspatial](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.multispectral.ndvi.html)." ] }, { diff --git a/tutorials/coregistration.ipynb b/tutorials/coregistration.ipynb index 7579f28a..dd94e92a 100755 --- a/tutorials/coregistration.ipynb +++ b/tutorials/coregistration.ipynb @@ -15,7 +15,7 @@ "- Reprojecting and resampling [Sentinel-2 Level-2A](https://planetarycomputer.microsoft.com/dataset/sentinel-2-l2a) and [Landsat Collection 2 Level-2\n", "](https://planetarycomputer.microsoft.com/dataset/landsat-c2-l2) data to use a common resolution and coordinate system\n", "- Croping to the region of interest and aligning Sentinel and Landsat data into a single dataset\n", - "- Calculating and comparing NDVIs with [xarray-spatial](https://xarray-spatial.org/index.html)" + "- Calculating and comparing NDVIs with [xarray-spatial](https://xarray-spatial.readthedocs.io/en/latest/index.html)" ] }, { @@ -306,7 +306,7 @@ "id": "226cfa5d", "metadata": {}, "source": [ - "To display a preview of the two data sets, use the [xrspatial.multispectral.true_color](https://xarray-spatial.org/reference/_autosummary/xrspatial.multispectral.true_color.html) function with `sentinel_data` and `landsat_data`." + "To display a preview of the two data sets, use the [xrspatial.multispectral.true_color](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.multispectral.true_color.html) function with `sentinel_data` and `landsat_data`." ] }, { @@ -958,7 +958,7 @@ "source": [ "### Wrap-up: compare NDVI\n", "\n", - "Now let's compute NDVI on the coregistered dataset using [xrspatial.multispectral.ndvi](https://xarray-spatial.org/reference/_autosummary/xrspatial.multispectral.ndvi.html). We'll use the near-infrared band from Sentinel and the red band from Landsat. Because the original datasets both contain Red and near-infrared bands, we can compare the NDVI computed on the co-registered datasets to the NDVIs computed on the original datasets.\n", + "Now let's compute NDVI on the coregistered dataset using [xrspatial.multispectral.ndvi](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.multispectral.ndvi.html). We'll use the near-infrared band from Sentinel and the red band from Landsat. Because the original datasets both contain Red and near-infrared bands, we can compare the NDVI computed on the co-registered datasets to the NDVIs computed on the original datasets.\n", "\n", "First, compute the NVDIs for `sentinel_ndvi` and `landsat_ndvi`." ] diff --git a/tutorials/local-tools.ipynb b/tutorials/local-tools.ipynb index a55f365e..5bd5529b 100644 --- a/tutorials/local-tools.ipynb +++ b/tutorials/local-tools.ipynb @@ -26,7 +26,7 @@ "id": "ea55ffed", "metadata": {}, "source": [ - "In this notebook, we'll demonstrate how to use the [Xarray-spatial](http://xarray-spatial.org/) local tools functions supported by [Numpy](https://numpy.org/). The spatial functions available are:\n", + "In this notebook, we'll demonstrate how to use the [Xarray-spatial](http://xarray-spatial.readthedocs.io/en/latest/index.html) local tools functions supported by [Numpy](https://numpy.org/). The spatial functions available are:\n", "- [Cell Statistics](#Cell-Statistics)\n", "- [Combine](#Combine)\n", "- [Lesser Frequency](#Lesser-Frequency)\n", @@ -143,7 +143,7 @@ "id": "01ab159c", "metadata": {}, "source": [ - "[`xrspatial.local.cell_stats`](https://xarray-spatial.org/reference/_autosummary/xrspatial.local.cell_stats.html) calculates statistics from a raster dataset on a cell-by-cell basis." + "[`xrspatial.local.cell_stats`](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.local.cell_stats.html) calculates statistics from a raster dataset on a cell-by-cell basis." ] }, { @@ -211,7 +211,7 @@ "id": "87c34a83", "metadata": {}, "source": [ - "[`xrspatial.local.combine`](https://xarray-spatial.org/reference/_autosummary/xrspatial.local.combine.html) combines multiple arrays from a raster dataset, assigning a unique output value to each unique combination of raster values." + "[`xrspatial.local.combine`](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.local.combine.html) combines multiple arrays from a raster dataset, assigning a unique output value to each unique combination of raster values." ] }, { @@ -261,7 +261,7 @@ "id": "4f6da50e", "metadata": {}, "source": [ - "[`xrspatial.local.lesser_frequency`](https://xarray-spatial.org/reference/_autosummary/xrspatial.local.lesser_frequency.html) calculates, given a raster dataset, the number of times the data variables values are lower than the values of a given reference data variable on a cell-by-cell basis." + "[`xrspatial.local.lesser_frequency`](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.local.lesser_frequency.html) calculates, given a raster dataset, the number of times the data variables values are lower than the values of a given reference data variable on a cell-by-cell basis." ] }, { @@ -313,7 +313,7 @@ "id": "intelligent-philadelphia", "metadata": {}, "source": [ - "[`xrspatial.local.equal_frequency`](https://xarray-spatial.org/reference/_autosummary/xrspatial.local.equal_frequency.html) calculates, given a raster dataset, the number of times the data variables values are equal than the values of a given reference data variable on a cell-by-cell basis." + "[`xrspatial.local.equal_frequency`](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.local.equal_frequency.html) calculates, given a raster dataset, the number of times the data variables values are equal than the values of a given reference data variable on a cell-by-cell basis." ] }, { @@ -365,7 +365,7 @@ "id": "vocational-inside", "metadata": {}, "source": [ - "[`xrspatial.local.greater_frequency`](https://xarray-spatial.org/reference/_autosummary/xrspatial.local.greater_frequency.html) calculates, given a raster dataset, the number of times the data variables values are greater than the values of a given reference data variable on a cell-by-cell basis." + "[`xrspatial.local.greater_frequency`](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.local.greater_frequency.html) calculates, given a raster dataset, the number of times the data variables values are greater than the values of a given reference data variable on a cell-by-cell basis." ] }, { @@ -417,7 +417,7 @@ "id": "8d7235ec", "metadata": {}, "source": [ - "[`xrspatial.local.lowest_position`](https://xarray-spatial.org/reference/_autosummary/xrspatial.local.lowest_position.html) calculates the data variable index of the lowest value on a cell-by-cell basis." + "[`xrspatial.local.lowest_position`](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.local.lowest_position.html) calculates the data variable index of the lowest value on a cell-by-cell basis." ] }, { @@ -468,7 +468,7 @@ "id": "a17c6e93", "metadata": {}, "source": [ - "[`xrspatial.local.highest_position`](https://xarray-spatial.org/reference/_autosummary/xrspatial.local.highest_position.html) calculates the data variable index of the highest value on a cell-by-cell basis." + "[`xrspatial.local.highest_position`](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.local.highest_position.html) calculates the data variable index of the highest value on a cell-by-cell basis." ] }, { @@ -519,7 +519,7 @@ "id": "e5408cea", "metadata": {}, "source": [ - "[`xrspatial.local.popularity`](https://xarray-spatial.org/reference/_autosummary/xrspatial.local.popularity.html) calculates the number of occurrences of each value of a raster dataset, on a cell-by-cell basis. The output value is assigned based on the reference data variable nth most popular." + "[`xrspatial.local.popularity`](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.local.popularity.html) calculates the number of occurrences of each value of a raster dataset, on a cell-by-cell basis. The output value is assigned based on the reference data variable nth most popular." ] }, { @@ -572,7 +572,7 @@ "id": "385dac65", "metadata": {}, "source": [ - "[`xrspatial.local.rank`](https://xarray-spatial.org/reference/_autosummary/xrspatial.local.rank.html) calculates the rank of each value of a raster dataset, on a cell-by-cell basis. The output value is assigned based on the rank of the reference data variable rank." + "[`xrspatial.local.rank`](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.local.rank.html) calculates the rank of each value of a raster dataset, on a cell-by-cell basis. The output value is assigned based on the rank of the reference data variable rank." ] }, { diff --git a/tutorials/ndvi_hotspots.ipynb b/tutorials/ndvi_hotspots.ipynb index da24c585..6fe84c03 100755 --- a/tutorials/ndvi_hotspots.ipynb +++ b/tutorials/ndvi_hotspots.ipynb @@ -15,7 +15,7 @@ "- Calculate focal statistics of the values within a specified focal neighborhood for each pixel in an input data array\n", "- Identify hot and cold spots in a image, neighborhoods that are significantly different from the rest of the image\n", "\n", - "The focus of this notebook is to analyse information for each pixel based on its focal neighborhood kernel. The [xrspatial.focal](https://xarray-spatial.org/user_guide/focal.html) module from `xarray-spatial` provides a set of analysis tools performing neighborhood operations that will be used through this tutorial." + "The focus of this notebook is to analyse information for each pixel based on its focal neighborhood kernel. The [xrspatial.focal](https://xarray-spatial.readthedocs.io/en/latest/user_guide/focal.html) module from `xarray-spatial` provides a set of analysis tools performing neighborhood operations that will be used through this tutorial." ] }, { @@ -740,7 +740,7 @@ "source": [ "### True color\n", "\n", - "Let's see how the data actually looks by visualizing them with `true_color` function from [xrspatial.multispectral](https://xarray-spatial.org/reference/multispectral.html). To hide the label for x and y axes from sub-plots, we can update `rcParams` for `matplotlib.pyplot` as below:" + "Let's see how the data actually looks by visualizing them with `true_color` function from [xrspatial.multispectral](https://xarray-spatial.readthedocs.io/en/latest/reference/multispectral.html). To hide the label for x and y axes from sub-plots, we can update `rcParams` for `matplotlib.pyplot` as below:" ] }, { @@ -831,7 +831,7 @@ "source": [ "### NDVI\n", "\n", - "NDVI can be calculated with [xarray-spatial](https://xarray-spatial.org/reference/_autosummary/xrspatial.multispectral.ndvi.html). We'll compute the NDVI for each year's image." + "NDVI can be calculated with [xarray-spatial](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.multispectral.ndvi.html). We'll compute the NDVI for each year's image." ] }, { @@ -868,7 +868,7 @@ "source": [ "### Smoothing Images with Focal Mean\n", "\n", - "[`focal.mean`](https://xarray-spatial.org/reference/_autosummary/xrspatial.focal.mean.html) can be used to smooth or reduce noises in an image by a mean reduction to each 3x3 window in an image." + "[`focal.mean`](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.focal.mean.html) can be used to smooth or reduce noises in an image by a mean reduction to each 3x3 window in an image." ] }, { @@ -905,7 +905,7 @@ "source": [ "### Focal statistics\n", "\n", - "In this step, we calculate [focal statistics](https://xarray-spatial.org/user_guide/focal.html#) using a circular kernel for the NDVI data arrays computed above. By default, seven statistics are computed:\n", + "In this step, we calculate [focal statistics](https://xarray-spatial.readthedocs.io/en/latest/user_guide/focal.html#) using a circular kernel for the NDVI data arrays computed above. By default, seven statistics are computed:\n", "\n", "1. Mean\n", "2. Max\n", @@ -1234,7 +1234,7 @@ "\n", "### Next steps\n", "\n", - "To find out more about xarray-spatial focal statistics and other toolsets provided by the library, please visit: https://xarray-spatial.org/index.html" + "To find out more about xarray-spatial focal statistics and other toolsets provided by the library, please visit: https://xarray-spatial.readthedocs.io/en/latest/index.html" ] } ], diff --git a/tutorials/proximity_tools.ipynb b/tutorials/proximity_tools.ipynb index 2950de1f..5b524085 100755 --- a/tutorials/proximity_tools.ipynb +++ b/tutorials/proximity_tools.ipynb @@ -8,12 +8,12 @@ "source": [ "## Proximity tools\n", "\n", - "In this tutorial, you'll learn how to use [Xarray-Spatial's proximity toolset](https://xarray-spatial.org/user_guide/proximity.html) to measure distances between points. You'll focus on an area of the Amazon rainforest around Oriximiná, Brazil, using data from the [European Commission Joint Research Centre's Global Surface Water Dataset](https://planetarycomputer.microsoft.com/dataset/jrc-gsw).\n", + "In this tutorial, you'll learn how to use [Xarray-Spatial's proximity toolset](https://xarray-spatial.readthedocs.io/en/latest/user_guide/proximity.html) to measure distances between points. You'll focus on an area of the Amazon rainforest around Oriximiná, Brazil, using data from the [European Commission Joint Research Centre's Global Surface Water Dataset](https://planetarycomputer.microsoft.com/dataset/jrc-gsw).\n", "\n", "Xarray-Spatial offers three proximity tools:\n", - "* [Proximity Distance](https://xarray-spatial.org/reference/_autosummary/xrspatial.proximity.proximity.html): for each point in the input raster, this tool calculates the distance to the nearest of a set of target points or source points.\n", - "* [Proximity Allocation](https://xarray-spatial.org/reference/_autosummary/xrspatial.proximity.allocation.html): for each cell in the input raster, this tool identifies the nearest source or target point (the 'allocation' point).\n", - "* [Proximity Direction](https://xarray-spatial.org/reference/_autosummary/xrspatial.proximity.direction.html): for each cell in the input raster, this tool returns the direction to the nearest source point (the 'allocation')." + "* [Proximity Distance](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.proximity.proximity.html): for each point in the input raster, this tool calculates the distance to the nearest of a set of target points or source points.\n", + "* [Proximity Allocation](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.proximity.allocation.html): for each cell in the input raster, this tool identifies the nearest source or target point (the 'allocation' point).\n", + "* [Proximity Direction](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.proximity.direction.html): for each cell in the input raster, this tool returns the direction to the nearest source point (the 'allocation')." ] }, { @@ -733,7 +733,7 @@ "source": [ "### Proximity Distance\n", "\n", - "[xrspatial.proximity.proximity](https://xarray-spatial.org/reference/_autosummary/xrspatial.proximity.proximity.html) takes a `values` raster and, for each point in the raster, computes the distance to the closest *target*. By default, all non-zero values in the raster are used as `target` pixels, but you can provide targets manually instead.\n", + "[xrspatial.proximity.proximity](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.proximity.proximity.html) takes a `values` raster and, for each point in the raster, computes the distance to the closest *target*. By default, all non-zero values in the raster are used as `target` pixels, but you can provide targets manually instead.\n", "\n", "The output raster is the same shape as the input, and the values distance to the closest target point (using the `distance_metric`, euclidean by default).\n", "\n", @@ -1213,7 +1213,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "You might wish to set values that are too far from a target value to `NaN`. You can do this by specifying the `max_distance` parameter. We'll set it to the distance between two arbitrary points (using the default [euclidean distance](https://xarray-spatial.org/reference/_autosummary/xrspatial.proximity.euclidean_distance.html))." + "You might wish to set values that are too far from a target value to `NaN`. You can do this by specifying the `max_distance` parameter. We'll set it to the distance between two arbitrary points (using the default [euclidean distance](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.proximity.euclidean_distance.html))." ] }, { @@ -1319,7 +1319,7 @@ "source": [ "### Proximity Allocation\n", "\n", - "Similar to [xrspatial.proximity.proximity](https://xarray-spatial.org/reference/_autosummary/xrspatial.proximity.proximity.html), [xrspatial.proximity.allocation](https://xarray-spatial.org/reference/_autosummary/xrspatial.proximity.allocation.html) takes an aggregate as its input and finds the smallest distance from each cell to any one of the target points or source points. However, instead of returning the distance, [xrspatial.proximity.allocation](https://xarray-spatial.org/reference/_autosummary/xrspatial.proximity.allocation.html) returns the value of the target point for each pixel.\n", + "Similar to [xrspatial.proximity.proximity](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.proximity.proximity.html), [xrspatial.proximity.allocation](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.proximity.allocation.html) takes an aggregate as its input and finds the smallest distance from each cell to any one of the target points or source points. However, instead of returning the distance, [xrspatial.proximity.allocation](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.proximity.allocation.html) returns the value of the target point for each pixel.\n", "\n", "We'll compute the allocation, using `great_circle_distance` as our distance metric." ] @@ -1428,7 +1428,7 @@ "source": [ "### Proximity Direction\n", "\n", - "Finally, we'll use [xrspatial.proximity.direction](https://xarray-spatial.org/reference/_autosummary/xrspatial.proximity.direction.html) to compute the *direction* to the nearest target, rather than the distance. The output values range from 0 to 360, with\n", + "Finally, we'll use [xrspatial.proximity.direction](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.proximity.direction.html) to compute the *direction* to the nearest target, rather than the distance. The output values range from 0 to 360, with\n", "\n", "- 0 is the source cell itself\n", "- 90 is East\n", @@ -1557,7 +1557,7 @@ "source": [ "### Next steps: analyze more datasets\n", "\n", - "Try using Xarray-Spatial's [Proximity Distance](https://xarray-spatial.org/user_guide/proximity.html#Proximity-Distance), [Proximity Allocation](https://xarray-spatial.org/user_guide/proximity.html#Proximity-Allocation), and [Proximity Direction](https://xarray-spatial.org/user_guide/proximity.html#Proximity-Direction) functions with different areas of interest and different assets of the [European Commission Joint Research Centre's Global Surface Water Dataset](https://planetarycomputer.microsoft.com/dataset/jrc-gsw). Or try using these tools with the [USGS GAP/LANDFIRE National Terrestrial Ecosystems dataset](https://planetarycomputer.microsoft.com/dataset/gap) to analyze proximity distances between different kinds of landcovers." + "Try using Xarray-Spatial's [Proximity Distance](https://xarray-spatial.readthedocs.io/en/latest/user_guide/proximity.html#Proximity-Distance), [Proximity Allocation](https://xarray-spatial.readthedocs.io/en/latest/user_guide/proximity.html#Proximity-Allocation), and [Proximity Direction](https://xarray-spatial.readthedocs.io/en/latest/user_guide/proximity.html#Proximity-Direction) functions with different areas of interest and different assets of the [European Commission Joint Research Centre's Global Surface Water Dataset](https://planetarycomputer.microsoft.com/dataset/jrc-gsw). Or try using these tools with the [USGS GAP/LANDFIRE National Terrestrial Ecosystems dataset](https://planetarycomputer.microsoft.com/dataset/gap) to analyze proximity distances between different kinds of landcovers." ] } ], diff --git a/tutorials/reprojection.ipynb b/tutorials/reprojection.ipynb index 7d84e18a..809d2246 100755 --- a/tutorials/reprojection.ipynb +++ b/tutorials/reprojection.ipynb @@ -665,7 +665,7 @@ "id": "ce0571dc", "metadata": {}, "source": [ - "To generate a preview of the reprojected and resampled data, create a true color image with the [xrspatil.multispectral.true_color](https://xarray-spatial.org/reference/_autosummary/xrspatial.multispectral.true_color.html) function. \n", + "To generate a preview of the reprojected and resampled data, create a true color image with the [xrspatil.multispectral.true_color](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.multispectral.true_color.html) function. \n", "\n", "Provide the following parameters:\n", "* the three bands of `red`, `green`, `blue` in your `scene_data`\n", diff --git a/tutorials/surface_analysis.ipynb b/tutorials/surface_analysis.ipynb index 2307fb70..8eb75e13 100755 --- a/tutorials/surface_analysis.ipynb +++ b/tutorials/surface_analysis.ipynb @@ -8,7 +8,7 @@ "source": [ "## Surface tools\n", "\n", - "In this tutorial, you'll learn how to access and use different surface tools available within [Xarray-Spatial](https://github.com/makepath/xarray-spatial) on top of Planetary Computer data. You'll use [Xarray-Spatial's surface tools](https://xarray-spatial.org/user_guide/surface.html) to quantify and visualize terrain landform data of the [Grand Teton National Park](https://www.nps.gov/grte/index.htm) from the [NASADEM](https://aka.ms/ai4edata-nasadem) digital elevation model. \n", + "In this tutorial, you'll learn how to access and use different surface tools available within [Xarray-Spatial](https://github.com/makepath/xarray-spatial) on top of Planetary Computer data. You'll use [Xarray-Spatial's surface tools](https://xarray-spatial.readthedocs.io/en/latest/user_guide/surface.html) to quantify and visualize terrain landform data of the [Grand Teton National Park](https://www.nps.gov/grte/index.htm) from the [NASADEM](https://aka.ms/ai4edata-nasadem) digital elevation model. \n", "\n", "Analyzing and visualizing raster elevation surface data with these tools helps you identify specific patterns that may not be readily apparent in the original surface data. The functions in this example take an [Xarray DataArray](http://xarray.pydata.org/en/stable/generated/xarray.DataArray.html) as their input and also return an Xarray DataArray that you can further process with familiar tools like NumPy or pandas.\n", "\n", @@ -707,9 +707,9 @@ "\n", "#### Hillshade\n", "\n", - "With Xarray-Spatial's [hillshade](https://xarray-spatial.org/reference/_autosummary/xrspatial.hillshade.hillshade.html) tool, you can visualize terrain as a [shaded relief](https://en.wikipedia.org/wiki/Terrain_cartography#Shaded_relief). The shading of each cell within the raster data is based on a hypothetical light source. The output is based on each cell's orientation towards the simulated light source. Key components of this analysis include illumination source, angle, and shadows along with slope and aspect. \n", + "With Xarray-Spatial's [hillshade](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.hillshade.hillshade.html) tool, you can visualize terrain as a [shaded relief](https://en.wikipedia.org/wiki/Terrain_cartography#Shaded_relief). The shading of each cell within the raster data is based on a hypothetical light source. The output is based on each cell's orientation towards the simulated light source. Key components of this analysis include illumination source, angle, and shadows along with slope and aspect. \n", "\n", - "Apply [hillshade](https://xarray-spatial.org/reference/_autosummary/xrspatial.hillshade.hillshade.html) to the elevation raster data. Note that the return values of `hillshade` and other tools provided in Xarray-Spatial's surface toolsets are of the same type as the input type. Since you supply a Dask-backed DataArray, you'll get the hillshaded result as a non-computed Dask-backed DataArray." + "Apply [hillshade](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.hillshade.hillshade.html) to the elevation raster data. Note that the return values of `hillshade` and other tools provided in Xarray-Spatial's surface toolsets are of the same type as the input type. Since you supply a Dask-backed DataArray, you'll get the hillshaded result as a non-computed Dask-backed DataArray." ] }, { @@ -1300,9 +1300,9 @@ "#### Slope\n", "[Slope](https://en.wikipedia.org/wiki/Slope) is a measure of the inclination of a surface. In geography, *slope* is the rate of change in elevation for an area in a terrain relative to its surroundings.\n", "\n", - "Xarray-Spatial's [slope](https://xarray-spatial.org/reference/_autosummary/xrspatial.slope.slope.html) function returns the slope at each cell in degrees.\n", + "Xarray-Spatial's [slope](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.slope.slope.html) function returns the slope at each cell in degrees.\n", "\n", - "Apply [slope](https://xarray-spatial.org/reference/_autosummary/xrspatial.slope.slope.html) to the terrain data and generate a visualization where lighter colors represent higher slope values, and darker colors represent lower slope values:" + "Apply [slope](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.slope.slope.html) to the terrain data and generate a visualization where lighter colors represent higher slope values, and darker colors represent lower slope values:" ] }, { @@ -1353,7 +1353,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "To highlight especially steep slopes, first classify the slope data into nine categories with the [equal_interval](https://xarray-spatial.org/reference/_autosummary/xrspatial.classify.equal_interval.html) function. Then use Datashader's [stack](https://datashader.org/api.html#datashader.transfer_functions.stack) function to combine the resulting raster with the hillshaded and plain terrain rasters from the two previous examples. \n", + "To highlight especially steep slopes, first classify the slope data into nine categories with the [equal_interval](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.classify.equal_interval.html) function. Then use Datashader's [stack](https://datashader.org/api.html#datashader.transfer_functions.stack) function to combine the resulting raster with the hillshaded and plain terrain rasters from the two previous examples. \n", "\n", "This produces an image with the steepest slopes clearly visible in fuchsia and red:" ] @@ -1415,7 +1415,7 @@ "#### Curvature\n", "[Curvature](https://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-analyst-toolbox/curvature.htm) is another derivative of a surface's elevation. Curvature represents the shape of the slope in an area and shows how quickly the slope is increasing or decreasing as you move along the surface of a raster data set. \n", "\n", - "The Xarray-Spatial [curvature](https://xarray-spatial.org/reference/_autosummary/xrspatial.curvature.curvature.html) function returns a raster in units one hundredth (1/100) of the scaling factor (z-factor):\n", + "The Xarray-Spatial [curvature](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.curvature.curvature.html) function returns a raster in units one hundredth (1/100) of the scaling factor (z-factor):\n", "\n", "- A positive curvature means the surface is curving up (upwardly convex) at that cell. \n", "- A negative curvature means the surface is curving down (downwardly convex) at that cell. \n", @@ -1423,7 +1423,7 @@ "\n", "Reasonably expected values in the curvature raster for a hilly area (moderate relief) would be between -0.5 and 0.5, while for steep, rugged mountains (extreme relief), these can range as far as -4 and 4. For certain raster surfaces, even more extreme numbers are possible.\n", "\n", - "Apply the [curvature](https://xarray-spatial.org/reference/_autosummary/xrspatial.curvature.curvature.html) function to the elevation raster from earlier:" + "Apply the [curvature](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.curvature.curvature.html) function to the elevation raster from earlier:" ] }, { @@ -1493,9 +1493,9 @@ "\n", "[Aspect](https://en.wikipedia.org/wiki/Aspect_(geography)) represents the orientation of a slope in a terrain. Aspect is measured clockwise in degrees ranging from 0 to 360. An aspect value of 0 means the slope is north-facing, 90 means east-facing, 180 means south-facing, and 270 means west-facing.\n", "\n", - "The Xarray-Spatial [aspect](https://xarray-spatial.org/reference/_autosummary/xrspatial.aspect.aspect.html) function returns the aspect in degrees for each cell in an elevation terrain. This information can help determine which areas can potentially be exposed to sunlight at what time, for example.\n", + "The Xarray-Spatial [aspect](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.aspect.aspect.html) function returns the aspect in degrees for each cell in an elevation terrain. This information can help determine which areas can potentially be exposed to sunlight at what time, for example.\n", "\n", - "Apply the [aspect](https://xarray-spatial.org/reference/_autosummary/xrspatial.aspect.aspect.html) function to the terrain data and Datashader's [stack](https://datashader.org/api.html#datashader.transfer_functions.stack) function to combine the aspect data with the hillshaded and plain terrain data." + "Apply the [aspect](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.aspect.aspect.html) function to the terrain data and Datashader's [stack](https://datashader.org/api.html#datashader.transfer_functions.stack) function to combine the aspect data with the hillshaded and plain terrain data." ] }, { @@ -1549,7 +1549,7 @@ "source": [ "### Next steps: analyze more datasets\n", "\n", - "Try using Xarray-Spatial's [hillshade](https://xarray-spatial.org/reference/_autosummary/xrspatial.hillshade.hillshade.html), [slope](https://xarray-spatial.org/reference/_autosummary/xrspatial.slope.slope.html), [curvature](https://xarray-spatial.org/reference/_autosummary/xrspatial.curvature.curvature.html), and [aspect](https://xarray-spatial.org/reference/_autosummary/xrspatial.aspect.aspect.html) functions with terrain landform data from a different area of interest. Or try using these tools with the [USGS 3DEP Seamless DEMs](https://planetarycomputer.microsoft.com/dataset/3dep-seamless), a different elevation dataset available from the [Planetary Computer Data Catalog](https://planetarycomputer.microsoft.com/catalog)." + "Try using Xarray-Spatial's [hillshade](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.hillshade.hillshade.html), [slope](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.slope.slope.html), [curvature](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.curvature.curvature.html), and [aspect](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.aspect.aspect.html) functions with terrain landform data from a different area of interest. Or try using these tools with the [USGS 3DEP Seamless DEMs](https://planetarycomputer.microsoft.com/dataset/3dep-seamless), a different elevation dataset available from the [Planetary Computer Data Catalog](https://planetarycomputer.microsoft.com/catalog)." ] } ], diff --git a/tutorials/xarray-spatial_classification-methods.ipynb b/tutorials/xarray-spatial_classification-methods.ipynb index 2af50aa0..58134180 100755 --- a/tutorials/xarray-spatial_classification-methods.ipynb +++ b/tutorials/xarray-spatial_classification-methods.ipynb @@ -14,7 +14,7 @@ "This tutorial walks you through:\n", "\n", "1. Loading and rendering the area of interest data using the Grand Canyon's latitude and longitude.\n", - "2. Classifying the data using xarray-spatial's [natural breaks](https://xarray-spatial.org/reference/_autosummary/xrspatial.classify.natural_breaks.html), [equal interval](https://xarray-spatial.org/reference/_autosummary/xrspatial.classify.equal_interval.html), [quantile](https://xarray-spatial.org/reference/_autosummary/xrspatial.classify.quantile.html), and [reclassify](https://xarray-spatial.org/reference/_autosummary/xrspatial.classify.reclassify.html) functions.\n", + "2. Classifying the data using xarray-spatial's [natural breaks](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.classify.natural_breaks.html), [equal interval](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.classify.equal_interval.html), [quantile](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.classify.quantile.html), and [reclassify](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.classify.reclassify.html) functions.\n", "\n", "This tutorial uses the [NASADEM](https://github.com/microsoft/AIforEarthDatasets#nasadem) dataset, which provides global topographic data at 1 arc-second (~30m) horizontal resolution. The data is derived primarily from data captured via the [Shuttle Radar Topography Mission](https://www2.jpl.nasa.gov/srtm/) (SRTM) and is stored on Azure Storage in [cloud-optimized GeoTIFF](https://www.cogeo.org/) format. The area of interest roughly covers the Grand Canyon National Park.\n", "\n", @@ -97,7 +97,7 @@ "\n", "#### Classify with `natural_breaks()`\n", "\n", - "Now let's use the [natural breaks](https://xarray-spatial.org/reference/_autosummary/xrspatial.classify.natural_breaks.html) function to classify data with the [Jenks natural breaks classification](http://wiki.gis.com/wiki/index.php/Jenks_Natural_Breaks_Classification) method. This method is designed to distribute data into classes according to clusters that form a \"natural\" group within the data. The algorithm minimizes the average deviation from the class mean while also maximizing the deviation from the means of the other groups. Therefore, it is generally not recommended for data with low variance.\n", + "Now let's use the [natural breaks](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.classify.natural_breaks.html) function to classify data with the [Jenks natural breaks classification](http://wiki.gis.com/wiki/index.php/Jenks_Natural_Breaks_Classification) method. This method is designed to distribute data into classes according to clusters that form a \"natural\" group within the data. The algorithm minimizes the average deviation from the class mean while also maximizing the deviation from the means of the other groups. Therefore, it is generally not recommended for data with low variance.\n", "\n", "The `num_sample` parameter allows you to control how many values to sample while calculating the groupings and has a big impact on performance. Fine-tuning `num_sample` requires an understanding of confidence intervals / margin of error along with general knowledge of the distribution of the data (e.g. are values normally distributed?). For this example we've set `num_samples=20000`." ] @@ -160,7 +160,7 @@ "\n", "#### Classify with `equal_interval()`\n", "\n", - "To classify data into sets based on intervals of equal width, use the [equal interval](https://xarray-spatial.org/reference/_autosummary/xrspatial.classify.equal_interval.html) function. The [equal interval classification](http://wiki.gis.com/wiki/index.php/Equal_Interval_classification) is useful in cases where you want to highlight the relative prevalence of values. As each grouping has the same range, the number of values in each group will differ." + "To classify data into sets based on intervals of equal width, use the [equal interval](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.classify.equal_interval.html) function. The [equal interval classification](http://wiki.gis.com/wiki/index.php/Equal_Interval_classification) is useful in cases where you want to highlight the relative prevalence of values. As each grouping has the same range, the number of values in each group will differ." ] }, { @@ -216,7 +216,7 @@ "source": [ "#### Classify with `quantile()`\n", "\n", - "To classify data based on quantile groups of equal size, use the [quantile](https://xarray-spatial.org/reference/_autosummary/xrspatial.classify.quantile.html) function. With [quantile classification](http://wiki.gis.com/wiki/index.php/Quantile), each class contains the same number of data points. This means that each class is equally represented on the map. However, intervals of uneven sizes can lead to an over-weighting of outliers and other effects." + "To classify data based on quantile groups of equal size, use the [quantile](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.classify.quantile.html) function. With [quantile classification](http://wiki.gis.com/wiki/index.php/Quantile), each class contains the same number of data points. This means that each class is equally represented on the map. However, intervals of uneven sizes can lead to an over-weighting of outliers and other effects." ] }, { @@ -272,7 +272,7 @@ "source": [ "### Use custom bins with `reclassify`\n", "\n", - "To define your own arbitrary bins to classify data, use the [reclassify](https://xarray-spatial.org/reference/_autosummary/xrspatial.classify.reclassify.html) function. This function is helpful to highlight specific sections of your data, for example. Use `reclassify()` to only visualize elevations greater than 2500m:" + "To define your own arbitrary bins to classify data, use the [reclassify](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.classify.reclassify.html) function. This function is helpful to highlight specific sections of your data, for example. Use `reclassify()` to only visualize elevations greater than 2500m:" ] }, { @@ -337,7 +337,7 @@ "\n", "The [Planetary Computer Data Catalog](https://planetarycomputer.microsoft.com/catalog) includes petabytes of environmental monitoring data. All data sets are available in consistent, analysis-ready formats. You can access them through APIs as well as directly via [Azure Storage](https://docs.microsoft.com/en-us/azure/storage/). \n", "\n", - "Try using [xarray-spatial's](https://xarray-spatial.org/index.html) classification methods with these datasets:\n", + "Try using [xarray-spatial's](https://xarray-spatial.readthedocs.io/en/latest/index.html) classification methods with these datasets:\n", "\n", "
\n", "
\n", diff --git a/tutorials/zonal_statistics.ipynb b/tutorials/zonal_statistics.ipynb index 09f844b2..95d17c59 100755 --- a/tutorials/zonal_statistics.ipynb +++ b/tutorials/zonal_statistics.ipynb @@ -9,7 +9,7 @@ "source": [ "## Zonal Statistics\n", "\n", - "In this tutorial, you'll learn how to use [xarray-spatial](https://xarray-spatial.org/) to work with zonal statistics. Zonal statistics help you better understand data from one source by analyzing it for different zones defined by another source. This operation uses two datasets: One dataset, the *zones raster*, defines one or more zones. A second dataset, the *values raster*, contains the data you want to analyze for each of the zones defined by the first dataset. If you're familiar with SQL or dataframe libraries like [pandas](https://pandas.pydata.org/), this is similar to a group by operation: you essentially group the *values* raster by the *zones* raster.\n", + "In this tutorial, you'll learn how to use [xarray-spatial](https://xarray-spatial.readthedocs.io/en/latest/index.html) to work with zonal statistics. Zonal statistics help you better understand data from one source by analyzing it for different zones defined by another source. This operation uses two datasets: One dataset, the *zones raster*, defines one or more zones. A second dataset, the *values raster*, contains the data you want to analyze for each of the zones defined by the first dataset. If you're familiar with SQL or dataframe libraries like [pandas](https://pandas.pydata.org/), this is similar to a group by operation: you essentially group the *values* raster by the *zones* raster.\n", "\n", "In this tutorial, we'll use the [Esri / Observatory 10-Meter Land Cover](https://planetarycomputer.microsoft.com/dataset/io-lulc) dataset, which classifies pixels into one of ten classes, as the zones raster. Our values raster will be [Normalized difference vegetation index (NDVI)](https://en.wikipedia.org/wiki/Normalized_difference_vegetation_index), derived from [Sentinel-2 Level 2-A](https://planetarycomputer.microsoft.com/dataset/sentinel-2-l2a).\n", "\n", @@ -1768,7 +1768,7 @@ "id": "c447fbb0-d7ea-4b7b-bd73-632634943ec2", "metadata": {}, "source": [ - "We'll use [xrspatial.zonal.stats](https://xarray-spatial.org/reference/_autosummary/xrspatial.zonal.stats.html) to find a few summary statistics for each landcover class." + "We'll use [xrspatial.zonal.stats](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.zonal.stats.html) to find a few summary statistics for each landcover class." ] }, { @@ -2007,7 +2007,7 @@ "source": [ "### Compute zonal cross-tabulation statistics\n", "\n", - "[xrspatial.zonal.crosstab](https://xarray-spatial.org/reference/_autosummary/xrspatial.zonal.crosstab.html) calculates cross-tabulated areas between the zone raster and value raster. This function requires a 2D zone raster and a categorical value raster of 2D or 3D data. \n", + "[xrspatial.zonal.crosstab](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.zonal.crosstab.html) calculates cross-tabulated areas between the zone raster and value raster. This function requires a 2D zone raster and a categorical value raster of 2D or 3D data. \n", "\n", "The `crosstab` function calculates different cross-tabulation statistics. It has an `agg` parameter to define which aggregation method to use. It returns a DataFrame where each row represents a zone from the zone raster and each column represents a category from the value raster. \n", "\n", @@ -2767,9 +2767,9 @@ "\n", "The [Planetary Computer Data Catalog](https://planetarycomputer.microsoft.com/catalog) includes petabytes of environmental monitoring data. All data sets are available in consistent, analysis-ready formats. You can access them through APIs as well as directly via [Azure Storage](https://docs.microsoft.com/en-us/azure/storage/). \n", "\n", - "Try using [xrspatial.zonal.stats](https://xarray-spatial.org/reference/_autosummary/xrspatial.zonal.stats.html) and [xrspatial.zonal.crosstab](https://xarray-spatial.org/reference/_autosummary/xrspatial.zonal.crosstab.html) with different datasets from the [Data Catalog](https://planetarycomputer.microsoft.com/catalog). For example, try using the land cover categories from the [Esri 10m Land Cover](https://www.arcgis.com/home/item.html?id=d6642f8a4f6d4685a24ae2dc0c73d4ac) dataset as zonal raster. Or try using the [Map of Biodiversity Importance (MoBI)](https://planetarycomputer.microsoft.com/dataset/mobi) dataset as a values raster.\n", + "Try using [xrspatial.zonal.stats](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.zonal.stats.html) and [xrspatial.zonal.crosstab](https://xarray-spatial.readthedocs.io/en/latest/reference/_autosummary/xrspatial.zonal.crosstab.html) with different datasets from the [Data Catalog](https://planetarycomputer.microsoft.com/catalog). For example, try using the land cover categories from the [Esri 10m Land Cover](https://www.arcgis.com/home/item.html?id=d6642f8a4f6d4685a24ae2dc0c73d4ac) dataset as zonal raster. Or try using the [Map of Biodiversity Importance (MoBI)](https://planetarycomputer.microsoft.com/dataset/mobi) dataset as a values raster.\n", "\n", - "There are also [other zonal functions in xarray spatial](https://xarray-spatial.org/reference/zonal.html) to use with your datasets." + "There are also [other zonal functions in xarray spatial](https://xarray-spatial.readthedocs.io/en/latest/reference/zonal.html) to use with your datasets." ] } ],