Description
Submitting Author: Wei Ji Leong (@weiji14)
All current maintainers: (@weiji14, @seisman, @maxrjones, @michaelgrund, @willschlitzer, @yvonnefroehlich)
Package Name: PyGMT
One-Line Description of Package: A Python interface for the Generic Mapping Tools
Repository Link: https://github.com/GenericMappingTools/pygmt
Version submitted:
Editor: @lwasser
Reviewer 1: @jbusecke
Reviewer 2: @SimonMolinsky
Archive: https://zenodo.org/record/6702566
Version accepted: V 0.7.0
Date accepted (month/day/year): 9/1/2022
Description
-
Include a brief paragraph describing what your package does:
PyGMT is a library for processing geospatial and geophysical data and making publication quality maps and figures. It provides a Pythonic interface for the Generic Mapping Tools (GMT), a command-line program widely used in the Earth Sciences.
Scope
-
Please indicate which category or categories this package falls under:
- Data retrieval
- Data extraction
- Data munging
- Data deposition
- Data visualization
- Reproducibility
- Geospatial
- Education
- Unsure/Other (explain below)
-
Explain how the and why the package falls under these categories (briefly, 1-2 sentences). Please note any areas you are unsure of:
- Data munging ⚙️: Several data processing modules are available to work on tabular and grid data (https://www.pygmt.org/v0.4.0/api/index.html#data-processing) including functions like
blockmedian
,surface
,grdtrack
, etc - Data visualization 🗺️: Plotting publication quality maps and figures is a strong point of PyGMT (https://www.pygmt.org/v0.4.0/api/index.html#plotting). There is a comprehensive set of tools for plotting 2D and 3D data, both geospatial and non-geospatial. It is also possible to add standard map elements like a
colorbar
orlegend
, and make multi-panelsubplot
figures. - Geospatial 🌐: PyGMT is inherently a geospatial package that can handle both vector and raster data. Several map projections are supported (https://www.pygmt.org/v0.4.0/projections/index.html), and there is support for plotting shapefiles and GeoTiff/NetCDF files.
- Data munging ⚙️: Several data processing modules are available to work on tabular and grid data (https://www.pygmt.org/v0.4.0/api/index.html#data-processing) including functions like
-
Who is the target audience and what are scientific applications of this package?
- The primary target audience of PyGMT is the geoscience community, including anybody working on fields like Earth Observation, Geophysics, Oceanography, Seismology, Planetary Sciences, etc. The package offers a way for users to perform general geoprocessing tasks and create high quality illustrations of their results for posters or publications.
-
Are there other Python packages that accomplish the same thing? If so, how does yours differ?
Yes, there are several geospatial Python packages such as:
cartopy
for plotting vector data (matplotlib
based)geopandas
for working with vector datarasterio
,rioxarray
andxarray-spatial
for working with raster data
These tools are typically focused on one thing only (e.g. plotting maps, vector data, raster data). PyGMT allows users to mix vector and raster data easily, so that users can:
- Produce a map with points/lines/polygons and raster grids in the same plot, e.g. plot weather station points on top of a raster Digital Elevation Model, while including map elements (e.g. scalebar, compass arrow, colorbar, legend, inset overview maps etc)
- Extract a series of elevation values along a transect line (vector) from a NetCDF/GeoTiff grid (raster) using
grdtrack
- Convert a table of xyz points (vector) to a 2D grid (raster) using
surface
via a spline-based interpolation method.
PyGMT integrates with the PyData ecosystem. It allows users to process and plot data stored in NumPy arrays, Pandas DataFrames, Xarray DataArray/Datasets, GeoPandas GeoDataFrames, as well as from standard file formats like CSV and GeoTiff/NetCDF files. There are also plans to integrate with other scientific libraries like ObsPy (ObsPy integration GenericMappingTools/pygmt#967) in the future.
However, PyGMT can only produce static plots unlike packages like Geoviews which allow for interactive plotting (e.g. panning and zooming). It is also non-trivial to scale out data processing tasks and/or plotting of big datasets (>10GB) that don't fit in RAM to multiple processors/clusters as with libraries like
dask-geopandas
because of limitations in the GMT C package that PyGMT wraps around. -
Any other questions or issues we should be aware of?:
First off, thanks for reading this! We're keen to get some independent reviewers to have a look at the PyGMT package, sort of as a first step before going for a software publication at JOSS/G3 (the team is still deciding). Linking to original discussion at What we need for a first PyGMT paper? GenericMappingTools/pygmt#677 (comment), cc @leouieda @seisman @meghanrjones.
P.S. *Have feedback/comments about our review process? Leave a comment here
Metadata
Metadata
Assignees
Type
Projects
Status