From 5ec4089a7fb852446ec29badb8e9b8662e38dd1e Mon Sep 17 00:00:00 2001 From: Jessica Scheick Date: Thu, 7 Nov 2024 15:13:52 -0500 Subject: [PATCH] update tutorial lists and links (#40) --- book/_toc.yml | 39 ++-- .../tutorials/example/tutorial-notebook.ipynb | 216 ------------------ book/tutorials/index.md | 23 +- 3 files changed, 34 insertions(+), 244 deletions(-) delete mode 100644 book/tutorials/example/tutorial-notebook.ipynb diff --git a/book/_toc.yml b/book/_toc.yml index d34a24e..c3dde4f 100644 --- a/book/_toc.yml +++ b/book/_toc.yml @@ -20,24 +20,7 @@ parts: chapters: - file: tutorials/index sections: - - file: tutorials/example/tutorial-notebook - - file: tutorials/open-science/index.md - sections: - - file: tutorials/open-science/data-formats-and-metadata.ipynb - sections: - - file: tutorials/open-science/open_science_lesson.ipynb - - file: tutorials/open-science/licensing.md - - file: tutorials/open-science/archiving.md - - file: tutorials/open-science/resources.md - file: tutorials/cryocloud_demo/CryoCloud_demo.ipynb - - file: tutorials/nb-to-package/index - sections: - - file: tutorials/nb-to-package/OOP_intro - - file: tutorials/nb-to-package/intro - sections: - - file: tutorials/nb-to-package/sample.ipynb - - file: tutorials/nb-to-package/package - - file: tutorials/nb-to-package/community - file: tutorials/mission-overview/icesat-2-mission-overview - file: tutorials/cloud-computing/00-goals-and-outline sections: @@ -48,9 +31,29 @@ parts: - file: tutorials/cloud-computing/atl08_parquet_files/atl08_parquet options: - titlesonly: true - - file: tutorials/mental-health/index + - title: Data Access + url: https://snowex-2024.hackweek.io/tutorials/Data_access/index.html - file: tutorials/data_access/ICESat2_Data_Access_Tutorial.ipynb - file: tutorials/machine-learning/point_cloud_classifier.ipynb + - title: Machine Learning for Snow Studies + url: https://snowex-2024.hackweek.io/tutorials/NN_with_Pytorch/intro.html + - file: tutorials/nb-to-package/index + sections: + - file: tutorials/nb-to-package/OOP_intro + - file: tutorials/nb-to-package/intro + sections: + - file: tutorials/nb-to-package/sample.ipynb + - file: tutorials/nb-to-package/package + - file: tutorials/nb-to-package/community + - file: tutorials/mental-health/index + - file: tutorials/open-science/index.md + sections: + - file: tutorials/open-science/data-formats-and-metadata.ipynb + sections: + - file: tutorials/open-science/open_science_lesson.ipynb + - file: tutorials/open-science/licensing.md + - file: tutorials/open-science/archiving.md + - file: tutorials/open-science/resources.md - caption: Projects chapters: - file: projects/index diff --git a/book/tutorials/example/tutorial-notebook.ipynb b/book/tutorials/example/tutorial-notebook.ipynb deleted file mode 100644 index 5b8e14d..0000000 --- a/book/tutorials/example/tutorial-notebook.ipynb +++ /dev/null @@ -1,216 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "suffering-union", - "metadata": {}, - "source": [ - "# Example tutorial notebook\n", - "\n", - "```{admonition} Learning Objectives\n", - "**This is an example tutorial notebook for UW hackweeks**\n", - "- understand basic Jupyter Book formatting of .ipynb files\n", - "- use an open source Python library [ipyleaflet](https://github.com/jupyter-widgets/ipyleaflet) to create interactive maps\n", - "```\n", - "☝️ This formatting is a Jupyter Book [admonition](https://jupyterbook.org/content/content-blocks.html#notes-warnings-and-other-admonitions), that uses a custom version of Markdown called {term}`MyST`" - ] - }, - { - "cell_type": "markdown", - "id": "649d863c-5ad1-4b9f-9fa0-416ff04396a4", - "metadata": {}, - "source": [ - "## Computing environment\n", - "\n", - "We'll be using the following open source Python libraries in this notebook:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "2a5720d5-d805-4c24-a92e-a2238805cdbf", - "metadata": {}, - "outputs": [], - "source": [ - "import ipyleaflet\n", - "from ipyleaflet import Map, Rectangle, basemaps, basemap_to_tiles, TileLayer, SplitMapControl, Polygon\n", - "\n", - "import ipywidgets\n", - "import datetime\n", - "import re" - ] - }, - { - "cell_type": "markdown", - "id": "d73344a2-f797-4218-a99f-a9db0338f002", - "metadata": {}, - "source": [ - "## Data\n", - "\n", - "We will examine raster images from the [MODIS instrument](https://modis.gsfc.nasa.gov/data/). \"MODIS\" stands for \"MODerate Resolution SpectroRadiometer\". Moderate resolution refers to the fact that MODIS data has at best a 250 meter pixel posting, but single images cover hundreds of kilometers, enabling [daily views of the entire globe](https://worldview.earthdata.nasa.gov/):\n", - "\n", - "\n", - ":::{figure-md} modis\n", - "\"modis\n", - "\n", - "Mosaic MODIS image from the first complete day of coverage, June 30, 2000\n", - ":::\n", - "\n", - "☝️ This formatting is a Jupyter Book [markdown figure](https://jupyterbook.org/content/figures.html#markdown-figures)\n", - "\n", - "Note there are two identical MODIS instruments on separate satellites\n", - "\n", - "| Satellite | Launch date |\n", - "| - | -|\n", - "| Terra | December 18, 1999 | \n", - "| Aqua | May 4, 2002 | " - ] - }, - { - "cell_type": "markdown", - "id": "5b99d916-deb8-4af0-9fce-1e38e5c18d87", - "metadata": {}, - "source": [ - "## Interactive visualization\n", - "\n", - "The ipyleaflet library allows us to create interactive map visualizations. Below we define a geographic bounding box for our area of interest, and plot it on an interactive \"slippy map\"." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "equipped-qualification", - "metadata": {}, - "outputs": [], - "source": [ - "bbox = [-108.3, 39.2, -107.8, 38.8]\n", - "west, north, east, south = bbox\n", - "bbox_ctr = [0.5*(north+south), 0.5*(west+east)]" - ] - }, - { - "cell_type": "markdown", - "id": "stylish-wildlife", - "metadata": {}, - "source": [ - "Display the bounding box on an interactive basemap for context. All the available basemaps can be found in the [ipyleaflet documentation](https://ipyleaflet.readthedocs.io/en/latest/api_reference/basemaps.html)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "durable-strength", - "metadata": {}, - "outputs": [], - "source": [ - "m = Map(center=bbox_ctr, zoom=10)\n", - "rectangle = Rectangle(bounds=((south, west), (north, east))) #SW and NE corners of the rectangle (lat, lon)\n", - "m.add_layer(rectangle)\n", - "m" - ] - }, - { - "cell_type": "markdown", - "id": "handy-watch", - "metadata": {}, - "source": [ - "### NASA GIBS basemap\n", - "\n", - "NASA's [Global Imagery Browse Services (GIBS)](https://earthdata.nasa.gov/eosdis/science-system-description/eosdis-components/gibs) is a great Web Map Tile Service (WMTS) to visualize NASA data as pre-rendered tiled raster images. The NASA [Worldview](https://worldview.earthdata.nasa.gov) web application is a way to explore all GIBS datasets. We can also use ipyleaflet to explore GIBS datasets, like MODIS truecolor images, within a Jupyter Notebook. Use the slider in the image below to reveal the image from 2019-04-25:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "stylish-cincinnati", - "metadata": {}, - "outputs": [], - "source": [ - "m = Map(center=bbox_ctr, zoom=6)\n", - "\n", - "right_layer = basemap_to_tiles(basemaps.NASAGIBS.ModisTerraTrueColorCR, \"2019-04-25\")\n", - "left_layer = TileLayer()\n", - "control = SplitMapControl(left_layer=left_layer, right_layer=right_layer)\n", - "m.add_control(control)\n", - "\n", - "m.add_layer(rectangle)\n", - "\n", - "m" - ] - }, - { - "cell_type": "markdown", - "id": "40bb26cf-5651-4424-bab0-89bdc0b69ff1", - "metadata": {}, - "source": [ - "### Exercise 1\n", - "\n", - "Re-create the map above using different tile layers for both the right and left columns. Label a single point of interest with a marker, such as the city of Grand Junction, Colorado." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "21ccf31e-1919-45c2-9796-26f7bac25520", - "metadata": {}, - "outputs": [], - "source": [ - "# Add your solution for exercise 1 here!" - ] - }, - { - "cell_type": "markdown", - "id": "surrounded-amateur", - "metadata": {}, - "source": [ - "## Summary\n", - "\n", - " 🎉 Congratulations! You've completely this tutorial and have seen how we can add notebook can be formatted, and how to create interactive map visualization with ipyleaflet.\n", - " \n", - "\n", - "```{note}\n", - "You may have noticed Jupyter Book adds some extra formatting features that do not necessarily render as you might expect when *executing* a noteook in Jupyter Lab. This \"admonition\" note is one such example.\n", - "```\n", - "\n", - ":::{warning}\n", - "Jupyter Book is very particular about [Markdown header ordering](https://jupyterbook.org/structure/sections-headers.html?highlight=headers#how-headers-and-sections-map-onto-to-book-structure) to automatically create table of contents on the website. In this tutorial we are careful to use a single main header (#) and sequential subheaders (#, ##, ###, etc.)\n", - ":::" - ] - }, - { - "cell_type": "markdown", - "id": "749f5c79-19d7-48ac-9421-852c3c83cc5f", - "metadata": {}, - "source": [ - "## References\n", - "\n", - "To further explore the topics of this tutorial see the following detailed documentation:\n", - "\n", - "* [Jupyter Book rendering of .ipynb notebooks](https://jupyterbook.org/file-types/notebooks.html)\n", - "* [Jupyter Book guide on writing narrative content](https://jupyterbook.org/content/index.html)\n", - "* [ipyleaflet documentation](https://ipyleaflet.readthedocs.io)" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.1" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/book/tutorials/index.md b/book/tutorials/index.md index 9c55f88..303251e 100644 --- a/book/tutorials/index.md +++ b/book/tutorials/index.md @@ -2,14 +2,17 @@ Hackweek tutorials are learning-oriented and guide participants through a step-wise process with a meaningful outcome. If you are putting together a new tutorial for this event, refer to our [Hackweek Guidebook](https://guidebook.hackweek.io/training/tutorials/index.html). -Below you'll find a table keeping track of all tutorials presented at this event: +Below you'll find a list of tutorials presented at this event: -| Tutorial | Topics | Datasets | Recording Link | -| - | - | - | - | -| [Example Notebook](./example/tutorial-notebook.ipynb) | Jupyter Book formatting, ipyleaflet | n/a | Not recorded | -| [CryoCloud Demo](./cryocloud_demo/CryoCloud_demo.ipynb) | CryoCloud tutorial | n/a | Not recorded | -| [ICESat-2 Mission](./mission-overview/icesat-2-mission-overview.ipynb) | ICESat-2 Mission and Products | n/a | Not recorded | -| [Cloud Computing](./cloud-computing/00-goals-and-outline.ipynb) | Cloud Computing Tutorial | n/a | Not recorded | -| [Notebooks to Packages](./nb-to-package/index.md) | All about Python classes to packages | n/a | Not recorded | -| [ICESat-2 point cloud classification](./machine-learning/point_cloud_classifier.ipynb) | Machine Learning, PyTorch | ATL07 | Not recorded | -| [ICESat-2 Data Access](./data_access/ICESat2_Data_Access_Tutorial.ipynb) | ICESat-2 Data Access: icepyx, sliderule, h5coro | ATL03, ATL06, ATL08 | Not recorded | +| Tutorial | Topics | Datasets | +| - | - | - | +| [CryoCloud Demo](./cryocloud_demo/CryoCloud_demo.ipynb) | CryoCloud tutorial | n/a | +| [ICESat-2 Mission](./mission-overview/icesat-2-mission-overview.ipynb) | ICESat-2 Mission and Products | n/a | +| [Cloud Computing](./cloud-computing/00-goals-and-outline.ipynb) | Cloud Computing Tutorial | n/a | +| [NASA Data Access](https://snowex-2024.hackweek.io/tutorials/Data_access/index.html) | earthaccess, Earthdata, icepyx | n/a | +| [ICESat-2 Data Access](./data_access/ICESat2_Data_Access_Tutorial.ipynb) | icepyx, sliderule, h5coro | ATL03, ATL06, ATL08 | +| [ICESat-2 point cloud classification](./machine-learning/point_cloud_classifier.ipynb) | Machine Learning, PyTorch | ATL07 | +| [Machine Learning for Snow Studies](https://snowex-2024.hackweek.io/tutorials/NN_with_Pytorch/intro.html) | Machine Learning, PyTorch | SnowEx | +| [Notebooks to Packages](./nb-to-package/index.md) | All about Python classes to packages | n/a | +| [Mental Health in the Geosciences](./mental-health/index.md) | Mental Health | n/a | +| [Putting Open-Science into Practice](./open-science/index.md) | Open Science, Licensing, Standards | n/a |