Kickstart Python (Plotting and Programming in Python)

HIDA

Online

Mar 27-28, 2025

9:00 am - 1:00 pm CET

Instructors: Johannes Wasmer (Day 1), Elena Eftimova (Day 2)

Helpers: Elena Eftimova (Day 1), Johannes Wasmer (Day 2)

General Information

The Carpentries project comprises the Software Carpentry, Data Carpentry, and Library Carpentry communities of Instructors, Trainers, Maintainers, helpers, and supporters who share a mission to teach foundational computational and data science skills to researchers.

Want to learn more and stay engaged with The Carpentries? Carpentries Clippings is The Carpentries' biweekly newsletter, where we share community news, community job postings, and more. Sign up to receive future editions and read our full archive: https://carpentries.org/newsletter/

Software Carpentry aims to help researchers get their work done in less time and with less pain by teaching them basic research computing skills. This hands-on workshop will cover basic concepts and tools, including program design, version control, data management, and task automation. Participants will be encouraged to help one another and to apply what they have learned to their own research problems.

For more information on what we teach and why, please see our paper "Best Practices for Scientific Computing".

Who: The course is aimed at graduate students and other researchers. You don't need to have any previous knowledge of the tools that will be presented at the workshop.

Where: This training will take place online. The instructors will provide you with the information you will need to connect to this meeting.

When: Mar 27-28, 2025; 9:00 am - 1:00 pm CET Add to your Google Calendar.

Requirements: Participants must have access to a computer with a Mac, Linux, or Windows operating system (not a tablet, Chromebook, etc.) that they have administrative privileges on. They should have a few specific software packages installed (listed below).

Glosario is a multilingual glossary for computing and data science terms. The glossary helps learners attend workshops and use our lessons to make sense of computational and programming jargon written in English by offering it in their native language. Translating data science terms also provides a teaching tool for Carpentries Instructors to reduce barriers for their learners.

Contact: Please email hida-courses@helmholtz.de , j.wasmer@fz-juelich.de or elena.eftimova@dlr.de for more information.

Roles: To learn more about the roles at the workshop (who will be doing what), refer to our Workshop FAQ.


Code of Conduct

Everyone who participates in Carpentries activities is required to conform to the Code of Conduct. This document also outlines how to report an incident if needed.


Collaborative Notes

We will use this collaborative document for chatting, taking notes, and sharing URLs and bits of code.



Schedule

Day 1

Before See "Setup" below
9:00 Welcome, finish setup and Python basics
10:00 Data types and built-in functions
11:00 Break
11:15 Tabular data and Pandas
12:15 Plotting
13:00 End

Day 2

9:00 Lists, loops, and conditionals
10:00 Python functions
11:00 Break
11:15 Variable scope and programming style
12:00 Wrap-up and feedback
12:30 Time buffer or Outlook
13:00 End

Setup

To participate in a Software Carpentry workshop, you will need access to software as described below. In addition, you will need an up-to-date web browser.

We maintain a list of common issues that occur during installation as a reference for instructors that may be useful on the Configuration Problems and Solutions wiki page.

Install the videoconferencing client

If you haven't used Zoom before, go to the official website to download and install the Zoom client for your computer.

Set up your workspace

Like other Carpentries workshops, you will be learning by "coding along" with the Instructors. To do this, you will need to have both the window for the tool you will be learning about (a terminal, RStudio, your web browser, etc..) and the window for the Zoom video conference client open. In order to see both at once, we recommend using one of the following set up options:

This blog post includes detailed information on how to set up your screen to follow along during the workshop.

Getting the Data

The data we will be using is taken from the gapminder dataset. To obtain it, download and unzip the file python-novice-gapminder-data.zip .

Python Setup

We offer two options. A local setup on your own computer, and a setup-free browser-based solution. We recommend the local setup for setting you up for a continued growth of your future programming skills. But if you don't have time for the setup, go for the browser-based solution. That is fine.

In all of the offered solutions, we will use Jupyter notebooks for programming, a popular approach in data science. The interfaces in all solutions are nearly identical.

Browser-based setup

If you don't want to do or can't do the local setup, we offer a setup-free, browser-based solution. We will use Google Colab. This is a free service by Google for browser-based Python programming. You will need: a compatible web browser (Chromium, Firefox or Safari; Chromium is recommended), and a personal Google account. If you don't have one, create one here: https://accounts.google.com/signup. Then try to access Google Colab. If that works, you are done. We will distribute a Colab notebook template for you to use in the course.

If you don't want to use Google Colab, while we acknowledge that there alternatives to Google Colab that do not require a Google account, we kindly ask you to attempt the local setup, instead. This course relies on all instructors and students to have the same setup. We lack personnel to be able to offer support for more than two setups at a time.

You are now done with the browser-based setup.

Local setup (recommended)

For the local setup, we need to install two things: the official python.org Python distribution and an editor for the programming. If at any point during the installation, you fail to proceed because of missing administrator rights, please contact your local system administrator or tech support, and ask them to install the software for you. Please ask them to stick to the software and extensions mentioned here. This course relies on all instructors and students have a similar setup, to minimize differing setup issues.

An aside note. Editions prior to 2025 of this course used the Anaconda Python distribution. However, due to change in licensing, this option is not viable anymore for research organizations like the Helmholtz Society. If you would like more information on this, see here.

1. Install Python

Check if Python is already installed on your computer. Open a terminal/command prompt.

  • Windows: Press Windows key + R, type cmd and press Enter
  • Mac: Press Command key + Space, type term, select Terminal and press Enter
  • Linux: Press Ctrl + Alt + T or find Terminal in your applications menu

Check for Python. Type one of these commands and press Enter:

python --version

If that doesn't work, try:

python3 --version

Windows users can also try:

py --version

If any command returns a version number 3.9 or higher (e.g., Python 3.11.5), Python is installed and you can proceed to the VS Code installation.

If Python is not found or version is too old, we will install it now.

  1. Visit python.org/downloads
  2. Download the latest version for your operating system
  3. Run the installer
    • Windows users: Check the box "Add Python to PATH" during installation
    • Mac/Linux users: Follow the default installation options

After installation, open a new terminal window and check again, using the same method as before, to confirm Python is now installed correctly. You may need to open a new terminal tab or window for the update to the system to be recognized.

The next thing to do is to set up a project folder and a Python virtual environment to work with data science libraries in Jupyter notebooks. However, we will do this all together during the course.

2. Install Visual Studio Code (optional)

At this point, you can either choose to stop, or proceed to installing Visual Studio Code. If you choose to stop, you will work with JupyterLab. This comes together with the virtual environment that we'll set up together, so you don't need to do that now. We give you either option, because the interfaces of all these options (Google Colab, JupyterLab, VSCode) are very similar. For data science beginners, JupyterLab is absolutely fine. If you are already curious, proceed to VSCode.

Visual Studio Code is a popular, free code editor by Microsoft for Python and other programming languages. The editor itself only has basic programming features. But the rich ecosystem of community-driven extensions makes it adaptable to most programming tasks.

Download it from code.visualstudio.com.

We want to make you aware that while Microsoft's VS Code is open source, it collects anonymized telemetry data for product improvement (reference). If you do not want that, there is a community-driven version that does not collect telemetry data, here. In the course, we will only be able to give support for issues with the Microsoft version.

Now we need to install VSCode extensions needed for this course.

  1. Open VSCode
  2. Click on the Extensions icon in the left sidebar (looks like four squares)
  3. Search these extension and click "Install":

After the extension installations are complete, close the editor.

You are now done with the local setup.