Learning materials#

PyPSA meets Earth builds on top of several open-source packages, which are here recalled together with recommended sources to learn them from scratch.

YouTube Tutorials#

We host training and presentation videos about PyPSA ecosystem tools made for users, developers and interested people.

PyPSA Introduction (essential)#

Data science basics (essential)#

  • Fabian Neumann just shared with the world the possibly best training material for “Data Science for Energy System Modelling”. This is a free multi-week course preparing you for all you need for PyPSA-Earth.

  • Refresh your Python knowledge by watching CSDojo’s playlist. His content is excellent as introduction. You will learn in effective short videos the python basics such as variables If/else statements, functions, lists, for loops, while loops, dictionaries, classes and objects, boolean, list comprehensions, sets - put your hands on and write some test scripts as the video suggests. (~3h)

  • Familiarize yourself with numpy and panda dataframes. In the Python-based PyPSA tool, we do not work with Excel. Powerful panda dataframes are our friends. Here is an extensive 30h course that provides a great introduction if this is completely unfamiliar to you.

  • Introduction to Unix-shell - “Use of the shell is fundamental to a wide range of advanced computing tasks, including high-performance computing and automated workflow. These lessons will introduce you to this powerful tool.” (optional 4h, to become a pro)

Git and GitHub#

For code collaboration we use GitHub. Which is a common source control tool that is a very popular collaborative code development tool. Here some notes if you are not already familiar with it:

  • Git and GitHub is not the same. Usually, you work with git on your computer (offline) to push changes to GitHub (online).

  • Here a great intro which we recommend

  • Learning by doing. Maybe one of the best ways to learn is to puts your hands on open a GitHub repository and upload/change/reverse files from your local computer on some dummy scripts.

  • This cheatsheet might help using the Git commands

Snakemake and advanced changes#

Snakemake is our brain in PyPSA. It automates many tasks & keeps the code structure clean. Therefore, it is quite useful to learn if your task is to integrate features into PyPSA. We can recommend:

  • snakemake basic and advanced tutorial here (takes max 3-5h and makes a lot of fun).

  • Explore how PyPSA uses snakemake in the Snakefile and scripts - the GitHub search function is your best friend to find quickly what interests you.

Code environment#

We can recommend setting up VScode from Microsoft. Add some extension if you like as described in this video. For instance GitHub, Gitlense, and maybe some others.

Note: if you decide to use Visual Studio Code, check out the tutorial about how to use Git and Github in Visual Studio Code