GenericMappingTools / scipy2021

PyGMT tutorial submission for SciPy 2021
https://www.pygmt.org
3 stars 1 forks source link
maps python scipy2021

Crafting beautiful maps with PyGMT: Tutorial submission for SciPy 2021

Summary

In many scientific disciplines, accurate, intuitive, and aesthetically pleasing display of geospatial information is a critical tool. PyGMT [a Python interface to the Generic Mapping Tools (GMT)] is a mapping toolbox designed to produce publication-quality figures and maps for insertion into posters, reports, and manuscripts. This class is geared towards SciPy attendees interested in creating beautiful maps using Python. Only basic Python knowledge is needed, and a background in cartography is not required to use PyGMT effectively! By the end of this tutorial, students will be able to:

Presenters

Liam (he/him/his) is a PhD student studying seismology and infrasound at the University of Alaska Fairbanks Geophysical Institute in Fairbanks, Alaska, USA. He is a contributor to PyGMT and, in summer 2020, taught a module on PyGMT for the inaugural Remote Online Sessions for Emerging Seismologists (ROSES) summer school. The materials for the ROSES module can be found in this GitHub repository, and a one-hour-long video recording of part of the course can be viewed on YouTube here. Liam also led a sprint for PyGMT at SciPy 2020.

Wei Ji (he/him/his) is a PhD student in glaciology at the Antarctic Research Centre in Wellington, New Zealand, specializing in satellite remote sensing and deep learning. He is one of the core developers of PyGMT and was the instructor for the PyGMT for Geoscientists workshop and Community Day code sprint at the FOSS4G Oceania 2019 conference. Jupyter notebooks for the workshop are available at github.com/GenericMappingTools/foss4g2019oceania.

Tyler (he/him/his) is a PhD student studying seismology and fault mechanics at the University of Oregon in Eugene, Oregon, USA. He is a PyGMT contributor and first got involved with PyGMT during the SciPy 2020 sprint. Tyler has assisted with teaching computational Earth science, including mapping with GMT, as a teaching assistant at the University of Oregon.

Meghan (she/her/hers) is a postdoctoral researcher at the University of Hawai'i at Mānoa working on building the GMT developer community, maintaining the GMT and PyGMT libraries, and refactoring GMT's C source code. She has developed and taught course material in oceanography and has led informal workshops on data processing and visualization using GMT.

Prerequisites

Basic Python knowledge (how to install and import packages, how to use positional and keyword arguments, etc.). No prior mapping experience is necessary!

Detailed timeline

The four-hour-long tentative schedule below is based upon content from github.com/GenericMappingTools/2020-unavco-course and github.com/GenericMappingTools/foss4g2019oceania, adapted to fit a more general scientific audience. Each of the 30–45 minute sessions will involve a quick (~10 minute) walkthrough by the speaker, followed by a more hands-on session in breakout rooms where tutorial participants work on the topic (using interactive Jupyter notebooks) in a guided environment with one of four instructors on hand to answer questions.

Time Event
20 minutes Introduction and orientation to PyGMT and associated resources
30 minutes Mapping basics (frames, projections, coastlines, etc.)
45 minutes Plotting basics (lines, points, legends, colorbars, inset maps, etc.)
10 minutes Break
45 minutes PyData and PyGMT (pandas.DataFrame and xarray.DataArray ingestion)
45 minutes Applications:
1. LiDAR — Processing 3D point clouds to Digital Elevation Model grids
2. Seismology — Visualizing focal mechanisms from recent earthquakes
30 minutes Group projects in breakouts
15 minutes Wrap up

Installation instructions

Installation instructions for PyGMT can be found here. To run the tutorial notebooks, you'll also need to install Jupyterlab/Notebook.

The tutorial environment, containing both requirements mentioned above, is specified in the environment.yml file found in this repository. It can be installed via conda with the following command:

conda env create -f environment.yml

If local installation is challenging or impossible, you can access this environment on a cloud machine by clicking on the badge below — but note that your work will not be saved between sessions with this method, so download your work (e.g., notebooks) often! 🚨

Binder

Tutorial material

Jupyter notebooks from previous tutorials and classes are available here and here. These will be modified and expanded to be made more suitable for a general SciPy audience (i.e., not just Earth scientists 🌎).