Skip to content

Commit c91e4c5

Browse files
authored
Merge pull request #11 from esciencecenter-digital-skills/update-episode-5
update E5 dataset access
2 parents 0942795 + ef57ff1 commit c91e4c5

11 files changed

+169
-764
lines changed

_episodes/19-access-data.md renamed to _episodes/05-access-data.md

Lines changed: 143 additions & 141 deletions
Large diffs are not rendered by default.

fig/19-STAC-landsat8-B8-cutout.png

-580 KB
Binary file not shown.

fig/19-STAC-s2-preview.jpg

-72.6 KB
Binary file not shown.
-484 KB
Binary file not shown.
File renamed without changes.

fig/E05-02-STAC-browser-exercise.jpg

345 KB
Loading

fig/E05-03-STAC-s2-preview.jpg

90.3 KB
Loading

fig/E05-04-STAC-l8-preview.jpg

169 KB
Loading

files/environment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ dependencies:
1515
- earthpy>=0.9.0
1616
- xarray-spatial
1717
- descartes>=1.0.0 # necessary for geopandas plotting
18-
- pystac-client
18+
- pystac-client==0.3.2 # pin version to work with earth-search STAC API
1919
- python-graphviz # necessary for plotting dask graphs

notebooks/XX-access-data.ipynb

Lines changed: 0 additions & 597 deletions
This file was deleted.

setup.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: Setup
66
## Setting up your Lesson Directory and Getting the Data
77

88
1. Open the terminal/shell:
9-
* On **Windows**, open **Git Bash**.
9+
* On **Windows**, open **Git Bash**.
1010
* On **Mac OS** or **Linux**, open the **Terminal** app.
1111

1212
2. Change your working directory to your **Desktop** :
@@ -60,8 +60,8 @@ individually can be a bit difficult, however, so we recommend the all-in-one
6060
installer [Anaconda][anaconda].
6161

6262
Regardless of how you choose to install it, please make sure you install Python
63-
version 3.x (e.g., 3.7 is fine). Also, please set up your python environment at
64-
least a day in advance of the workshop. If you encounter problems with the
63+
version 3.x (e.g., 3.7 is fine). Also, please set up your python environment at
64+
least a day in advance of the workshop. If you encounter problems with the
6565
installation procedure, ask your workshop organizers via e-mail for assistance so
6666
you are ready to go as soon as the workshop begins.
6767

@@ -87,7 +87,7 @@ you are ready to go as soon as the workshop begins.
8787

8888
### Linux
8989

90-
Note that the following installation steps require you to work from the shell.
90+
Note that the following installation steps require you to work from the shell.
9191
If you run into any difficulties, please request help before the workshop begins.
9292

9393
1. Open [https://www.anaconda.com/distribution/][anaconda-linux] with your web browser.
@@ -112,20 +112,20 @@ If you run into any difficulties, please request help before the workshop begins
112112
d. Press enter.
113113

114114
e. Follow the text-only prompts. When the license agreement appears (a colon
115-
will be present at the bottom of the screen) press the space bar until you see the
116-
bottom of the text. Type `yes` and press enter to approve the license. Press
117-
enter again to approve the default location for the files. Type `yes` and
118-
press enter to prepend Anaconda to your `PATH` (this makes the Anaconda
115+
will be present at the bottom of the screen) press the space bar until you see the
116+
bottom of the text. Type `yes` and press enter to approve the license. Press
117+
enter again to approve the default location for the files. Type `yes` and
118+
press enter to prepend Anaconda to your `PATH` (this makes the Anaconda
119119
distribution your user's default Python).
120120
121121
## Setting up the workshop environment with conda
122122
123-
Once you have installed Anaconda, you should have access to the `conda` command in your terminal.
123+
Once you have installed Anaconda, you should have access to the `conda` command in your terminal.
124124
125125
1. Test that this is so by running the `conda` command in the terminal. You should get an output that looks like this:
126126
127127
```bash
128-
→ conda
128+
→ conda
129129
usage: conda [-h] [-V] command ...
130130
131131
conda is a tool for managing and deploying applications, environments and packages.
@@ -168,27 +168,27 @@ Once you have installed Anaconda, you should have access to the `conda` command
168168
169169
2. Create the environment using the `conda create` command. It's possible to paste the following
170170
code on the Terminal:
171-
171+
172172
```bash
173173
conda create -n geospatial -c conda-forge -y \
174174
jupyterlab numpy matplotlib \
175-
xarray rasterio geopandas rioxarray earthpy descartes xarray-spatial pystac-client python-graphviz
175+
xarray rasterio geopandas rioxarray earthpy descartes xarray-spatial pystac-client==0.3.2 python-graphviz
176176
177177
```
178-
178+
179179
_Please note that this step may take several minutes to complete. If it takes more than a few minutes, see below for another method._
180180

181181
In this command, the `-n` argument specifies the environment name, the `-c` argument specifies the Conda channel
182182
where the libraries are hosted, and the `-y` argument spares the need for confirmation. The following arguments are
183183
the names of the libraries we are going to use. As you can see, geospatial analysis requires many libraries!
184184
Luckily, package managers like `conda` facilitate the process of installing and managing them.
185-
185+
186186
If the above command does not work, it's also possible to create the environment from a file:
187-
187+
188188
Right-click and "Save Link As..." on this link:
189-
189+
190190
[https://carpentries-incubator.github.io/geospatial-python/files/environment.yaml](files/environment.yaml)
191-
191+
192192
Name it `environment.yaml` and save it to your `geospatial-python` folder.
193193
The `environment.yaml` contains the names of Python libraries that are required to run the lesson:
194194
@@ -210,10 +210,10 @@ code on the Terminal:
210210
- xarray-spatial
211211
- earthpy
212212
- descartes # necessary for geopandas plotting
213-
- pystac-client
213+
- pystac-client==0.3.2 # pin version to work with earth-search STAC API
214214
- python-graphviz
215215
```
216-
216+
217217
In the terminal, navigate to the directory where you saved the `environment.yaml` file using the `cd` command.
218218
Then run:
219219
@@ -222,9 +222,9 @@ code on the Terminal:
222222
```
223223
224224
`conda` should begin to locate, download, and install the Python libraries listed in the `environment.yaml` file.
225-
225+
226226
> ## Faster Environment Install With One Extra Step
227-
> If you see a spinning `/` for more than a few minutes, you may want to try the following to speed up the environment installation.
227+
> If you see a spinning `/` for more than a few minutes, you may want to try the following to speed up the environment installation.
228228
> 1. Cancel the currently running `conda create` process with CTRL+C
229229
> 2. Run `conda install -c conda-forge mamba`
230230
> 3. Run `mamba env create -f environment.yaml`
@@ -260,16 +260,16 @@ code on the Terminal:
260260
```
261261

262262
> ## IMPORTANT
263-
> If you close the terminal, you will need to
263+
> If you close the terminal, you will need to
264264
reactivate this environment with `conda activate geospatial` to use the Python libraries required for the lesson and
265265
> to start JupyterLab, which is also installed in the `geospatial` environment.
266266
{: .callout}
267267

268268

269269
## Starting JupyterLab
270270

271-
In order to follow the lessons on using Python (episode 5 and onward), you should launch JupyterLab
272-
after activating the geospatial conda environment in your working directory that contains the data you downloaded.
271+
In order to follow the lessons on using Python (episode 5 and onward), you should launch JupyterLab
272+
after activating the geospatial conda environment in your working directory that contains the data you downloaded.
273273
See [Starting JupyterLab][starting-jupyterlab] for guidance.
274274

275275
If all of the steps above completed successfully you are ready to follow along with the lesson!
@@ -290,7 +290,7 @@ If all of the steps above completed successfully you are ready to follow along w
290290
% ls ~
291291
> Applications Downloads Pictures
292292
anaconda3 Library Public
293-
Desktop Movies
293+
Desktop Movies
294294
Documents Music
295295
```
296296

0 commit comments

Comments
 (0)