Skip to content

Commit

Permalink
add minor notes
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfromearth committed Nov 15, 2023
1 parent 8e7c51e commit 33a317b
Showing 1 changed file with 32 additions and 8 deletions.
40 changes: 32 additions & 8 deletions tutorials/Earthdata_Subset_and_Plot.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,12 @@
"date_range = (date_start, date_end)\n",
"bbox = (-127.0761, 31.6444, -113.9039, 42.6310)\n",
"\n",
"# For reference, here is a GeoJSON representing the above bounding box:\n",
"# For reference (e.g., to visualize in https://geojson.io/), here is a GeoJSON representing the above bounding box:\n",
"# {\"type\": \"FeatureCollection\", \"features\": [{\"type\": \"Feature\", \"properties\": {}, \"geometry\": {\"type\": \"LineString\", \"bbox\": [-127.0761, 31.6444, -113.9039, 42.631], \"coordinates\": [[-113.9039, 42.631], [-127.0761,42.631], [-127.0761, 31.6444], [-113.9039, 31.6444], [-113.9039, 42.631]]}}]}\n",
"\n",
"results = earthaccess.search_data(\n",
" concept_id = collection_id,\n",
" #cloud_hosted = True,\n",
" cloud_hosted = True,\n",
" temporal = date_range,\n",
" bounding_box = bbox,\n",
")\n",
Expand Down Expand Up @@ -277,6 +277,19 @@
"We start with a subset that represents the U.S. state of California. Notice the dimensions of the Dataset and each variable."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "29355579-79f2-4ebf-b7d7-5a5c60a59d2e",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"# Display the full dataset's metadata\n",
"ds"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -286,6 +299,7 @@
},
"outputs": [],
"source": [
"# Prepare a subset and display the new dataset's metadata\n",
"ds_subset = ds.sel(time='2023-02-24', lat=slice(31, 43), lon=slice(-125, -113)) \n",
"ds_subset"
]
Expand All @@ -297,7 +311,9 @@
"source": [
"### Plotting\n",
"\n",
"We will first plot using the methods built-in to the `xarray` package."
"We will first plot using the methods built-in to the `xarray` package.\n",
"\n",
"Note that, as opposed to the \"lazy\" loading of metadata previously, this will now perform \"eager\" computation, pulling the required data chunks."
]
},
{
Expand Down Expand Up @@ -883,6 +899,14 @@
"plt.show()"
]
},
{
"cell_type": "markdown",
"id": "777d0a2b-9746-42b0-9c65-56076663da1c",
"metadata": {},
"source": [
"A final note about `harmony-py`: As more transformation services are added and configured to work with existing and new NASA data collections, the capabilities you will be able to harness with `harmony-py` will also grow!"
]
},
{
"cell_type": "markdown",
"id": "4b0f811e-19fd-4269-b9e9-4b97baef1f70",
Expand Down Expand Up @@ -1057,12 +1081,12 @@
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "38a3fd72-b963-4ad3-a4b2-5124fdd60360",
"cell_type": "markdown",
"id": "a44f1dfd-9bc2-4086-affe-260b3232642b",
"metadata": {},
"outputs": [],
"source": []
"source": [
"END of Notebook."
]
}
],
"metadata": {
Expand Down

0 comments on commit 33a317b

Please sign in to comment.