Skip to content

koldunovn/python_data_train

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting started with Python

Alt text

This is Data Train course OT-ST-WS-04

You can run notebooks interactevely on Binder

This is a short overview of how Python with examples of data analysis and visualization.

PRs with corrections are very welcomed.

Getting started for Linux/Mac (for Windows see below)

The fastest way is to install Miniconda, that contains conda package manager and Python. On the Miniconda page select Python 3 installer script for your system and download it, for example:

wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh

Change mode of the downloaded scrip to executable, e.g.:

chmod +x Miniconda3-latest-MacOSX-x86_64.sh

Run installation process:

./Miniconda3-latest-MacOSX-x86_64.sh

At the end the script will offer you to add Miniconda3 install location to the PATH in your .bashrc/.bash_profile. You should say 'yes'. Please double check that you have something like this in your .bashrc/.bash_profile:

# added by Miniconda3 4.3.21 installer
export PATH="/Users/koldunovn/miniconda3/bin:$PATH"

If you for whatever strange reason use csh/tcsh, then add to your .cshrc:

setenv PATH /Users/koldunovn/miniconda3/bin:$PATH

Now you can open a new terminal window (sourcing not always works) and try to type:

conda

if as a result you see conda help, then everything is set up properly. The last thing before installing packages is to add conda-forge channel:

conda config --add channels conda-forge 

Now you can install nessesary packages:

conda install ipython jupyter matplotlib scipy pandas netcdf4 requests xarray dask bokeh

To begin working with notebooks execute:

jupyter notebook

the browser should pop up with jupyter main page. You can navigate to the folder with notebooks from there and open them.

Getting started for Windows

  • First you have to download and install Anaconda python distribution for your system from here (scroll down to "Anaconda installers"). There is a nice video tutorial. If installation is sucessful, you will be able to work with several first notebooks. In order to work with netCDF files xarray, dask, bokeh some additional steps are required.

  • Go to start menu and launch Anaconda prompt programm.

  • Execute follwing commands:

conda config --add channels conda-forge 

and then

conda install netcdf4 requests xarray dask bokeh
  • Agree with installation of additional packages by entering Y

Now you should be good to go. You can launch Jupyter notebook from visual Anaconda interface, or by opening Anaconda prompt and typing:

jupyter notebook

Author

Nikolay Koldunov

koldunovn@gmail.com

About

Getting started with Python, Data Train course

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published