Complementary, in-depth lessons from other groups#
There are many free Python tutorials online; a quick search will produce a very long list. For example, Python Basics: Introduction to Python features many detailed lessons from https://realpython.com, which are a great source for Python in-depth learning. Project Pythia Foundations has a great collection of more advanced tutorials especially geared for the earth sciences, including Oceanography.
The lessons we created for the APL SURP course cover each topic relatively briefly. Rather than creating new, in-depth learning materials from scratch, we’ll take advantage of The Carpentries, “a global community teaching foundational computational and data science skills to researchers in academia, industry and government.” Carpentries tutorials and lessons are openly accessible.
Specifically, we’ll focus on the Plotting and Programming in Python lesson from The Carpentries: “This lesson is an introduction to programming in Python 3 for people with little or no previous programming experience.” It’s also referred to as the “gapminder” lesson, based on the dataset it uses.
Note
Another, similar Carpentries lesson that you may find helpful is Programming with Python: “The best way to learn how to program is to do something useful, so this introduction to Python is built around a common scientific task: data analysis.”
Getting the Data#
The data used in this subset of Software Carpentry lessons is taken from the gapminder dataset. To obtain it, download and unzip the file python-novice-gapminder-data.zip. To execute the lesson materials, launch JupyterLab in the folder that contains the unzipped data file. (see Starting JupyterLab).
Lesson episodes#
The Plotting and Programming in Python lesson is intended as a workshop that takes a full day. The subset of materials (referred to as “episodes”) presented here expands on the lessons presented directly in the APL SURP course.
The basics#
-
Other core Python data structures: tuples, dictionaries, sets
More advanced topics#
The key points from each episode are summarized here