Skip to content

Commit 29f12f5

Browse files
seismanmichaelgrundyvonnefroehlich
authored
Add the PyGMT ecosystem page (#3475)
Co-authored-by: Michael Grund <[email protected]> Co-authored-by: Yvonne Fröhlich <[email protected]>
1 parent 0bc1ee4 commit 29f12f5

File tree

2 files changed

+128
-0
lines changed

2 files changed

+128
-0
lines changed

doc/ecosystem.md

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# Ecosystem
2+
3+
PyGMT provides a Python interface to the Generic Mapping Tools (GMT), which is a command
4+
line program that provides a wide range of tools for manipulating geospatial data and
5+
making publication-quality maps and figures. PyGMT integrates well with the
6+
[scientific Python ecosystem](https://scientific-python.org/), with [NumPy][] for its
7+
fundamental array data structure, [pandas][] for tabular data I/O and [Xarray][] for
8+
raster grids/images/cubes I/O.
9+
10+
In addition to these core dependencies, PyGMT also relies on several optional packages to
11+
provide additional functionality for users.
12+
13+
*This page was adapted from [GeoPandas's Ecosystem](https://geopandas.org/en/latest/community/ecosystem.html) page.*
14+
15+
## PyGMT dependencies
16+
17+
_Asterisk (*) after the package name indicates the package is a required dependency of PyGMT._
18+
19+
### NumPy*
20+
21+
[NumPy][] is the fundamental package for scientific computing in Python. It is a Python
22+
library that provides a multidimensional array object, various derived objects (such as
23+
masked arrays and matrices), and an assortment of routines for fast operations on arrays,
24+
including mathematical, logical, shape manipulation, sorting, selecting, I/O, discrete
25+
Fourier transforms, basic linear algebra, basic statistical operations, random simulation
26+
and much more.
27+
28+
### pandas*
29+
30+
[pandas][] is a Python package providing fast, flexible, and expressive data structures
31+
designed to make working with "relational" or "labeled" data both easy and intuitive.
32+
It aims to be the fundamental high-level building block for doing practical, real-world
33+
data analysis in Python.
34+
35+
### Xarray*
36+
37+
[Xarray][] is an open source project and Python package that introduces labels in the
38+
form of dimensions, coordinates, and attributes on top of raw NumPy-like arrays, which
39+
allows for more intuitive, more concise, and less error-prone user experience.
40+
41+
### IPython
42+
43+
[IPython][] provides a rich toolkit to help you make the most of using Python
44+
interactively. Its main components are a powerful interactive Python shell and a Jupyter
45+
kernel to work with Python code in Jupyter notebooks and other interactive frontends.
46+
47+
PyGMT relies on IPython to provide a rich interactive experience in Jupyter notebooks.
48+
49+
### GeoPandas
50+
51+
[GeoPandas][] is an open source project to make working with geospatial data in Python
52+
easier. GeoPandas extends the datatypes used by [pandas][] to allow spatial operations
53+
on geometric types. Geometric operations are performed by [Shapely][]. GeoPandas further
54+
depends on [pyogrio][] for file access and [Matplotlib][] for plotting.
55+
56+
PyGMT doesn't directly rely on GeoPandas, but provides support of GeoPandas's two main
57+
data structure, {class}`geopandas.GeoDataFrame` and {class}`geopandas.GeoSeries`, which
58+
can be directly used in data processing and plotting functions/methods of PyGMT.
59+
60+
### contextily
61+
62+
[contextily][] is a small Python package to retrieve tile maps from the internet. It can
63+
add those tiles as basemap to matplotlib figures or write tile maps to disk into
64+
geospatial raster files.
65+
66+
In PyGMT, {func}`pygmt.datasets.load_tile_map` and {class}`pygmt.Figure.tilemap` rely
67+
on it.
68+
69+
### rioxarray
70+
71+
[rioxarray][] is a geospatial [Xarray][] extension powered by [rasterio][]. Built on top
72+
of rasterio, it enables seamless reading, writing, and manipulation of multi-dimensional
73+
arrays with geospatial attributes such as coordinate reference systems (CRS) and spatial
74+
extent (bounds).
75+
76+
Currently, PyGMT relies on [rioxarray][] to save multi-band rasters to temporary files
77+
in GeoTIFF format, to support processing and plotting 3-D {class}`xarray.DataArray`
78+
images.
79+
80+
```{note}
81+
We're working towards removing the dependency of the [rioxarray][] package in
82+
[PR #3468](https://github.com/GenericMappingTools/pygmt/pull/3468).
83+
```
84+
85+
### PyArrow
86+
87+
[Apache Arrow][] is a development platform for in-memory analytics. It contains a set of
88+
technologies that enable big data systems to process and move data fast. It specifies a
89+
standardized language-independent columnar memory format for flat and hierarchical data,
90+
organized for efficient analytic operations on modern hardware. The Arrow Python bindings
91+
(also named "[PyArrow][]") have first-class integration with NumPy, pandas, and built-in
92+
Python objects. They are based on the C++ implementation of Arrow.
93+
94+
```{note}
95+
If you have [PyArrow][] installed, PyGMT does have some initial support for
96+
`pandas.Series` and `pandas.DataFrame` objects with Apache Arrow-backed arrays.
97+
Specifically, only uint/int/float and date32/date64 are supported for now.
98+
Support for string Array dtypes, Duration types and GeoArrow geometry types is still a work in progress.
99+
For more details, see
100+
[issue #2800](https://github.com/GenericMappingTools/pygmt/issues/2800).
101+
```
102+
103+
## PyGMT ecosystem
104+
105+
Various packages rely on PyGMT for geospatial data processing, analysis, and visualization.
106+
Below is an incomplete list (in no particular order) of tools which form the PyGMT-related
107+
ecosystem.
108+
109+
```{note}
110+
If your package relies on PyGMT, please
111+
[let us know](https://github.com/GenericMappingTools/pygmt/issues/new) or
112+
[add it by yourself](contributing.md).
113+
```
114+
115+
[apache arrow]: https://arrow.apache.org/
116+
[contextily]: https://contextily.readthedocs.io/
117+
[geopandas]: https://geopandas.org/
118+
[ipython]: https://ipython.org/
119+
[matplotlib]: https://matplotlib.org/
120+
[numpy]: https://numpy.org/
121+
[pandas]: https://pandas.pydata.org/
122+
[pyarrow]: https://arrow.apache.org/docs/python/
123+
[pyogrio]: https://pyogrio.readthedocs.io/
124+
[rasterio]: https://rasterio.readthedocs.io/
125+
[rioxarray]: https://corteva.github.io/rioxarray/
126+
[shapely]: https://shapely.readthedocs.io/
127+
[xarray]: https://xarray.pydata.org/

doc/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ api/index.rst
4545
techref/index.md
4646
changes.md
4747
minversions.md
48+
ecosystem.md
4849
```
4950

5051
```{toctree}

0 commit comments

Comments
 (0)