Skip to content

Commit 0e41a4e

Browse files
weiji14leouiedayvonnefroehlichMax Jones
authored
Add getting started and installation instructions to the welcome page (#10)
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 EGU22 short course. * Use list of tutorials and authors instead of tableofcontents * Use sphinx-panels with thumbnails of tutorials Change from using bulleted list of tutorials to a more eye-catching 4-grid-panel with a teaser image for each tutorial. * Remove bold heading from LiDAR tutorial Make the font consistent with the other tutorials. * Modify heading to be title of workshop * Fix conda virtual environment creation command * Put in more emojis on the front sections * Add note about using Pangeo Binder as a backup to regular mybinder Co-authored-by: Leonardo Uieda <[email protected]> Co-authored-by: Yvonne Fröhlich <[email protected]> Co-authored-by: Max Jones <[email protected]>
1 parent f1dd5bb commit 0e41a4e

File tree

3 files changed

+132
-10
lines changed

3 files changed

+132
-10
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: EGU22 Homepage
1010
url: https://www.egu22.eu
11-
- caption: Tutorials
11+
- title: Course materials on GitHub
12+
url: https://github.com/GenericMappingTools/egu22pygmt
13+
- caption: 🧑‍🏫 Tutorials
1214
chapters:
1315
- file: first-figure
1416
- file: ecosystem

book/intro.md

Lines changed: 127 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,131 @@
1-
# Welcome to your Jupyter Book
1+
# 🌍 Crafting beautiful maps with 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 EGU22 PyGMT short course 🥳
74

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

10-
```{tableofcontents}
8+
````{panels}
9+
:column: col-3 align-items-center p-2
10+
:body: text-center
11+
12+
---
13+
:img-top: _images/first-figure_49_0.png
14+
```{link-button} first-figure
15+
:text: Anatomy of a PyGMT figure
16+
:type: ref
17+
```
18+
by [Leonardo Uieda](https://orcid.org/0000-0001-6123-9515)
19+
20+
---
21+
:img-top: _images/ecosystem_13_1.png
22+
```{link-button} ecosystem
23+
:text: Integration with the scientific Python ecosystem 🐍
24+
:type: ref
25+
```
26+
by [Max Jones](https://orcid.org/0000-0003-0180-8928)
27+
28+
---
29+
:img-top: _images/mars_maps_11_0.png
30+
```{link-button} Mars_Maps
31+
:text: Making some Mars maps with PyGMT
32+
:type: ref
33+
```
34+
by [André Belém](https://orcid.org/0000-0002-8865-6180)
35+
36+
---
37+
:img-top: _images/lidar_to_surface_36_0.png
38+
```{link-button} lidar_to_surface
39+
:text: LiDAR Point clouds to 3D surfaces ✨➡️🏔
40+
:type: ref
41+
```
42+
by [Wei Ji Leong](https://orcid.org/0000-0003-2354-1988)
43+
44+
````
45+
46+
Each tutorial is rendered on this website for easy viewing 👀, but they are all
47+
Jupyter notebooks designed to be ran interactively 💫. See the instructions
48+
below on how you can start running the tutorials in no time! 🚀
49+
50+
# 🌠 Quickstart
51+
52+
To run these notebooks in an interactive Jupyter session online,
53+
🖱️ click on the button below to launch on regular
54+
[Binder](https://mybinder.readthedocs.io/en/latest/index.html).
55+
56+
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/GenericMappingTools/egu22pygmt/main)
57+
58+
Alternatively, you can go to a specific tutorial page, hover over the rocket 🚀
59+
icon on the top right, and click 'Binder'.
60+
61+
:::{note}
62+
If you see an error like `toomanyrequests: You have reached your pull rate
63+
limit`, you can try this Pangeo Binder link instead as a backup, though it
64+
will require a [GitHub account](https://github.com/signup) to work:
65+
66+
[![Pangeo Binder](https://aws-uswest2-binder.pangeo.io/badge_logo.svg)](https://aws-uswest2-binder.pangeo.io/v2/gh/GenericMappingTools/egu22pygmt/main)
67+
:::
68+
69+
# 💻 Running the notebooks locally
70+
71+
If you prefer to run the 🧑‍🏫 tutorials with a local installation of PyGMT, then
72+
follow along! For this EGU22 short course, we recommend creating a virtual
73+
conda environment and installing the 🐍 Python libraries inside.
74+
75+
:::{tip} For users comfortable with using `git`, feel free to ⬇️ download or
76+
clone the repository containing the short course materials directly using
77+
`git clone https://github.com/GenericMappingTools/egu22pygmt.git`
78+
:::
79+
80+
Here's the instructions to install the `egu22pygmt` environment:
81+
82+
1. Ensure that you have the
83+
[`conda`](https://docs.conda.io/projects/conda/en/latest/user-guide/index.html)
84+
package manager installed (e.g. via
85+
[`miniconda`](https://docs.conda.io/en/latest/miniconda.html) or
86+
[Anaconda](https://www.anaconda.com/products/distribution)).
87+
You can also use [`mamba`](https://mamba.readthedocs.io/en/latest/installation.html#fresh-install)
88+
which tends to be a ⚡ faster alternative.
89+
90+
2. Make a folder called 'egu22pygmt'. This will be where you will put all the
91+
Jupyter notebooks and data files 🗃️ used in the short course.
92+
93+
3. Download a copy of the 'environment.yml' file which contains a 📄 list of
94+
dependencies required to run the tutorials in this short course. Get it at
95+
https://github.com/GenericMappingTools/egu22pygmt/blob/main/environment.yml.
96+
97+
4. Run the following commands on the 🧑‍💻 command-line to create the virtual
98+
environment
99+
100+
```bash
101+
cd /path/to/egu22pygmt
102+
conda env create --name egu22pygmt --file environment.yml
103+
```
104+
105+
5. Once the installation is completed 🏁, launch
106+
[Jupyter Lab](https://jupyterlab.readthedocs.io) as follows:
107+
108+
```bash
109+
conda activate egu22pygmt
110+
jupyter lab
111+
```
112+
113+
This should open up a page in your default browser. If not, you can click
114+
and open the 🔗 link that says `http://localhost:8888/lab?token=...` in your
115+
command-line terminal and this will will take you to the Jupyter Lab page.
116+
117+
6. Download the Jupyter notebook(s) you want to run (e.g.
118+
https://www.generic-mapping-tools.org/egu22pygmt/first-figure.html) using
119+
either the download button on the ↗️ top right (select '.ipynb') or from
120+
GitHub at https://github.com/GenericMappingTools/egu22pygmt/tree/main/book.
121+
Make sure to put the *.ipynb file(s) inside of the 'egu22pygmt' folder.
122+
123+
7. Open the Jupyter notebook in the left-pane file browser, e.g. by
124+
🖱️ double-clicking on `first-figure.ipynb`. You are now ready to run through
125+
the course materials 🎉!
126+
127+
```{note}
128+
If you're intending to use PyGMT in another project outside of this course,
129+
please follow the official installation instructions at
130+
https://www.pygmt.org/latest/install.html
11131
```

book/lidar_to_surface.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# **LiDAR Point clouds to 3D surfaces** ✨➡️🏔️\n",
7+
"# LiDAR Point clouds to 3D surfaces ✨➡️🏔️\n",
88
"\n",
99
"In this tutorial, let's use PyGMT to\n",
1010
"perform a more advanced geoprocessing workflow 😎\n",

0 commit comments

Comments
 (0)