Skip to content

Commit

Permalink
HARMONY-1752: Add example of request_as_url
Browse files Browse the repository at this point in the history
  • Loading branch information
indiejames committed Apr 23, 2024
1 parent d2dd2bb commit e85b066
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions examples/tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"import sys; sys.path.append('..')\n",
"!{sys.executable} -m pip install -q -r ../requirements/examples.txt\n",
"\n",
"# Install harmony-py requirements. Not necessary if you ran `pip install harmony-py` in your kernel \n",
"# Install harmony-py requirements. Not necessary if you ran `pip install harmony-py` in your kernel\n",
"!{sys.executable} -m pip install -q -r ../requirements/core.txt\n",
"\n",
"import datetime as dt\n",
Expand Down Expand Up @@ -174,12 +174,31 @@
" rasterio.plot.show(rasterio.open(r.result()))"
]
},
{
"cell_type": "markdown",
"id": "f97fa92f",
"metadata": {},
"source": [
"We can also get a URL corresponding to our request that we can use in a browser. **Note:** This will not work if the request includes a shapefile."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f03e22a8",
"metadata": {},
"outputs": [],
"source": [
"url = harmony_client.request_as_url(request)\n",
"print(url)"
]
},
{
"cell_type": "markdown",
"id": "45a14473",
"metadata": {},
"source": [
"Let's build another request. This time, we'll request a specific granule and grid using the UMM grid name from the CMR. You can find grids in the CMR at https://cmr.uat.earthdata.nasa.gov/search/grids.umm_json. Include a query parameter `?name=LambertExample` to list detailed information about a specific grid."
"Let's build another request. This time, we'll request a specific granule and grid using the UMM grid name from the CMR. You can find grids in the CMR at https://cmr.uat.earthdata.nasa.gov/search/grids.umm_json. Include a query parameter `?grid=LambertExample` to list detailed information about a specific grid."
]
},
{
Expand Down Expand Up @@ -317,7 +336,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.2"
"version": "3.11.9"
},
"vscode": {
"interpreter": {
Expand Down

0 comments on commit e85b066

Please sign in to comment.