Data for this lesson is from the Portal Project Teaching Database - available on FigShare.
We will use the six files listed below for the data in this lesson. Download these files to your computer either by clicking this link, which will give you everything in a single compressed file. You’ll need to unzip this file after downloading it.
Or download each file indvidually with the following links:
Python is a popular language for scientific computing, and great for general-purpose programming as well. Installing all of its scientific packages individually can be a bit difficult, so we recommend an all-in-one installer.
For this workshop we use Python version 3.x.
Required Python Packages for this workshop
Download Anaconda’s Python 3.x installer and run it according to the instructions. This automatically installs the above-listed required Python packages.
Check the installation
In the terminal or the Anaconda Prompt, type:
Launch a Jupyter notebook
After installing Anaconda, launch a Jupyter notebook by typing this command from the terminal:
The notebook should open automatically in your browser. If it does not or you wish to use a different browser, open this link: http://localhost:8888.
For a brief introduction to Jupyter Notebooks, please consult with our Introduction to Jupyter Notebooks page.
We use it for its user-friendly presentation of plots, data and text. However, it does cause problems for projects larger than a single analysis script.
Optional: Install PyCharm with EduTools
For developing larger Python codes and projects after this introduction lesson, we recommend PyCharm Community.
It can be upgraded with EduTools which makes many interactive tutorials available to continue learning.
One downside compared to Jupyter Notebooks: plots are not automatically shown.
You need to search its settings
IPython, enable it and use the commands:
import matplotlib.pyplot as plt ...plotting code... plt.show()