DINO SIP Python workshop materials#

A compressed introduction to Python for participants in the DINO SIP program at the University of Washington Applied Physics Laboratory.

Goals#

  1. Provide exposure to the Python programming language and “ecosystem” specifically, and programming and open-source software more generally.

  2. Provide a ramp for future, self-guided learning to both strengthen core topics that were covered and explore new topics.

With open-source software, we build on the work of others, contribute back to it, and build something new on top in collaboration with others. Rather than creating learning materials from scratch, here we’ll rely on existing, open community resources. We can correct, polish and extend these materials with your input!

This workshop is intended as a 3-hour workshop, but the source materials provide a longer, more comprehensive experience.

Python#

Python is a free, open-source, general-purpose and high-level programming language. It’s relatively easy to learn, and the syntax facilitates writing new code fairly quickly. In the last few years it has become one of the most widely used general programming languages (see here and here) and among the most popular languages for data science applications. It’s also widely used in the scientific community in general, and in Oceanography specifically (see here and here).

It runs on many operating systems (Windows, MacOS, etc), and on computers from the smallest to the largest. It’s often used in introductory programming classes, especially outside Computer Science majors.

An an open-source language, it is freely available to anyone for any purpose, and both the core language (Python proper) and a very large “ecosystem” of packages (libraries) engage a wide range of contributors. But this openness sometimes leads to a disorienting set of choices, including the Python version, the sources and software used to install Python and write code in Python, and specialized packages used to accomplish specific tasks. Compared to, say, Matlab, the entry points can be more confusing. But there are tons of helpful resources and communities online!

Installation and execution#

A brief overview of options for installing Python and developing and executing Python code. It points to specific instructions for installing the Anaconda distribution and the JupyterLab user interface, which we will use.

Lessons#

  • Quick, live overview. We’ll run quickly through many of the core features of the language, using a Jupyter notebook in a live session online.

  • Detailed lessons

  • Advanced examples. We’ll use a Python package to open and explore CTD data, including the data you collected last week!

Plus Python cheat sheets.