Mastering Geospatial Visualizations with GMT/PyGMT#
Welcome to the AGU24 GMT/ PyGMT workshop π₯³! This Jupyter book π contains tutorials for making maps πΊοΈ and animations π¦
π Overview of tutorials#



by Max Jones
by Jing-Hui Tong and Yvonne FrΓΆhlich

by Wei Ji Leong and AndreΜ BeleΜm

Each tutorial is rendered on this website for easy viewing π, but they are all Jupyter notebooks designed to be ran interactively π«. See the instructions below on how you can start running the tutorials in no time! π
π Setting up your environment#
To run these notebooks in an interactive Jupyter session online, π±οΈ click on the button below to launch on regular Binder.
Alternatively, you can go to a specific tutorial page, hover over the rocket π icon on the top right, and click βBinderβ.
π» Creating a local environment for running tutorials#
If you prefer to run the π§βπ« tutorials with a local installation of GMT/PyGMT, then follow along! For this AGU24 workshop, we recommend creating a virtual conda environment and installing the C and π Python libraries inside.
Attention
If you are running this on Windows, we recommend installing a bash emulator (e.g. Git for Windows) so that you can run the command-line instructions below. A bash prompt is also a pre-requisite for the final animation tutorial that assumes a bash scripting environment.
Tip
For users comfortable with using git
, feel free to β¬οΈ download or clone the
repository containing the workshop materials directly using
git clone https://github.com/GenericMappingTools/agu24workshop.git
Hereβs the instructions to install the agu24workshop
environment:
Ensure that you have the
conda
package manager installed (e.g. viaminiconda
or Anaconda). You can also usemamba
which tends to be a β‘ faster alternative.Make a folder called βagu24workshopβ. This will be where you will put all the Jupyter notebooks and data files ποΈ used in the workshop.
Download a copy of the βenvironment.ymlβ file which contains a π list of dependencies required to run the tutorials in this workshop. Get it at GenericMappingTools/agu24workshop.
Run the following commands on the π§βπ» command-line to create the virtual environment
cd /path/to/agu24workshop conda env create --name agu24workshop --file environment.yml
Once the installation is completed π, launch Jupyter Lab as follows:
conda activate agu24workshop jupyter lab
This should open up a page in your default browser. If not, you can click and open the π link that says
http://localhost:8888/lab?token=...
in your command-line terminal and this will take you to the Jupyter Lab page.Download the Jupyter notebook(s) you want to run (e.g. https://www.generic-mapping-tools.org/agu24workshop/tut01_firstfigure.html) using either the download button on the βοΈ top right (select β.ipynbβ) or from GitHub at GenericMappingTools/agu24workshop. Make sure to put the *.ipynb file(s) inside of the βagu24workshopβ folder.
Open the Jupyter notebook in the left-pane file browser, e.g. by π±οΈ double-clicking on
first-figure.ipynb
. You are now ready to run through the course materials π!
Note
If youβre intending to use GMT/PyGMT in another project outside of this course, please follow the official installation instructions at: