{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# SlideRule API: Interactive Widget\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", "The SlideRule ICESat-2 plug-in is a cloud-optimized version of the [ATL06 algorithm](https://nsidc.org/sites/nsidc.org/files/technical-references/ICESat2_ATL06_ATBD_r005.pdf) that can process the lower-level [ATL03 geolocated photon height data products](https://nsidc.org/data/atl03) hosted on AWS by the NSIDC DAAC. \n", "\n", "[Documentation for using SlideRule](http://icesat2sliderule.org/rtd) is available from the [project website](http://icesat2sliderule.org) \n", "\n", "### Background\n", "SlideRule creates a simplified version of the [ICESat-2 ATL06 land ice height product](https://nsidc.org/data/atl06) that can be adjusted to suit different needs. SlideRule let's you create customized ICESat-2 segment heights _directly_ from the photon height data anywhere on the globe, _on-demand_ and quickly.\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": {}, "outputs": [], "source": [ "from sliderule import icesat2, ipysliderule, io\n", "import ipywidgets as widgets\n", "import logging\n", "import warnings\n", "# autoreload\n", "%load_ext autoreload\n", "%autoreload 2\n", "# turn off warnings for demo\n", "warnings.filterwarnings('ignore')" ] }, { "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": {}, "outputs": [], "source": [ "# set the url for the sliderule service\n", "# set the logging level\n", "icesat2.init(\"icesat2sliderule.org\", loglevel=logging.WARNING)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Set options for making science data processing requests to SlideRule\n", "\n", "SlideRule follows a streamlined version of the [ATL06 land ice height algorithm](https://nsidc.org/sites/nsidc.org/files/technical-references/ICESat2_ATL06_ATBD_r005.pdf).\n", "\n", "SlideRule also can use different sources for photon classification before calculating the average segment height. \n", "This is useful for example, in cases where there may be a vegetated canopy affecting the spread of the photon returns.\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": {}, "outputs": [], "source": [ "# display widgets for setting SlideRule parameters\n", "SRwidgets = ipysliderule.widgets()\n", "widgets.VBox([\n", " SRwidgets.asset,\n", " SRwidgets.release,\n", " SRwidgets.classification,\n", " SRwidgets.surface_type,\n", " SRwidgets.confidence,\n", " SRwidgets.quality,\n", " SRwidgets.land_class,\n", " SRwidgets.yapc_knn,\n", " SRwidgets.yapc_win_h,\n", " SRwidgets.yapc_win_x,\n", " SRwidgets.yapc_min_ph,\n", " SRwidgets.yapc_weight,\n", " SRwidgets.length,\n", " SRwidgets.step,\n", " SRwidgets.iteration,\n", " SRwidgets.spread,\n", " SRwidgets.count,\n", " SRwidgets.window,\n", " SRwidgets.sigma,\n", "])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Interactive Mapping with Leaflet\n", "\n", "Interactive maps within the SlideRule python API are build 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", "