Skip to content

Commit

Permalink
updating index
Browse files Browse the repository at this point in the history
  • Loading branch information
betolink committed Nov 16, 2023
1 parent 8815135 commit ed2d9bc
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 27 deletions.
7 changes: 5 additions & 2 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ website:
contents:
- href: tutorials/cloud/cloud-paradigm.md
text: "NASA and the Cloud"
- href: tutorials/cloud/index.md
- href: tutorials/jupyterhub_demo/jupyterhub_demo.ipynb
text: "CryoCloud"
- section: "Data Discovery and Access"
contents:
Expand All @@ -46,8 +46,11 @@ website:
- section: "GEDI / IS2 Science Tutorial"
contents:
- tutorials/index.md
- href: tutorials/GEDI_data_SSC23.ipynb
- href: tutorials/science/gedi-l4a-agbd.ipynb
text: "GEDI Level 4A Data"
- href: tutorials/science/gedi-data-ssc23.ipynb
text: "GEDI Level 2B V002 Data"



format:
Expand Down
9 changes: 7 additions & 2 deletions tutorials/data-access/earthaccess.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,18 @@
{
"cell_type": "markdown",
"id": "d3b4c9e6",
"metadata": {},
"metadata": {
"tags": [],
"user_expressions": []
},
"source": [
"We are going to import the whole `earthaccess` package.\n",
"\n",
"We will also import the whole `xarray` package but use a standard short name `xr`, using the `import <package> as <short_name>` syntax. We could use anything for a short name but `xr` is an accepted standard that most `xarray` users are familiar with.\n",
"\n",
"We only need the `xarray` module from `hvplot` so we import that using the `import <package>.<module>` syntax."
"We only need the `xarray` module from `hvplot` so we import that using the `import <package>.<module>` syntax.\n",
"\n",
"Since we are going to use a developer version of earthaccess, we are going to install it directly from Github, after executing the next cell we need to restart the kernel."
]
},
{
Expand Down
36 changes: 13 additions & 23 deletions tutorials/data-access/index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,8 @@
"\n",
"The Amazon Global cloud is divided into geographical regions. To have direct access to data stored in a region, our compute instance - a virtual computer that we create to perform processing operations in place of using our own desktop or laptop - must be in the same region as the data. This is a fundamental concept of _analysis in place_. **NASA cloud-hosted data is in Amazon Region us-west2. So your compute instance must also be in us-west2.** If we wanted to use data stored in another region, to use direct access for that data, we would start a compute instance in that region.\n",
"\n",
"As an example data collection, we use ICESat-2 Land Ice Height (ATL06) over the Juneau Icefield, AK, for March 2003. ICESat-2 data granules, including ATL06, are stored in HDF5 format. We demonstrate how to open an HDF5 granule and access data variables using `xarray`. Land Ice Heights are then plotted using `hvplot`. \n",
"\n",
"`earthaccess` is a package developed by Luis Lopez (NSIDC developer) to allow easy search of the NASA Common Metadata Repository (CMR) and download of NASA data collections. It can be used for programmatic search and access for both _DAAC-hosted_ and _cloud-hosted_ data. It manages authenticating using Earthdata Login credentials which are then used to obtain the S3 tokens that are needed for S3 direct access. https://github.com/nsidc/earthaccess\n",
"As an example data collection, we use [ATL08](https://nsidc.org/data/atl08), the L3A Land and Vegetation Height dataset from ICESat-2\n",
" over Bosque de la Primavera, a protected forest near Guadalajara. ICESat-2 data granules, including ATL08, are stored in HDF5 format. We demonstrate how to open an HDF5 granule and access data variables using `xarray` and plotting using `hvplot`.\n",
"\n",
"\n",
"## Import Packages\n",
Expand Down Expand Up @@ -1076,7 +1075,7 @@
"user_expressions": []
},
"source": [
"### Using a region of interest (ROI) \n",
"## **5. Filtering data using a region of interest (ROI)**\n",
"\n",
"Since NASA's Search API allows us to use polygons for our data queries, we can load a KML, geojson or shapefile and parse the geometry to filter our data. In this example we are going to use [Global Forest Watch](https://data.globalforestwatch.org/datasets/gfw::mexico-protected-areas) to download a geojson from Bosque de la Primavera, a protected reserve near Guadalajara Mexico."
]
Expand Down Expand Up @@ -1427,7 +1426,7 @@
"user_expressions": []
},
"source": [
"## Use Direct-Access to open, load and display data stored on S3 \n",
"## **6. Use earthaccess and xarray to download, open and plot data stored on S3**\n",
"\n",
"Direct-access to data from an S3 bucket is a two step process. First, the files are opened using the `open` method. The `auth` object created at the start of the notebook is used to provide Earthdata Login authentication and AWS credentials.\n",
"\n",
Expand Down Expand Up @@ -2005,9 +2004,6 @@
}
],
"source": [
"\n",
"\n",
"\n",
"classification = np.unique(ds[\"classed_pc_flag\"])\n",
"ds['ph_h'].hvplot.scatter(x=\"\", y=\"\", c=ds['classed_pc_flag'].values, cmap=\"tab10\", s=2,)\n",
"\n",
Expand Down Expand Up @@ -2258,16 +2254,18 @@
"id": "0a4335c8",
"metadata": {
"jp-MarkdownHeadingCollapsed": true,
"tags": []
"tags": [],
"user_expressions": []
},
"source": [
"## **3. Learning outcomes recap**\n",
"## **7. Learning outcomes recap**\n",
"\n",
"We have learned how to:\n",
"1. use `earthaccess` to search for ICESat-2 data using spatial and temporal filters and explore search results;\n",
"2. open data granules using direct access to the ICESat-2 S3 bucket;\n",
"3. load a HDF5 group into an xarray.Dataset;\n",
"4. visualize the land ice heights using hvplot."
"\n",
"* use `earthaccess` to search for ICESat-2 data using spatial and temporal filters and explore search results;\n",
"* open data granules using direct access to the ICESat-2 S3 bucket;\n",
"* load a HDF5 group into an xarray.Dataset;\n",
"* visualize the land ice heights using hvplot."
]
},
{
Expand All @@ -2278,7 +2276,7 @@
"user_expressions": []
},
"source": [
"## **4. Additional resources**\n",
"## **8. Additional resources**\n",
"\n",
"For general information about NSIDC DAAC data in the Earthdata Cloud: \n",
"\n",
Expand All @@ -2293,14 +2291,6 @@
"* [Open Altimetry Portal](https://openaltimetry.earthdatacloud.nasa.gov/data/)\n",
"* [earthaccess slides](https://docs.google.com/presentation/d/1g0LU01f_Y6S-ZHnXCzRNCyL0P2w7SQsvu65rw_6ZGaw/edit?usp=sharing)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "6a67c7eb",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit ed2d9bc

Please sign in to comment.