Course

Python Programming for PhDs

Organised by WIMEK in collaboration with PE&RC
Date

Mon 27 January 2025 until Tue 4 February 2025

Duration 35 hours + preparation; 5 full days, 3 consecutive in the first week, 2 consecutive in the second week

Scope

Programming can serve multiple purposes. Purposes like developing applications and working with data are also very useful for research. For dealing with these issues, Python offers many libraries. Getting the skills of working with some of these libraries will enable future learning. This can be for more advanced programming applications, but also for self-learning to apply different libraries.

Learning goals

After the course, students should be able to:

  • Create a computer program based on a given basic algorithm expressed in plain English;
  • Adapt and combine standard algorithms to solve a given problem (includes numerical as well as non-numerical algorithms)
  • Detect and repair coding errors in a given piece of programming code
  • Use existing libraries taught during the course in programs, e.g., for data manipulation and visualization (Numpy, Pandas and Matplotlib)
  • Create useful code commenting for sharing and working together on programs.

    Assumed knowledge

    The following programming principles, in general and/or in Python:

    • Basic types: float, integer, string, list, tuple, dictionary
    • Conditionals: if-elif-else structures
    • Functional programming
    • Iterating: loops for a known and an unknown number of iterations
    • Text formatting: string formatting
    • File handling: reading to and writing from txt-files

    This is reflected in the following materials: Think Python chapters 1 through 14

    Study materials

    Textbook (for preparation):
    Think Python, how to think like a computer scientist, by Allen B. Downey, available on-line at: https://greenteapress.com/wp/think-python-2e

    Also available as printed book: 2nd edition by O'Reilly, ISBN: 978-1-491-93936-9. There will be a number of copies available in the WURshop (StudyStore) for about 39 EUR.

    Software:

    • PyCharm and Anaconda: installation instructions on Brightspace

    Materials on Brightspace:

    • Relevant assignments
    • Reading materials (mostly online)
    • Reading guide

    Official documentation of logging (docs.python.org), numpy, pandas and pyplot. Links in Brightspace.

    Principal themes

    Software libraries (modules). Modern programming languages consist of a relatively small core and many additional parts. Those additional parts are called libraries or (especially in Python) modules. The course teaches how to use a number of the modules that come with Python, and also how to define your own modules.

    Some of the most relevant libraries have to do with data. In particular, dealing with array-like data is possible in Python, but the mathematical capabilities are limited. Using Numpy allows more efficient and intuitive use of array-like data. Many data formats are tabular, such as excel files, cv-files, json-files. Dealing with these kinds of data in Python is easily done using pandas.
    Using pandas allows easy data manipulation and a link to Python, which means programming functionalities can be used on such data files.
    Visualizing data unlocks value and insight data written or tabular data can not. Using Pyplot, many visualization options are available. Being familiar with this library enables the making of proper plots and is also a stepping stone to the use of more advanced plotting libraries.

    Outline of the course

    • Day 1: Programming for research and data science introduction (morning). Refresher on basic principles of programming (in Python) (afternoon).
    • Day 2: Data structures and data sources (morning). Array-like (numpy) and tabular (pandas) data (afternoon).
    • Day 3: Data manipulation and handling (numpy and pandas) (morning) and data visualization (pyplot) (afternoon).
    • Day 4: Debugging and Error handling in Python (morning). Recap and assignment for handing in (afternoon).
    • Day 5: Bring your code. Discussing the relevant programming problems of course participants. Introduction and group discussions (morning) and plenary discussions and processing of findings (afternoon).

    Activities

    Days one, two, three and four will be split up in the morning (9.00 – 12.00) and afternoon (13.30 – 17.00). Each day part will be structured as follows: short lecture on the topic (±30 min), a class exercise on the topic (±60 min), and individual assignments (± 2.5 hours). During the class exercises an assignment will be done together with all participants. During the final day, a mix of plenary and group discussions combined with individual work time to work on brought in problems will be offered. Supervision will be available during all five days to offer support when needed. The course will be spread over two weeks: 3 full days in the first week and 2 full days in the second week.

    Assessment

    During the fourth day, one of the assignments made during the afternoon and will be graded using criteria specified for that assignment. Also a pass-fail structure will be applied on the attendance. A passing grade (>5.5) and a pass on attendance will be resulting in a passing grade for this course. 

    The use of generative artificial intelligence to create ready-made content in assignments is considered fraud.

    General information

    Registration

    Go to Registration form (Early bird registration deadline: 16 December, 2024. Regular registration deadline: 20 January 2025)

    Course duration

    5 full days spread over 2 weeks.

    Credit points

    1.5 ECTS

    Language

    English

    Group size

    20-30 people

    Frequency

    Once per year.

    Fee

    Role Early EUR (before 16 December 2024) Regular EUR (after 20 January 2025)
    WUR PhDs with TSP 270 310
    SENSE PhDs with TSP 540 590
    Staff of WUR graduate schools 540 590
    Other academic staff: 580 630
    Other PhDs 620 670
    Others/non-academic 850 900

    The course fee includes coffee, tea and lunch on all 5 days, and drinks on day 5.

    The fee does not include accommodation, breakfast or dinner. Accommodation is not included in the fee of the course, but there are several possibilities in Wageningen. For information on B&B’s and hotels in Wageningen please visit proefwageningen.nl/overnachten. Another option is Short Stay Wageningen. Furthermore, Airbnb offers several rooms in the area. Note that besides the restaurants in Wageningen, there are also options to have dinner at Wageningen Campus.

    Cancellation conditions

    • Up to 4 (four) weeks prior to the start of the course, cancellation is free of charge.
    • Up to 2 (two) weeks prior to the start of the course, half the course fee of
      €150,- will be charged.
    • In case of cancellation within less than two weeks to the start of the
      course, or if you do not show at all, the full course fee of €900,- will be charged.
    • If a cancellation comes between Friday 15:00 and Monday 10:00, we treat it as if it was sent on Monday 10:00.

    Note: If you would like to cancel your registration, ALWAYS inform us. By NOT paying the participation fee, your registration is NOT automatically cancelled (and do note that you will be kept to the cancellation conditions).

    Also note that when there are not enough participants, we can cancel the course. We will inform you if this is the case a week after the early bird deadline. Please take this into account when arranging your trip to the course (I.e. check the re-imburstment policies).