{ "cells": [ { "cell_type": "markdown", "id": "2660dd64-cb8f-4eb6-bac6-c241ac9adcff", "metadata": {}, "source": [ "# Generate publication-ready results\n", "\n", "Compared to simple, interactive matplotlib or other widgets on a Jupyter Notebook, data presentation in a publication-ready format often requires more. For a figure, it should contain rich and adequate information and be self-explanatory with only little help from figure caption or other text. The type and the layers of such a figure are carefully chosen for readers to quickly comprehend. To make a good figure, we almost always have to revisit the code (or any app we use to generate it) and modify its content as many times as necessary. Thus, here we will introduce some tools from a broad ecosystem (such as various plotting libraries) and how to work with them using Jupyter tools for highly-customized figure making and the ease of future modification.\n", "\n", "For geospatial data in Earth science, there has been a growing trend to present them in a form of web map, such as a Google map widget on a html page. This gives users more ways to naviagate through the data and investigate their spatial relationship. The Jupyter tools can help researchers make such a web map with only a few steps.\n", "\n", "```{admonition} Goals\n", ":class: tip\n", "Use an advanced plotting library to generate publication-ready and web map-based figures of this \"ICESat-2 sees glacier crevasses\" study\n", "```\n", "\n", "## Steps\n", "\n", "### Load the data\n", "\n", "Firstly we need to load the results from the {doc}`analysis` section." ] }, { "cell_type": "code", "execution_count": 1, "id": "43961e69-b691-48d7-ada9-b7f5ae4ae1dd", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
<xarray.DataArray (labels: 5, dist_alongtrack: 13686)>\n", "array([[-1.593195e+02, -1.563717e+02, -2.943837e+02, ..., 8.966064e+02,\n", " 9.861824e+02, 8.966960e+02],\n", " [ 1.834177e+01, 1.834177e+01, 1.834173e+01, ..., 1.833335e+01,\n", " 1.833337e+01, 1.833334e+01],\n", " [ 7.863276e+01, 7.863276e+01, 7.863276e+01, ..., 7.864154e+01,\n", " 7.864155e+01, 7.864155e+01],\n", " [ 0.000000e+00, 0.000000e+00, 0.000000e+00, ..., 0.000000e+00,\n", " 0.000000e+00, 0.000000e+00],\n", " [ 3.890027e-06, 3.890028e-06, 2.919054e-06, ..., 5.660091e-06,\n", " 2.919044e-06, 5.660090e-06]])\n", "Coordinates:\n", " * labels (labels) object 'h' 'lon' 'lat' 'q' 'kde'\n", " * dist_alongtrack (dist_alongtrack) float64 1.509e+04 1.509e+04 ... 1.609e+04\n", "Attributes:\n", " dataset: ATL03\n", " glacier: Negribreen\n", " RGT: 594\n", " date: 2019-08-05\n", " kde_bw_method: 0.007
array([[-1.593195e+02, -1.563717e+02, -2.943837e+02, ..., 8.966064e+02,\n", " 9.861824e+02, 8.966960e+02],\n", " [ 1.834177e+01, 1.834177e+01, 1.834173e+01, ..., 1.833335e+01,\n", " 1.833337e+01, 1.833334e+01],\n", " [ 7.863276e+01, 7.863276e+01, 7.863276e+01, ..., 7.864154e+01,\n", " 7.864155e+01, 7.864155e+01],\n", " [ 0.000000e+00, 0.000000e+00, 0.000000e+00, ..., 0.000000e+00,\n", " 0.000000e+00, 0.000000e+00],\n", " [ 3.890027e-06, 3.890028e-06, 2.919054e-06, ..., 5.660091e-06,\n", " 2.919044e-06, 5.660090e-06]])
array(['h', 'lon', 'lat', 'q', 'kde'], dtype=object)
array([15090.214811, 15090.200686, 15090.871387, ..., 16088.333564,\n", " 16088.605281, 16089.040432])
\n", " | lat | \n", "lon | \n", "elev | \n", "kde | \n", "geometry | \n", "
---|---|---|---|---|---|
dist_alongtrack | \n", "\n", " | \n", " | \n", " | \n", " | \n", " |
15094.237983 | \n", "78.632799 | \n", "18.341878 | \n", "330.312836 | \n", "0.000103 | \n", "POINT (18.34188 78.63280) | \n", "
15094.236413 | \n", "78.632799 | \n", "18.341878 | \n", "330.583557 | \n", "0.000102 | \n", "POINT (18.34188 78.63280) | \n", "
15094.237590 | \n", "78.632799 | \n", "18.341878 | \n", "330.367828 | \n", "0.000103 | \n", "POINT (18.34188 78.63280) | \n", "
15094.240338 | \n", "78.632799 | \n", "18.341878 | \n", "329.816895 | \n", "0.000100 | \n", "POINT (18.34188 78.63280) | \n", "
15094.947009 | \n", "78.632805 | \n", "18.341872 | \n", "330.744446 | \n", "0.000107 | \n", "POINT (18.34187 78.63281) | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
15961.124685 | \n", "78.640419 | \n", "18.334298 | \n", "351.996979 | \n", "0.000103 | \n", "POINT (18.33430 78.64042) | \n", "
15961.123505 | \n", "78.640419 | \n", "18.334298 | \n", "352.216827 | \n", "0.000102 | \n", "POINT (18.33430 78.64042) | \n", "
15961.839789 | \n", "78.640425 | \n", "18.334292 | \n", "352.051514 | \n", "0.000102 | \n", "POINT (18.33429 78.64043) | \n", "
15961.840972 | \n", "78.640425 | \n", "18.334292 | \n", "351.754547 | \n", "0.000102 | \n", "POINT (18.33429 78.64043) | \n", "
15961.840184 | \n", "78.640425 | \n", "18.334292 | \n", "351.950104 | \n", "0.000102 | \n", "POINT (18.33429 78.64043) | \n", "
383 rows × 5 columns
\n", "