Skip to content

Commit

Permalink
Merge pull request #267 from NASA-Openscapes/add-data-stories
Browse files Browse the repository at this point in the history
Update Tutorials with Data Stories
  • Loading branch information
jules32 authored Nov 28, 2023
2 parents d4393e0 + 01bf889 commit 5a178c6
Show file tree
Hide file tree
Showing 11 changed files with 12,630 additions and 38 deletions.
20 changes: 2 additions & 18 deletions _import/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,36 +95,20 @@
"target": "setup.md",
"process": false
},
{
"title": "Obtaining NASA Earthdata from Different Disciplines and Data Centers",
"preamble": "This notebook was originally developed at GES DISC.",
"source": "https://github.com/nasa/gesdisc-tutorials",
"url": "https://raw.githubusercontent.com/nasa/gesdisc-tutorials/main/cloud-tutorials/notebooks/How_to_Perform_Cross-DAAC_S3_Bucket_Access_Using_Python.ipynb",
"target": "How_to_Perform_Cross-DAAC_S3_Bucket_Access_Using_Python.ipynb",
"process": false
},
{
"title": "Sea Level Rise",
"preamble": "This notebook was originally developed by Luis Lopez.",
"source": "https://github.com/betolink/earthaccess-gallery",
"url": "https://raw.githubusercontent.com/betolink/earthaccess-gallery/main/notebooks/Sea_Level_Rise/SSL.ipynb",
"target": "Sea_level_rise_notebook.ipynb",
"process": false
},
{
"title": "ICESat-2 and Landsat in the cloud",
"preamble": "This notebook was originally developed by CryoCloud and NSIDC.",
"source": "https://github.com/CryoInTheCloud/CryoCloudWebsite",
"url": "https://raw.githubusercontent.com/CryoInTheCloud/CryoCloudWebsite/main/book/tutorials/IS2_cloud_Landsat_integration.ipynb",
"target": "IS2_cloud_Landsat_integration.ipynb",
"process": false
"process": true
},
{
"title": "How to work with AppEEARS CSV outputs in the cloud.",
"preamble": "This notebook was originally developed by LP DAAC to show how to work with AppEEARS CSV outputs directly in the cloud.",
"source": "https://github.com/nasa/AppEEARS-Data-Resources",
"url": "https://raw.githubusercontent.com/nasa/AppEEARS-Data-Resources/main/Python/tutorials/Point_Sample_AppEEARS_S3_Direct_Access.ipynb",
"target": "appeears_csv_cloud_access.ipynb",
"process": false
"process": true
}
]
18 changes: 11 additions & 7 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,20 +88,24 @@ website:
contents:
- text: "Earthdata Cloud Clinic"
href: examples/Earthdata-cloud-clinic.ipynb
- text: "Multi-datasets 1"
href: external/How_to_Perform_Cross-DAAC_S3_Bucket_Access_Using_Python.ipynb
- text: "Multi-datasets 2"
- text: "Multi-datasets"
href: tutorials/Hurricanes_Wind_and_Sea_Surface_Temperature.ipynb
- text: "Sea Level Rise"
href: tutorials/Sea_Level_Rise.ipynb
- text: "Carbon Stocks"
href: tutorials/Above_Ground_Biomass_Density.ipynb
- text: "Agriculture Observations"
href: tutorials/Observing_Seasonal_Ag_Changes.ipynb
- text: "ICESat-2"
href: external/IS2_cloud_Landsat_integration.ipynb
- text: "Sea Level Rise: `earthaccess`"
href: external/Sea_level_rise_notebook.ipynb
- text: "Cloud & Non-cloud"
href: tutorials/04_On-Prem_Cloud.ipynb
- text: "`earthaccess` Python library"
href: tutorials/earthaccess-demo.ipynb
- text: "Pygeoweaver Workflow Demo"
href: tutorials/fair-workflow-geoweaver-demo.ipynb
- text: "OPeNDAP Access"
href: tutorials/Earthdata_Cloud__Data_Access_OPeNDAP_Example.ipynb
- text: "Pygeoweaver Workflow Demo"
href: tutorials/fair-workflow-geoweaver-demo.ipynb
- section: "Workshops & Hackathons"
href: workshops/index.qmd
contents:
Expand Down
4 changes: 2 additions & 2 deletions examples/Earthdata-cloud-clinic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4291,7 +4291,7 @@
"\n",
"First, we need to create a Harmony Client, which is what we will interact with to submit and inspect a data request to Harmony, as well as to retrieve results.\n",
"\n",
"When creating the Client, we need to provide Earthdata Login credentials. This basic line below assumes that we have a `.netrc` available. See the Earthdata Cloud Cookbook [appendix](\"https://nasa-openscapes.github.io/earthdata-cloud-cookbook/appendix/authentication.html\") for more information on [Earthdata Login](\"https://urs.earthdata.nasa.gov/\") and netrc setup. "
"When creating the Client, we need to provide Earthdata Login credentials. This basic line below assumes that we have a `.netrc` available. See the Earthdata Cloud Cookbook [appendix](https://nasa-openscapes.github.io/earthdata-cloud-cookbook/appendix/authentication.html) for more information on [Earthdata Login](https://urs.earthdata.nasa.gov/) and netrc setup. "
]
},
{
Expand Down Expand Up @@ -5113,7 +5113,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.16"
"version": "3.8.13"
}
},
"nbformat": 4,
Expand Down
6 changes: 3 additions & 3 deletions how-tos/access-data/access-cloud-python.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"source": [
"## Direct Access\n",
"\n",
"When you have found the data you want to use, you have two options. You can download the data to work locally, or access the data directly to work in the cloud. This second way of working is called \"_Direct Cloud Access_\" or simply, \"_Direct Access_\". Your compute instance needs to be in Amazon Web Services (AWS) Region `us-west-2` in order for the code to run successfully. We authenticate using a netrc file and an Earthdata Login, see the [appendix](../appendix/authentication.qmd) for more information on [Earthdata Login](https://urs.earthdata.nasa.gov/) and netrc setup.\n",
"When you have found the data you want to use, you have two options. You can download the data to work locally, or access the data directly to work in the cloud. This second way of working is called \"_Direct Cloud Access_\" or simply, \"_Direct Access_\". Your compute instance needs to be in Amazon Web Services (AWS) Region `us-west-2` in order for the code to run successfully. We authenticate using a netrc file and an Earthdata Login, see the [appendix](https://nasa-openscapes.github.io/earthdata-cloud-cookbook/appendix/authentication.html) for more information on [Earthdata Login](https://urs.earthdata.nasa.gov/) and netrc setup.\n",
"\n",
"\n",
"## Python\n",
Expand Down Expand Up @@ -1000,7 +1000,7 @@
"source": [
"## Alternative Access Method without `earthaccess`\n",
"\n",
"An alternative approach to accessing data is outlined in some notebooks in the Appendix! The `earthaccess` package uses these methods for it's back end. See [this GitHub folder](https://github.com/NASA-Openscapes/earthdata-cloud-cookbook/tree/main/appendix/appendix-alternate-in-cloud-access)."
"An alternative approach to accessing data is outlined in some notebooks in the [Earthdata Cloud Cookbook Appendix](https://nasa-openscapes.github.io/earthdata-cloud-cookbook/appendix/authentication.html)! The `earthaccess` package uses these methods for it's back end. See [this GitHub folder](https://github.com/NASA-Openscapes/earthdata-cloud-cookbook/tree/main/appendix/appendix-alternate-in-cloud-access)."
]
}
],
Expand All @@ -1020,7 +1020,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.16"
"version": "3.8.13"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions how-tos/subset.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ execute:

## Python

Install the [harmony-py]("https://github.com/nasa/harmony-py") package:
Install the [harmony-py](https://github.com/nasa/harmony-py) package:

```bash
# Install harmony-py
Expand All @@ -30,7 +30,7 @@ import xarray as xr

### Set up Harmony client and authentication

We will authenticate the following Harmony request using a netrc file. See the [appendix](../appendix/authentication.qmd) for more information on [Earthdata Login](https://urs.earthdata.nasa.gov/) and netrc setup. This basic line below to create a Harmony Client assumes that we have a .netrc available.
We will authenticate the following Harmony request using a netrc file. See the [appendix](https://nasa-openscapes.github.io/earthdata-cloud-cookbook/appendix/authentication.html) for more information on [Earthdata Login](https://urs.earthdata.nasa.gov/) and netrc setup. This basic line below to create a Harmony Client assumes that we have a .netrc available.

```python
harmony_client = Client()
Expand Down
600 changes: 600 additions & 0 deletions tutorials/Above_Ground_Biomass_Density.ipynb

Large diffs are not rendered by default.

82 changes: 82 additions & 0 deletions tutorials/Data_stories_template.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "74ac889e-99ed-41de-9ec7-dffe81d78ac7",
"metadata": {},
"source": [
"# Title\n",
"## Overview\n",
"\n",
"Add Summary of data story/background information needed. 2-5 sentences. \n",
"\n",
"## Learning Objectives\n",
"- enter objective \n",
"- enter objective \n",
"- ...\n",
"\n",
"## Requirements\n",
"### 1. Compute environment - This notebook can **only** be run in an **AWS Cloud instance running in the `us-west-2` region**.\n",
"### 2. Earthdata Login\n",
"An Earthdata Login account is required to access data, as well as discover restricted data, from the NASA Earthdata system. Thus, to access NASA data, you need Earthdata Login. Please visit https://urs.earthdata.nasa.gov to register and manage your Earthdata Login account. This account is free to create and only takes a moment to set up.\n",
"### 3. Additional Requirements\n",
"...\n",
"\n",
"### Install Packages"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "811a21bc-cf2f-47d0-8050-992cc2aca10a",
"metadata": {},
"outputs": [],
"source": [
"import earthaccess\n",
"import xarray as xr"
]
},
{
"cell_type": "markdown",
"id": "65d18415-e44d-4622-a86d-3cb9f3cfd862",
"metadata": {},
"source": [
"We recommend authenticating your Earthdata Login (EDL) information using the `earthaccess` python package as follows:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "bf22b7ed-b1d7-4dc3-8041-984146226387",
"metadata": {},
"outputs": [],
"source": [
"auth = earthaccess.login(strategy=\"netrc\") # works if the EDL login already been persisted to a netrc\n",
"if not auth.authenticated:\n",
" # ask for EDL credentials and persist them in a .netrc file\n",
" auth = earthaccess.login(strategy=\"interactive\", persist=True)"
]
}
],
"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.9.16"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading

0 comments on commit 5a178c6

Please sign in to comment.