-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
131 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
site_name: Python Course 2023 | ||
site_name: Python Course 2024 | ||
theme: | ||
favicon: 'img/favicon.ico' | ||
name: material | ||
features: | ||
- navigation.tabs | ||
markdown_extensions: | ||
- admonition | ||
|
||
site_url: https://ueapy.github.io/pythoncourse2023-website | ||
repo_url: https://github.com/ueapy/pythoncourse2023-website | ||
|
||
site_url: https://ueapy.github.io/pythoncourse2024-website | ||
repo_url: https://github.com/ueapy/pythoncourse2024-website | ||
site_author: Tiago Silva (after Eliza Karlowska, Denis Sergeev) | ||
docs_dir: src | ||
site_dir: _site | ||
|
||
nav: | ||
- Home: index.md | ||
- Programme: programme.md | ||
# - Programme: programme.md | ||
- Content: content.md | ||
- Installation: installation.md | ||
- Resources: resources.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,33 @@ | ||
<center> | ||
<a href="http://www.uea.ac.uk"><img src="flyer/uealogo.png" title="University of East Anglia" style="height:75px;" hspace="20"></a> | ||
<a href="https://www.aries-dtp.ac.uk/"><img src="flyer/aries_logo.png" title="Aries DTP" style="height:75px;" hspace="20"></a> | ||
<a href="http://www.cefas.co.uk"><img src="flyer/cefas_logo.png" title="Cefas" style="height:75px;" hspace="20"></a> | ||
</center> | ||
|
||
|
||
# Introduction to Python in Environmental Sciences | ||
*ARIES & Cefas course* | ||
Delivered by [*ARIES Doctoral Training Programme*](https://www.aries-dtp.ac.uk) & the [*Centre for Environment, Fisheries and Acquaculture Studies*](http://www.cefas.co.uk/) | ||
|
||
## General information | ||
|
||
|
||
* The 3-day course organised by [ARIES DTP](https://www.aries-dtp.ac.uk/) and [Cefas](http://www.cefas.co.uk/) giving a hands-on introduction to [Python](http://www.python.org/) programming language. | ||
* You will learn Python programming, starting from the basics, and evolving into data analysis aand visualisation using data formats commonly used in environmental sciences. | ||
* The 3-day course organised by [ARIES DTP](https://www.aries-dtp.ac.uk/) and [Cefas](https://www.cefas.co.uk/) giving a hands-on introduction to [Python](http://www.python.org/) programming language. | ||
* You will learn Python programming, starting from the basics, and evolving into data analysis and visualisation using data formats commonly used in environmental sciences. If you have no programming experience in any language, it is recommended that you take a 1-2 hour online course, such as [Python Basics on datacamp](https://app.datacamp.com/learn/courses/intro-to-python-for-data-science), to get confortable with basic concepts such as variables. | ||
* Suitable for both python novices and intermediate users. | ||
* In person course at the UEA (Blackdale school building). Lunch and refreshments will be provided. | ||
* In person course at the UEA ([Zicer Building](https://www.uea.ac.uk/about/campus-map), room 0.02). Lunch and refreshments will be provided. | ||
* We will offer a limited number of places online for ARIES studends that are not registered with the UEA and CEFAS staff based in Weymouth. | ||
|
||
### When and where | ||
|
||
| Day | Time (BST) | Location | Topics covered | | ||
|-----|----------|-------|----------| | ||
| 1st of July 2023 | 8:30 - 17:00 | UEA BDS 0.21 | Python basics | | ||
| 2nd of July 2023 | 9:00 - 17:00 | UEA BDS 0.21 | Functions, simple programs and arrays | | ||
| 3rd of July 2023 | 9:00 - 17:00 | UEA BDS 0.21 | Plotting and data analysis | | ||
| Day | Time (BST) | Topics covered | | ||
|-----|------------|----------------| | ||
| 1st of July 2024 | 8:30 - 17:00 | Python basics | | ||
| 2nd of July 2024 | 9:00 - 17:00 | Functions, simple programs and arrays | | ||
| 3rd of July 2024 | 9:00 - 17:00 | Plotting and data analysis | | ||
|
||
|
||
[comment]: <> (Full timetable available [here](programme.md).) | ||
|
||
Full timetable available [here](programme.md). | ||
|
||
### Topics covered by the course | ||
* Python basics and programming environment | ||
|
@@ -29,6 +38,7 @@ Full timetable available [here](programme.md). | |
|
||
### Ahead of the course | ||
|
||
* If you have no programming experience in any language, it is recommended that you take a 1-2 hour online course beforehand to get yourself familiarised with basic concepts such as variables. e.g. [Python Basics on datacamp](https://app.datacamp.com/learn/courses/intro-to-python-for-data-science). | ||
* [Install](installation.md) course environment and materials in the week before. | ||
* Bring your own laptop. | ||
|
||
|
@@ -47,14 +57,10 @@ Register at [Eventbrite](https://www.eventbrite.co.uk/). | |
|
||
If you have queries please contact: | ||
|
||
* [Jenny (Cefas)](mailto:jennifer.graham@cefas.gov.uk) | ||
* [Claire (Cefas)](mailto:claire.beraud@cefas.gov.uk) | ||
* [Eliza (UEA, Aries)](mailto:[email protected]) | ||
|
||
|
||
## Unable to attend? | ||
|
||
Contact us by email to receive access to the recorded sessions. | ||
|
||
## Support after the course? | ||
|
||
### Cefas | ||
|
@@ -64,13 +70,8 @@ Contact Claire Beraud to join the group and receive future invites. | |
|
||
The Turn up & Code code group meets regularly to support personal development in programming in any language. | ||
|
||
Contact Lianne Harrison if you ar enot receiving calendar invites. | ||
Contact Lianne Harrison if you want to receive calendar invites. | ||
|
||
### UEA | ||
The UEA Python group meets occasionally. Check the archives of previous sessions here: [https://ueapy.github.io](https://ueapy.github.io/). Or join our [Slack workspace](https://uea-python.slack.com/) to ask questions and take part in weekly coding drop ins. | ||
|
||
<center> | ||
<a href="http://www.uea.ac.uk"><img src="flyer/uealogo.png" title="University of East Anglia" style="height:75px;" hspace="20"></a> | ||
<a href="https://www.aries-dtp.ac.uk/"><img src="flyer/aries_logo.png" title="Aries DTP" style="height:75px;" hspace="20"></a> | ||
<a href="http://www.cefas.co.uk"><img src="flyer/cefas_logo.png" title="Cefas" style="height:75px;" hspace="20"></a> | ||
</center> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,90 @@ | ||
# Installation instructions | ||
|
||
# WiFi access for Cefas staff | ||
#### Note: WiFi access for Cefas staff | ||
If your laptop is configured to use the eduroam academic network this will be available across campus. Alternatively [register to Sky's free WiFi The Cloud](https://account.thecloud.eu/spportal/). | ||
|
||
# Laptop Installation | ||
For this course you will need to have Python installed on your laptop, including some extra packages. Follow the instructions below to set up your Python environment. Make sure you do this do this **before** the course, including running the test as below. There will be a troubleshooting session on the first day at 8:30 as advertised in the invite email. | ||
|
||
As an alternative you can use cloud hosting by [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/ueapy/pythoncourse2023-materials/main?urlpath=lab) to run all the lessons with the data here contained (it is not possible to load your own data), but any changes made won't be saved. | ||
It is recommended to have python installed on your laptop. Nevertheless there are two alternatives: | ||
|
||
Feel free to contact [Jenny at Cefas](mailto:[email protected]) or [Eliza at UEA](mailto:[email protected]) if you have any problems with the installation (but better do an internet search first!) | ||
Note: The course is designed in Python 3.9 but even if you have a different version installed, 3.9 will be installed when creating a conda environment in step 3 below. | ||
* If you are unable to install python on your laptop, you can use the free cloud hosting service [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/ueapy/pythoncourse2024-materials/main?urlpath=lab). It will allow you to run all the lessons with the accompaigning data albeit with some limitations. It will be slower to start a session and run more involved examples, and it will not allow you to load your own data or save any changes made to the lessons. | ||
|
||
## 1. Install Python distribution | ||
* If you already have an account on the Ada High Performance Computing Cluster, then it would be possible to run the Jupyter notebooks of the lessons by starting a session on [Ada OnDemand](https://adaood01.uea.ac.uk/). You can try to follow the instructions below for copying and running the lessons, but we won't be able to provide support to get yourself setup. | ||
|
||
### Cefas Users | ||
## 1. Laptop Installation | ||
For this course it is recommneded that you have Python installed on your laptop. Follow the instructions below to set up your Python environment with the required packages used in the lessons. Make sure you do this do this **before** the course, including running the test as below. There will be a troubleshooting session on the first day at 8:30 as advertised in the invite email. | ||
|
||
Feel free to contact [Claire at Cefas](mailto:[email protected]) or [Eliza at UEA](mailto:[email protected]) if you have any problems with the installation (but better do an internet search first!) | ||
|
||
### 1.1 Install Python distribution | ||
|
||
#### Cefas Users | ||
You will neet to request in advance a temporary administrator password to make the installation. | ||
|
||
As a government organisation we do not have free access to Anaconda, so please use the free alternative mambaforge. For those in academia, we also recommend this as a more lightweight (and often faster) python installation option! | ||
|
||
1.1.a [Download Mambaforge for your OS](https://github.com/conda-forge/miniforge#mambaforge) | ||
* [Download Mambaforge for your OS](https://github.com/conda-forge/miniforge#mambaforge) | ||
|
||
1.2.a After downloading, follow the instructions as suggested [here](https://github.com/conda-forge/miniforge#install) | ||
* After downloading, follow the instructions as suggested [here](https://github.com/conda-forge/miniforge#install) | ||
|
||
### Students or UEA Staff | ||
1.1.b. [Download Anaconda with Python 3 for your OS](https://www.anaconda.com/download/). | ||
#### Students or UEA Staff | ||
|
||
1.2.b. Install it following [these instructions](https://docs.anaconda.com/anaconda/install/). Be sure to select install "just me" when prompted. | ||
* [Download Anaconda with Python 3 for your OS](https://www.anaconda.com/download/). | ||
|
||
### UEA HPC (Ada) | ||
Following the course, there are a number of modules available for use of python on Ada, using either mamba or anaconda. | ||
* Install it following [these instructions](https://docs.anaconda.com/anaconda/install/). Be sure to select install "just me" when prompted. | ||
|
||
However, for the purpose of this course, we recommend viewing the notebooks on your own machine. | ||
|
||
## 2. Download course materials | ||
From the Friday before the course (28th of June) the material for the workshop can be downloaded as a [zip file](https://github.com/ueapy/pythoncourse2023-materials/archive/main.zip) or can be cloned from our [GitHub repository](https://github.com/ueapy/pythoncourse2023-materials). | ||
### 1.2. Download course materials | ||
From the Friday before the course (28th of June) the material for the workshop can be downloaded as a [zip file](https://github.com/ueapy/pythoncourse2024-materials/archive/main.zip) or can be cloned from our [GitHub repository](https://github.com/ueapy/pythoncourse2024-materials). | ||
|
||
|
||
### Option 1: Download ZIP file (easier) | ||
Download the materials as a [zip file](https://github.com/ueapy/pythoncourse2023-materials/archive/main.zip) and unpack it in a suitable directory, for example, in `Downloads` folder. Jump to [3. Create the environment](installation.md#3.-Create-the-environment). | ||
#### 1.2.1. Option 1: Download ZIP file (easier) | ||
Download the materials as a [zip file](https://github.com/ueapy/pythoncourse2024-materials/archive/main.zip) and unpack it in a suitable directory, for example, in `Downloads` folder. Jump to [1.3. Create the environment](#13-create-the-environment). | ||
|
||
### Option 2: Using Git (allows restoring originals after modifications) | ||
#### 2.1. Install Git | ||
#### 1.2.2. Option 2: Using Git (allows restoring originals after modifications) | ||
##### 1.2.2.1. Install Git | ||
If you don't have git version control system installed, you can install it following these instructions: | ||
##### Linux | ||
###### Linux | ||
Use your package manager. For example, using aptitude you would run the following terminal command: `sudo apt-get install git` | ||
##### Mac | ||
* The XCode command line tools need to be installed. | ||
###### Mac | ||
The XCode command line tools need to be installed. | ||
|
||
* Install XCode if it isn’t already. XCode is available in the Mac App Store for free. | ||
* Launch XCode and accept the license agreement. | ||
* Quit XCode. | ||
* Open a new terminal and run the command xcode-select --install | ||
* Open a new terminal and run the command `xcode-select --install` | ||
* Select install on the pop-up menu. | ||
##### Windows | ||
|
||
###### Windows | ||
Download and install [Git for Windows](https://git-scm.com/downloads). | ||
|
||
#### 2.2. Clone the repository | ||
2.2.1. Open the command line (Git bash, terminal or cmd.exe) | ||
##### 1.2.2.2. Clone the repository | ||
|
||
Open the command line (Git bash, terminal or cmd.exe) | ||
|
||
2.2.2. (Linux or Mac, optional) Change to a suitable directory (e.g. `cd /home/yourname/Documents`) | ||
(Linux or Mac, optional) Change to a suitable directory (e.g. `cd /home/yourname/Documents`) | ||
|
||
2.2.3. Clone the repo by typing | ||
Clone the repo by typing | ||
|
||
``` | ||
git clone https://github.com/ueapy/pythoncourse2023-materials.git | ||
git clone https://github.com/ueapy/pythoncourse2024-materials.git | ||
``` | ||
This should create a local copy of the course materials in the current directory. | ||
|
||
Windows-users, double check that it has been cloned in the directory you wanted. | ||
|
||
|
||
## 3. Create the environment | ||
3.1. Make sure Anaconda or Mambaforge is installed and the course materials are downloaded | ||
### 1.3. Create the environment | ||
* Make sure Anaconda or Mambaforge is installed and the course materials are downloaded | ||
|
||
3.2. Open the command line or python prompt (i.e., search "Terminal" on Mac Spotlight Seach; search "Anaconda prompt" or "mamba" on Windows start menu) | ||
* Open the command line or python prompt (i.e., search "Terminal" on Mac Spotlight Seach; search "Anaconda prompt" or "mamba" on Windows start menu) | ||
|
||
3.3. Navigate to folder containing the cloned / downloaded course materials. Use the `cd` command, for example: | ||
* Navigate to folder containing the cloned / downloaded course materials. Use the `cd` command, for example: | ||
|
||
``` | ||
cd C:\Users\myname\Downloads\pythoncourse2023-materials\ | ||
cd C:\Users\myname\Downloads\pythoncourse2024-materials\ | ||
``` | ||
|
||
3.4. Create the environment using `conda` package manager: | ||
* Create the environment using `conda` package manager: | ||
|
||
```bash | ||
conda env create -f environment.yml | ||
|
@@ -95,36 +99,56 @@ This will take some time depending on your Internet speed (<15 minutes). | |
|
||
If you get stuck try typing return or, failing this, creating the environment again. | ||
|
||
## 4. Activate the environment | ||
### Linux / Mac | ||
If your default shell is NOT bash, first type `bash`. Activate the relevant environment by typing: | ||
```bash | ||
conda activate course2023 | ||
``` | ||
### Windows | ||
Still in the command line (Anaconda/mamba prompt), type: | ||
### 1.4. Test the installation (essential!) | ||
#### Linux / Mac | ||
If your default shell is NOT bash, first type `bash`. Type the following 2 commands: | ||
|
||
``` | ||
conda activate course2023 | ||
conda activate course2024 | ||
python -c "import seaborn" | ||
``` | ||
#### Windows | ||
In the command line (Anaconda/mamba prompt), type the following 2 commands: | ||
|
||
## 5. Test the installation (essential!) | ||
From the terminal type: | ||
``` | ||
conda activate course2024 | ||
python -c "import seaborn" | ||
``` | ||
|
||
If you don't get any errors then your installation was sucessful. | ||
|
||
## 6. Launch Jupyter | ||
Once the environment is activated, type | ||
## 2. How to start Jupyter | ||
|
||
Note: If you installed Anaconda (as opposed to the stripped down miniconda) you might want to try using the launcher application Navigator. You can learn how to start it for your OS (here)[https://docs.anaconda.com/free/navigator/getting-started/]. | ||
|
||
|
||
### Windows | ||
* Open Anaconda/mamba prompt from your Start menu | ||
|
||
* Type | ||
|
||
``` | ||
jupyter notebook | ||
conda activate course2024 | ||
jupyter lab | ||
``` | ||
in the command line. This should open Jupyter Notebook in your browser. We will also demonstrate using Jupyterlab, which is ery similar but offer a more flexible interface. For this type | ||
|
||
### Linux / Mac | ||
* Open a terminal | ||
* Type | ||
|
||
``` | ||
conda activate course2024 | ||
jupyter lab | ||
``` | ||
|
||
|
||
This should open Jupyter Lab in your browser. We will also demonstrate using Jupyter Notebook which is the older version with a simplified interface and is started with | ||
|
||
``` | ||
jupyter notebook | ||
``` | ||
|
||
|
||
## Still having trouble? | ||
If you are unable to install Anaconda Python on your PC, contact the [course organisers](index.md#registration-and-enquiries). | ||
Another option: launch the course in the cloud! [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/ueapy/pythoncourse2023-materials/main?urlpath=lab) This requires no installation but progress and modifications won't be saved. | ||
Another option: launch the course in the cloud! [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/ueapy/pythoncourse2024-materials/main?urlpath=lab) This requires no installation but progress and modifications won't be saved. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters