Summary and Setup

This lesson build on the Plotting and Programming in Python lesson developed by Software Carpentry. For a review challenge of of the python needed for this lesson, please see the extra review episode.

This lesson also requires knowledge of the Unix Shell and Version Control with Git - incubator version with branches. This lesson works with both Jupyter Notebooks and writing scripts with a text editor to be run in the shell.

Prerequisite

Prerequisites

  1. Learners are expected to have been introduced to the material from the Unix Shell lesson, the Plotting and Programming in Python lesson, and the Version Control with Git - incubator version with branches.

  2. Learners must install Python before the workshop starts.

  3. Learners must get the gapminder data before class starts: please download and unzip the file python-novice-gapminder-data.zip.

Please see the setup instructions for details.

Setup


Installing Python

Follow the directions listed in the python installation section of Carpentries workshop website template for your operating system.

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. In order to follow the presented material, you should launch a Jupyter notebook in the root directory (see Starting Python section below).

Starting Python

We will teach Python using the Jupyter lab, a programming environment that runs in a web browser. Jupyter requires a reasonably up-to-date browser, preferably a current version of Chrome, Safari, or Firefox (note that Internet Explorer version 9 and below are not supported). If you installed Python using conda and have setup the carpentries conda environment, Jupyter should already be on your system.

To start the notebook, open a terminal or git bash or miniforge prompt.

Then, activate the carpentries conda enviornment

BASH

conda activate carpentries

Then, navigate to your project folder. If it is called swc and located on your Desktop it might look something like this:

BASH

cd ~/Desktop/swc

then launch jupter:

BASH

$ jupyter lab

To start the Python interpreter without the notebook, open a terminal or Git Bash or miniforge prompt and type the command:

BASH

$ python