From aaacc15deaccc2eb383f54e57454b7a45ff5c0ba Mon Sep 17 00:00:00 2001 From: danielfromearth Date: Thu, 7 Dec 2023 18:33:29 +0000 Subject: [PATCH 1/5] update categorization of package imports --- tutorials/Earthdata_Subset_and_Plot.ipynb | 164 ++++++++++++++-------- 1 file changed, 105 insertions(+), 59 deletions(-) diff --git a/tutorials/Earthdata_Subset_and_Plot.ipynb b/tutorials/Earthdata_Subset_and_Plot.ipynb index 399ab64..034c75e 100644 --- a/tutorials/Earthdata_Subset_and_Plot.ipynb +++ b/tutorials/Earthdata_Subset_and_Plot.ipynb @@ -625,28 +625,27 @@ "warnings.filterwarnings('ignore')\n", "from pprint import pprint\n", "\n", - "# Direct access\n", + "# Example 1 imports\n", "import earthaccess\n", - "from pathlib import Path\n", "import xarray as xr\n", "xr.set_options(display_expand_attrs=False)\n", + "import matplotlib.pyplot as plt\n", + "import cartopy.crs as ccrs\n", + "import cartopy.feature as cfeature\n", "\n", - "# Harmony\n", - "from harmony import BBox, Client, Collection, Request, LinkType, CapabilitiesRequest\n", + "# Example 2 imports (Example 1 imports plus these...)\n", "import datetime as dt\n", "import json\n", - "import numpy as np\n", - "\n", - "# Plotting\n", + "from cartopy.mpl.ticker import LatitudeFormatter, LongitudeFormatter\n", "import geopandas as gpd\n", "import geoviews as gv\n", - "from geoviews import opts\n", "gv.extension('bokeh', 'matplotlib', logo=False)\n", - "import cartopy.crs as ccrs\n", - "import cartopy.feature as cfeature\n", - "from cartopy.mpl.ticker import LatitudeFormatter, LongitudeFormatter\n", - "import matplotlib.pyplot as plt\n", + "from harmony import Client, Collection, Request, CapabilitiesRequest\n", + "\n", + "# Appendix 1 imports\n", + "from pathlib import Path\n", "import rioxarray as rxr\n", + "\n", "%matplotlib inline" ] }, @@ -674,7 +673,7 @@ "text": [ "EARTHDATA_USERNAME and EARTHDATA_PASSWORD are not set in the current environment, try setting them or use a different strategy (netrc, interactive)\n", "You're now authenticated with NASA Earthdata Login\n", - "Using token with expiration date: 11/25/2023\n", + "Using token with expiration date: 01/26/2024\n", "Using .netrc file for EDL\n" ] } @@ -964,7 +963,7 @@ "id": "23fc1e31-656b-4a02-a80f-b6ea11712068", "metadata": {}, "source": [ - "We start with a subset that represents the U.S. state of California. Notice the dimensions of the Dataset and each variable." + "We start with a subset that represents the U.S. state of California. Notice the dimensions of the Dataset and each variable — time, lon, lat, and 'nv' (number of vertices) for the bounds variable." ] }, { @@ -3383,7 +3382,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 3, "id": "583e324b-88c9-4726-af33-ff07367dcf28", "metadata": { "tags": [] @@ -3405,7 +3404,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 4, "id": "db162b89-de86-4bb0-b620-4257d9af6b92", "metadata": { "tags": [] @@ -3413,7 +3412,6 @@ "outputs": [], "source": [ "collection_id = \"C1576365803-LARC_ASDC\" # EPIC-view satellite composites for DSCOVR, Version 1\n", - "# collection_id = \"C1996881146-POCLOUD\"\n", "\n", "capabilities_request = CapabilitiesRequest(collection_id=collection_id)\n", "\n", @@ -3431,7 +3429,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 5, "id": "4b59af1b-7338-40f9-8965-80339436f6a1", "metadata": { "tags": [] @@ -3466,7 +3464,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 6, "id": "3fbe4b39-df2c-4189-9eb9-aadeb1b492c0", "metadata": { "tags": [] @@ -3599,7 +3597,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 7, "id": "90865d24-6bbc-46ff-97a4-05f7d8fb4f3b", "metadata": { "tags": [] @@ -3648,7 +3646,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 8, "id": "33249e74-603d-4030-a2df-1b19df50fce1", "metadata": { "tags": [] @@ -3662,7 +3660,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 9, "id": "58c13872-3ca2-436e-ae53-3c22ce07e60c", "metadata": { "tags": [] @@ -3678,11 +3676,11 @@ "application/vnd.holoviews_exec.v0+json": "", "text/html": [ "
\n", - "
\n", + "
\n", "
\n", "