We expect you to run these notes and do this course using Jupyter notebooks, on the UCL JupyterHub.
If you know what you are doing, and have accessed the notes in this way before, then you can go straight to the UCL JupyterHub.
The first time you are using these notes, you should go through the items below. These are needed to set up the notes and various course settings.
-
If you are not logged on inside the UCL domain, then you will need to make sure you have the UCL VPN installed and running
-
Log on the the UCL JupyterHub.
You may have to start the server at this point.
- click
start my server
to restart (you may have to also then clicklaunch my server
) - if you are asked to choose an interface, choose
classic
, then clickstart
- click
-
Open a Terminal, from
New->Terminal
on theControl Panel
-
In the Terminal (shell), type:
cd ~ && /shared/ucl/apps/git/2.3.5/gnu-4.9.2/bin/git clone https://github.com/UCL-EO/geog0111
This will clone this repository and set up the Python.
-
Set up anaconda. In the Terminal (shell), type:
conda init conda config --prepend envs_dirs /shared/groups/jrole001/geog0111/envs echo "conda activate geog0111" >> ~/.bashrc bash
This sets up the conda environment we need for the notebooks in the first two commands. The last two commands make sure that the correct environment is loaded when you log in.
-
Now type:
conda env list
This should now show:
# conda environments: # base /opt/miniconda-jhub/4.8.3 jhubcode /opt/miniconda-jhub/4.8.3/envs/jhubcode geog0111 * /shared/groups/jrole001/geog0111/envs/geog0111
If it doesn't, type:
bash
and try again.
-
Now, set up notebook extensions by running the foillowing in shell (Terminal):
~/geog0111/notebooks/bin/postBuild
-
This should all be good to go now, but you should make sure that the new settings have taken place by stopping and restarting the notebook server. To do this:
- click on the
Control Panel
button at the top right of the notebook page. - then click the big red button to stop the server
- next, click
start my server
to restart (you may have to also then clicklaunch my server
) - if you are asked to choose an interface, choose
classic
, then clickstart
- click on the
-
Now, test things:
- navigate to the coursenotes
geog0111
thennotebooks
- select the fist notebook
001_Notebook_use.ipynb
- go through the notes and run the code in the cells
- if that doesn't launch for any reason, try re-stopping and starting the server
- failing that, ask for help in the Monday class, or come along to office hours or the Thursday help sessions
- Make sure you in the UCL domain OR have the UCL VPN installed and running OR that you are running from Desktop@UCL
- Log in to the UCL JupyterHub.
- Navigate to the directory
geog0111/notebooks
- Access the notebooks you want directly, or via the index TIMETABLE.ipynb.
- See further information on the course Moodle page
Periodically, we may have to update the notes.
Before you do this, be aware that any updated files on the server will over-write your local files. That means that any changes you may have made to the notebooks, for example, will be lost. It is vital then that you save the notebooks you are working on with a different name.
You can easily do this by clicking on the notebook name panel at the top of the notebook (the one that says 'Install' here) and changing it (e.g. myInstall
). You might do this consistently for all notebooks you use as you go through the course, then you won't have to worry about it when you do updates.
To update the notes (and over-write your changes), in a shell (Terminal) type:
cd ~/geog0111 && /shared/ucl/apps/git/2.3.5/gnu-4.9.2/bin/git reset --hard HEAD && git pull