Skip to content

Commit 5b1e632

Browse files
committed
Edit satellite data notebook
1 parent c3c4b74 commit 5b1e632

File tree

2 files changed

+114
-1
lines changed

2 files changed

+114
-1
lines changed

python-data/exercises/ex09b_satellite_data.ipynb

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,36 @@
4646
"The [STAC browser](https://radiantearth.github.io/stac-browser/#/) is a good starting point to discover available datasets, as it provides an up-to-date list of existing STAC catalogs. From the list, let's click on the \"Earth Search\" catalog, i.e. the access point to search the archive of Sentinel-2 images hosted on AWS.\n"
4747
]
4848
},
49+
{
50+
"cell_type": "markdown",
51+
"id": "bb95dfdf-8721-4d47-af20-211e2f7bd491",
52+
"metadata": {},
53+
"source": [
54+
"## Install some packages we will need\n",
55+
"\n",
56+
"We need to install some additional python packages which unfortunately aren't (yet) on Jaspy. To do this, we run:\n",
57+
"\n",
58+
"`pip install --user pystac_client rioxarray shapely pyproj`\n",
59+
"\n",
60+
"Which will install these python packages into your local python path, so we can use them with your account alongside all the packages in Jaspy. __NOTE: this command may take some time__ "
61+
]
62+
},
63+
{
64+
"cell_type": "code",
65+
"execution_count": null,
66+
"id": "4ab589c7-f462-4c6d-aaa6-b1dc630e5cf6",
67+
"metadata": {
68+
"editable": true,
69+
"slideshow": {
70+
"slide_type": ""
71+
},
72+
"tags": []
73+
},
74+
"outputs": [],
75+
"source": [
76+
"# Type the pip command here"
77+
]
78+
},
4979
{
5080
"cell_type": "markdown",
5181
"id": "517be10e-1c03-433c-b6b9-3722cc0d15b9",

python-data/solutions/ex09b_satellite_data.ipynb

Lines changed: 84 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,91 @@
4848
},
4949
{
5050
"cell_type": "markdown",
51-
"id": "517be10e-1c03-433c-b6b9-3722cc0d15b9",
51+
"id": "db452b95-5e0b-47f9-ac30-330b27956c51",
5252
"metadata": {},
53+
"source": [
54+
"## Install some packages we will need\n",
55+
"\n",
56+
"We need to install some additional python packages which unfortunately aren't (yet) on Jaspy. To do this, we run:\n",
57+
"\n",
58+
"`pip install --user pystac_client rioxarray shapely pyproj`\n",
59+
"\n",
60+
"Which will install these python packages into your local python path, so we can use them with your account alongside all the packages in Jaspy. __NOTE: this command may take some time__ "
61+
]
62+
},
63+
{
64+
"cell_type": "code",
65+
"execution_count": 1,
66+
"id": "ea2ff2df-b2e5-4804-8e2b-3c05f8d0b8ac",
67+
"metadata": {
68+
"editable": true,
69+
"slideshow": {
70+
"slide_type": ""
71+
},
72+
"tags": []
73+
},
74+
"outputs": [
75+
{
76+
"name": "stdout",
77+
"output_type": "stream",
78+
"text": [
79+
"Collecting pystac_client\n",
80+
" Downloading pystac_client-0.8.5-py3-none-any.whl.metadata (5.1 kB)\n",
81+
"Requirement already satisfied: rioxarray in /opt/jaspy/lib/python3.11/site-packages (0.17.0)\n",
82+
"Requirement already satisfied: shapely in /opt/jaspy/lib/python3.11/site-packages (2.0.4)\n",
83+
"Requirement already satisfied: pyproj in /opt/jaspy/lib/python3.11/site-packages (3.6.1)\n",
84+
"Requirement already satisfied: requests>=2.28.2 in /opt/jaspy/lib/python3.11/site-packages (from pystac_client) (2.32.3)\n",
85+
"Collecting pystac>=1.10.0 (from pystac[validation]>=1.10.0->pystac_client)\n",
86+
" Downloading pystac-1.11.0-py3-none-any.whl.metadata (4.5 kB)\n",
87+
"Requirement already satisfied: python-dateutil>=2.8.2 in /opt/jaspy/lib/python3.11/site-packages (from pystac_client) (2.9.0)\n",
88+
"Requirement already satisfied: packaging in /opt/jaspy/lib/python3.11/site-packages (from rioxarray) (24.1)\n",
89+
"Requirement already satisfied: rasterio>=1.3 in /opt/jaspy/lib/python3.11/site-packages (from rioxarray) (1.3.9)\n",
90+
"Requirement already satisfied: xarray>=2022.3.0 in /opt/jaspy/lib/python3.11/site-packages (from rioxarray) (2024.7.0)\n",
91+
"Requirement already satisfied: numpy>=1.23 in /opt/jaspy/lib/python3.11/site-packages (from rioxarray) (1.26.4)\n",
92+
"Requirement already satisfied: certifi in /opt/jaspy/lib/python3.11/site-packages (from pyproj) (2024.7.4)\n",
93+
"Requirement already satisfied: jsonschema~=4.18 in /opt/jaspy/lib/python3.11/site-packages (from pystac[validation]>=1.10.0->pystac_client) (4.23.0)\n",
94+
"Requirement already satisfied: six>=1.5 in /opt/jaspy/lib/python3.11/site-packages (from python-dateutil>=2.8.2->pystac_client) (1.16.0)\n",
95+
"Requirement already satisfied: affine in /opt/jaspy/lib/python3.11/site-packages (from rasterio>=1.3->rioxarray) (2.4.0)\n",
96+
"Requirement already satisfied: attrs in /opt/jaspy/lib/python3.11/site-packages (from rasterio>=1.3->rioxarray) (24.2.0)\n",
97+
"Requirement already satisfied: click>=4.0 in /opt/jaspy/lib/python3.11/site-packages (from rasterio>=1.3->rioxarray) (8.1.7)\n",
98+
"Requirement already satisfied: cligj>=0.5 in /opt/jaspy/lib/python3.11/site-packages (from rasterio>=1.3->rioxarray) (0.7.2)\n",
99+
"Requirement already satisfied: snuggs>=1.4.1 in /opt/jaspy/lib/python3.11/site-packages (from rasterio>=1.3->rioxarray) (1.4.7)\n",
100+
"Requirement already satisfied: click-plugins in /opt/jaspy/lib/python3.11/site-packages (from rasterio>=1.3->rioxarray) (1.1.1)\n",
101+
"Requirement already satisfied: setuptools in /opt/jaspy/lib/python3.11/site-packages (from rasterio>=1.3->rioxarray) (72.1.0)\n",
102+
"Requirement already satisfied: charset-normalizer<4,>=2 in /opt/jaspy/lib/python3.11/site-packages (from requests>=2.28.2->pystac_client) (3.3.2)\n",
103+
"Requirement already satisfied: idna<4,>=2.5 in /opt/jaspy/lib/python3.11/site-packages (from requests>=2.28.2->pystac_client) (3.7)\n",
104+
"Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/jaspy/lib/python3.11/site-packages (from requests>=2.28.2->pystac_client) (2.2.2)\n",
105+
"Requirement already satisfied: pandas>=2.0 in /opt/jaspy/lib/python3.11/site-packages (from xarray>=2022.3.0->rioxarray) (2.2.2)\n",
106+
"Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /opt/jaspy/lib/python3.11/site-packages (from jsonschema~=4.18->pystac[validation]>=1.10.0->pystac_client) (2023.12.1)\n",
107+
"Requirement already satisfied: referencing>=0.28.4 in /opt/jaspy/lib/python3.11/site-packages (from jsonschema~=4.18->pystac[validation]>=1.10.0->pystac_client) (0.35.1)\n",
108+
"Requirement already satisfied: rpds-py>=0.7.1 in /opt/jaspy/lib/python3.11/site-packages (from jsonschema~=4.18->pystac[validation]>=1.10.0->pystac_client) (0.20.0)\n",
109+
"Requirement already satisfied: pytz>=2020.1 in /opt/jaspy/lib/python3.11/site-packages (from pandas>=2.0->xarray>=2022.3.0->rioxarray) (2024.1)\n",
110+
"Requirement already satisfied: tzdata>=2022.7 in /opt/jaspy/lib/python3.11/site-packages (from pandas>=2.0->xarray>=2022.3.0->rioxarray) (2024.1)\n",
111+
"Requirement already satisfied: pyparsing>=2.1.6 in /opt/jaspy/lib/python3.11/site-packages (from snuggs>=1.4.1->rasterio>=1.3->rioxarray) (3.1.2)\n",
112+
"Downloading pystac_client-0.8.5-py3-none-any.whl (41 kB)\n",
113+
"Downloading pystac-1.11.0-py3-none-any.whl (183 kB)\n",
114+
"Installing collected packages: pystac, pystac_client\n",
115+
"\u001b[33m WARNING: The script stac-client is installed in '/home/users/nfarmer/.local/bin' which is not on PATH.\n",
116+
" Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\u001b[0m\u001b[33m\n",
117+
"\u001b[0mSuccessfully installed pystac-1.11.0 pystac_client-0.8.5\n",
118+
"Note: you may need to restart the kernel to use updated packages.\n"
119+
]
120+
}
121+
],
122+
"source": [
123+
"pip install --user pystac_client rioxarray shapely pyproj"
124+
]
125+
},
126+
{
127+
"cell_type": "markdown",
128+
"id": "517be10e-1c03-433c-b6b9-3722cc0d15b9",
129+
"metadata": {
130+
"editable": true,
131+
"slideshow": {
132+
"slide_type": ""
133+
},
134+
"tags": []
135+
},
53136
"source": [
54137
"## **Exercise:** Discover a STAC catalog\n",
55138
"Let's take a moment to explore the Earth Search STAC catalog, which is the catalog indexing the Sentinel-2 collection\n",

0 commit comments

Comments
 (0)