The repository for the April 18-19 2024 Python workshop on Programming and Reproducible Science in Basel.
- Jupyter notebooks as a tool for data analysis and publication
- Python programming language for data analysis
- Use of Git and GitHub for managing scientific projects and code
- Reproducible programming practices (any language)
The course consists of a few notebooks, some python code and data - and this readme. It resides in a GitHub repository, which is open to anyone, also after the course. For the workshop, we will use Google Colab, a cloud-based Jupyter notebook service. This means that you don't have to install anything on your computer, but can run the code in the notebooks in your browser.
There are two ways to get started with the course material:
- You can run the notebooks in Google Colab without any further ado. Just click on the links below, and you will be taken to Google Colab, where you can run the code in the notebooks. You can also edit the code, and save your changes (copy the notebook) to your Google Drive.
- You can fork the repository to your own GitHub account, and then run the notebooks in Google Colab -- or even on your own computer. This way, you get to practice using Git and GitHub, which is a good idea if you want to work on code with others, or if you want to keep track of your own code over time. To do this:
- After the first instruction, you will go to GitHub and create a user account there.
- After this first registration you can have GitHub convert your account to an education account, which enhances your account for free - but that's for later.
- Once you have a GitHub account and are logged in, you can go to the course repository and
fork
it - there's a button on the right top. Forking copies the repository over to your user account, but instead of just copying, it retains the possibility of automatically recombining your version and mine in the future. - Now that you have your own version of the code repo(sitory), you can open each of the notebooks in Google Colab, or install python on your own computer and do everything locally!. If you want to do this, please hit me up during the workshop and I can show you how to do it.
- After the first instruction, you will go to GitHub and create a user account there.
Go to, for when you've gotten the hang of Python as a language, and want to graduate to more advanced topics such as how to package your code, or just want to know more about how to write good python code for science:
A general resource that is a really good collection of learning materials is that of the software carpentries (notice how the name alludes to the fact that programming is a craft). They have all manner of relevant courses:
- Carpentry for python, very complementary to this workshop!
- Carpentry for Plotting and Programming in Python
- Carpentry for learning the UNIX shell
- Carpentry for GIT and version control concepts
- Colab tutorial on Youtube
- Colab page on Google Research has all sorts of examples and tutorials to get you started with Google Colab.
- Matplotlib tutorials
- Seaborn tutorials (Seaborn is built on top of Matplotlib)
- Altair, alternative plotting in python