Welcome to PaleoHack - Python introduction workshop
These short modules will walk you through an introduction to Python and the scientific Python stack; namely, NumPy, Pandas,Matplotlib, and Cartopy. These packages form the foundation upon which Pyleoclim is built. The last two modules refer to the use of GitHub and FAIR principles.
After these modules, you will be able to use Python more effectively for your research and work with Pyleoclim more efficiently. Remember that Pyleoclim is built upon these tools, so learning to make a plot in Matplotlib, for instance, will give you a better idea of how Pyleoclim works under the hood and how you can modify your plots.
This page runs on a python3 kernel.
In this module, you will learn how to write basic Python code. Make sure that you go through the material provided by Project Pythia before attempting the exercises. Note that the first time you build the Binder, this may take some time. Also do not navigate away from the code block (e.g., by opening another exercise) as this will stop the execution.
This module will teach you how to use Jupyter Notebook/JupyterLab. We will be making use of these technologies for the reminder of the hackathon. There are no LinkedEarth specific exercises related to this module.
This module will teach you about NumPy. NumPy arrays are the most basic data structure for Pyleoclim, underlying all the other packages. Virtually all operations made on the data involve NumPy arrays, so it is important to understand a bit about how they work.
This model will teach you how to user Pandas. Some functionalities in Pyleoclim are supported by Pandas (and we will add more in the coming year). For now, Pandas represent the easiest way to get non-LiPD formatted data into Python for use with Pyleoclim. One of the main reasons we do not use Pandas is because most its advanced capabilities require a datetime format incompatible with paleoclimate data.
This module will teach you how to use Matplotlib, a comprehensive library for creating static, animated, and interactive visualizations in Python. The module is structured around the visualization of two contemporaneous monthly timeseries: the NINO3 SST dataset and All India Rainfall, to explore potential connections.