{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# SlideRule ATL03 Subsetting: Interactive Tutorial\n", "\n", "SlideRule is an on-demand science data processing service that runs in on Amazon Web Services and responds to REST API calls to process and return science results. SlideRule was designed to enable researchers and other data systems to have low-latency access to custom-generated, high-level, analysis-ready data products using processing parameters supplied at the time of the request. \n", "\n", "[Documentation for using SlideRule](https://slideruleearth.io/rtd) is available from the [project website](https://slideruleearth.io) \n", "\n", "### Background\n", "SlideRule can subset ATL03 geolocated photon height data _on-demand_ and calculate photon classifications to suit different needs.\n", "\n", "### Jupyter and SlideRule\n", "[Jupyter widgets](https://ipywidgets.readthedocs.io) are used to set parameters for the SlideRule API. \n", "\n", "Regions of interest for submitting to SlideRule are drawn on a [ipyleaflet](https://ipyleaflet.readthedocs.io) map. \n", "The results from SlideRule can be displayed on the interactive [ipyleaflet](https://ipyleaflet.readthedocs.io) map along with additional contextual layers." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Load necessary packages" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "tags": [] }, "outputs": [], "source": [ "import warnings\n", "# turn off warnings for demo\n", "warnings.filterwarnings('ignore')# autoreload\n", "\n", "from sliderule import icesat2, ipysliderule, sliderule, io, earthdata\n", "import geopandas\n", "import logging\n", "\n", "%load_ext autoreload\n", "%autoreload 2" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Initiate SlideRule API\n", "- Sets the URL for accessing the SlideRule service\n", "- Builds a table of servers available for processing data" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "tags": [] }, "outputs": [], "source": [ "# set the url for the sliderule service\n", "# set the logging level\n", "icesat2.init(\"slideruleearth.io\", loglevel=logging.WARNING)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Set options for making science data processing requests to SlideRule\n", "\n", "SlideRule can provide different sources for photon classification. This is useful for example in cases using the photon returns to estimate ocean or lake bathymetry, vegetated canopy heights, or ground position in the presence of a vegetated canopy. \n", "- ATL03 photon confidence values, based on algorithm-specific classification types for land, ocean, sea-ice, land-ice, or inland water\n", "- [ATL08 Land and Vegetation Height product](https://nsidc.org/data/atl08) photon classification\n", "- Experimental YAPC (Yet Another Photon Classification) photon-density-based classification" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "tags": [] }, "outputs": [], "source": [ "# display widgets for setting SlideRule parameters\n", "SRwidgets = ipysliderule.widgets()\n", "SRwidgets.set_atl03_defaults()\n", "SRwidgets.VBox(SRwidgets.atl03())" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Interactive Mapping with Leaflet\n", "\n", "Interactive maps within the SlideRule python API are built upon [ipyleaflet](https://ipyleaflet.readthedocs.io).\n", "\n", "#### Leaflet Basemaps and Layers\n", "\n", "There are 3 projections available within SlideRule for mapping ([Global](https://epsg.io/3857), [North](https://epsg.io/5936) and [South](https://epsg.io/3031)). There are also contextual layers available for each projection.\n", "\n", "
Global (Web Mercator, EPSG:3857) | \n", "North (Alaska Polar Stereographic, EPSG:5936) | \n", "South (Antarctic Polar Stereographic, EPSG:3031) | \n", "
---|---|---|
\n",
"
| \n",
" \n",
"
| \n",
" \n", " \n", " | \n", "