New Book “Python Recipes for Earth Sciences” (Springer 2022)

I just published a new textbook “Python Recipes for Earth Sciences” with Springer. After several books based on the MATLAB programming environment, I now present a book on data analysis with Python. 

Python is used in a wide range of geoscientific applications, such as in processing images for remote sensing, in generating and processing digital elevation models, and in analyzing time series. This book introduces methods of data analysis in the geosciences using Python that include basic statistics for univariate, bivariate, and multivariate data sets, time series analysis, and signal processing; the analysis of spatial and directional data; and image analysis. The text includes numerous examples that demonstrate how Python can be used on data sets from the earth sciences. The supplementary electronic material (available online through Springer Link) contains the example data as well as recipes that include all the Python commands featured in the book.

One of the problems of Python and its packages is the lack of backward compatibility. This is a problem that I did not know to this extent from MATLAB and therefore underestimated the problem. One way out is to use environments. It is recommended to create an environment for each Python project in which the used version of Python and the packages are frozen. If you want to restart an old project, you have to change the environment. The result is a collection of countless environments, but Python users seem to be willing to get used to this. The Python codes for the book were developed between Nov 2021 and Jan 2022, here is the appropriate .yaml file to reconstruct the environment to use the book. In the book I recommended to use the free Anaconda distribution with the book. I must correct myself, in fact the Miniconda distribution has proven to be more useful.

The other problem I’m encountering now is the lack of support with Python – other than with MATLAB with a professional support being included in the licences – which is why I’m now getting numerous emails. Unfortunately I can’t provide support with Python, its installation or setup. Professional support is available from companies like Anaconda or Stack Overflow, but costs a lot of money if it should be more than access to a knowledge base – similar to the freely available MATLAB Answers. I will, however, inform you about errors, updates and improvements of the content of the book. An errata file will be made available soon, similar to the one for the MATLAB-based sister book.

Reference

Trauth, M.H. (2022) Python Recipes for Earth Sciences – First Edition. Springer International Publishing, ~453 p., Supplementary Electronic Material, Hardcover, ISBN 978-3-031-07718-0.