Skip to content

Commit 4cb7f77

Browse files
committed
Add getting started and installation instructions to the welcome page
Editing the front page to include a one-click Binder link to run the Jupyter notebooks, and steps for people to get a conda virtual environment set up locally for the AGU24 pre-conference workshop. Based on EGU22 short course at GenericMappingTools/egu22pygmt#10.
1 parent 283f99a commit 4cb7f77

File tree

2 files changed

+89
-8
lines changed

2 files changed

+89
-8
lines changed

book/_toc.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
format: jb-book
55
root: intro
66
parts:
7-
- caption: Details
7+
- caption: 🔗 Details
88
chapters:
99
- title: AGU24 Homepage
1010
url: https://www.agu.org/annual-meeting
11-
- caption: Tutorials
11+
- title: Course materials on GitHub
12+
url: https://github.com/GenericMappingTools/agu24workshop
13+
- caption: 🧑‍🏫 Tutorials
1214
chapters:
1315
- file: markdown
1416
- file: notebooks

book/intro.md

Lines changed: 85 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,90 @@
1-
# Welcome to your Jupyter Book
1+
# Mastering Geospatial Visualizations with GMT/PyGMT
22

3-
This is a small sample book to give you a feel for how book content is
4-
structured.
5-
It shows off a few of the major file types, as well as some sample content.
6-
It does not go in-depth into any particular topic - check out [the Jupyter Book documentation](https://jupyterbook.org) for more information.
3+
## Welcome to the AGU24 GMT/PyGMT workshop 🥳
74

8-
Check out the content pages bundled with this sample book to see more.
5+
This Jupyter book 📖 contains [GMT](https://docs.generic-mapping-tools.org/6.5) and
6+
[PyGMT](https://www.pygmt.org/v0.13.0) tutorials for producing maps 🗺️ and doing
7+
geospatial data processing 🌐
98

109
```{tableofcontents}
1110
```
11+
12+
Each tutorial is rendered on this website for easy viewing 👀, but they are all Jupyter
13+
notebooks designed to be ran interactively 💫. See the instructions below on how you can
14+
start running the tutorials in no time! 🚀
15+
16+
17+
# 🌠 Quickstart
18+
19+
To run these notebooks in an interactive Jupyter session online, 🖱️ click on the button
20+
below to launch on regular
21+
[Binder](https://mybinder.readthedocs.io/en/latest/index.html).
22+
23+
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/GenericMappingTools/agu24workshop/main)
24+
25+
Alternatively, you can go to a specific tutorial page, hover over the rocket 🚀 icon on
26+
the top right, and click 'Binder'.
27+
28+
# 💻 Running the notebooks locally
29+
30+
If you prefer to run the 🧑‍🏫 tutorials with a local installation of GMT/PyGMT, then
31+
follow along! For this AGU24 workshop, we recommend creating a virtual conda environment
32+
and installing the C and 🐍 Python libraries inside.
33+
34+
:::{tip} For users comfortable with using `git`, feel free to ⬇️ download or clone the
35+
repository containing the workshop materials directly using
36+
`git clone https://github.com/GenericMappingTools/agu24workshop.git`
37+
:::
38+
39+
Here's the instructions to install the `agu24workshop` environment:
40+
41+
1. Ensure that you have the
42+
[`conda`](https://docs.conda.io/projects/conda/en/latest/user-guide/index.html)
43+
package manager installed (e.g. via
44+
[`miniconda`](https://docs.anaconda.com/miniconda) or
45+
[Anaconda](https://www.anaconda.com/download)). You can also use
46+
[`mamba`](https://mamba.readthedocs.io/en/stable/installation/mamba-installation.html)
47+
which tends to be a ⚡ faster alternative.
48+
49+
2. Make a folder called 'agu24workshop'. This will be where you will put all the Jupyter
50+
notebooks and data files 🗃️ used in the workshop.
51+
52+
3. Download a copy of the 'environment.yml' file which contains a 📄 list of
53+
dependencies required to run the tutorials in this workshop. Get it at
54+
https://github.com/GenericMappingTools/agu24workshop/blob/main/environment.yml.
55+
56+
4. Run the following commands on the 🧑‍💻 command-line to create the virtual environment
57+
58+
```bash
59+
cd /path/to/agu24workshop
60+
conda env create --name agu24workshop --file environment.yml
61+
```
62+
63+
5. Once the installation is completed 🏁, launch
64+
[Jupyter Lab](https://jupyterlab.readthedocs.io) as follows:
65+
66+
```bash
67+
conda activate agu24workshop
68+
jupyter lab
69+
```
70+
71+
This should open up a page in your default browser. If not, you can click and open
72+
the 🔗 link that says `http://localhost:8888/lab?token=...` in your command-line
73+
terminal and this will will take you to the Jupyter Lab page.
74+
75+
6. Download the Jupyter notebook(s) you want to run (e.g.
76+
https://www.generic-mapping-tools.org/agu24workshop/first-figure.html) using either
77+
the download button on the ↗️ top right (select '.ipynb') or from GitHub at
78+
https://github.com/GenericMappingTools/agu24workshop/tree/main/book. Make sure to put
79+
the *.ipynb file(s) inside of the 'agu24workshop' folder.
80+
81+
7. Open the Jupyter notebook in the left-pane file browser, e.g. by 🖱️ double-clicking
82+
on `first-figure.ipynb`. You are now ready to run through the course materials 🎉!
83+
84+
```{note}
85+
If you're intending to use GMT/PyGMT in another project outside of this course, please
86+
follow the official installation instructions at:
87+
88+
- https://docs.generic-mapping-tools.org/latest/install.html
89+
- https://www.pygmt.org/latest/install.html
90+
```

0 commit comments

Comments
 (0)