Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save copernicusmarinegist/7c3791677a709537b3704abde426797b to your computer and use it in GitHub Desktop.
Save copernicusmarinegist/7c3791677a709537b3704abde426797b to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Python (Miniconda) and Jupyter\n",
"\n",
"CRTS-DEC2018 is \"Data Driven Discovery\", where we will use data as the driver to discover new things. In order to do this discovery, we are going to need some tools to help us out. The most basic tool we will use is the Python programming language. Python is a language that is particularly strong at processing data and has a massive number libraries developed by other people that will help us processing that data.\n",
"\n",
"## Installing Python (Miniconda3)\n",
"\n",
"Python itself is a programming language and you can install just Python. However, we want to use both Python and libraries that others have developed. For that, CRTS-DEC2018 uses a Python distribution – a package that contains the Python programming language along side tools to make the process of getting libraries easier. Specifically, we will use the Miniconda distribution.\n",
"- [Download Miniconda3 here](https://conda.io/miniconda.html)\n",
"- **Help**: [To select the installer for your Operating System?](https://conda.io/docs/user-guide/install/index.html)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Install Jupyter Notebook\n",
"The very first tool we will use is **Jupyter** (stands for \"JUlia, PYthon, R\"), a tool that makes writing small programs easier. To get Jupyter, we will use a the `conda` package manager that was installed as part of Miniconda:\n",
"1. Open up the `Anaconda Prompt` command line interface and navigate to the directory of your choice.<br>_**Note**: The default directory is ok, but it should be better to create a specific one, e.g. run:<br>`python -c \"import os; os.makedirs('CRTS-DEC2018')\"; cd CRTS-DEC2018`_<br>\n",
"2. To install the required modules, run:<br>\n",
"`conda create -n CRTS-DEC2018 python=3.7 jupyter xarray pathlib scipy matplotlib`<br>\n",
"**Important**: You will need to press `y` to confirm the install)<br>\n",
"3. Once the environment is successfully installed, load it by running:<br>\n",
"`conda source activate CRTS-DEC2018`<br>\n",
"_**Note**: without `source` for Windows Users_<br>\n",
"4. Once the CRTS-DEC2018 environment is activated, and to install the last required modules, please run:<br>\n",
"`pip install motuclient tailer` \n",
"5. Then, download the Training Material called [\"CopernicusMarine_Discovering_Copernicus_Marine_Free_and_Open_WebServices-CRTSDEC2018.ipynb\" here](https://atlas.mercator-ocean.fr/s/zLYamNdJQx2BXTp/download):<br>\n",
"https://atlas.mercator-ocean.fr/s/zLYamNdJQx2BXTp<br>\n",
"_**Note**: It's recommended to store it under `CRTS-DEC2018` folder instead of the default one `Downloads`. Move it manually if necessary_<br>\n",
"6. Last command we will input in the `Anaconda Prompt`, run:<br>\n",
"`jupyter notebook`<br>\n",
"7. Your default web browser should be automatically launched and a webpage should appear: it's the Graphical User WebInterface of the jupyter notebook server, whose URL should be like: https://localhost:8888/tree/CRTS-DEC2018.\n",
"8. From this web interface, navigate to the folder where you saved `CopernicusMarine_Discovering_Copernicus_Marine_Free_and_Open_WebServices-CRTSDEC2018.ipynb` and click on it.<br>It should open the notebook.\n",
"9. You are all set! Please listen carefully to the Trainer/Lecturer's advices and tips."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![jupyter-web-interface](https://i.imgur.com/dJqV2sC.png \"Jupyter Web Interface\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<center>_Fig.7 : This picture shows the Jupyter Graphical User WebInterface._<center>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![crts-notebook](https://i.imgur.com/kccDRb2.png\"crts-notebook\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<center>_Fig.8 : This picture shows the Copernicus-Marine-CRTS-Notebook opened in the Graphical User WebInterface._<center>"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment