An introduction to working with data in python for scientists
WHAT: Python - numpy, scipy, matplotlib, pandas, xarray
WHEN: 11 - 13 December 2018
WHERE: CSIR, Rosebank
WHO: Beginners with sound knowledge of lists, tuple, for loop, if statement
COST: R150 per day
HOW: On your own laptop with Luke and Tommy teaching interactively
The course will be run by Luke Gregor and Tommy Ryan-Keogh and will be hosted at the CSIR.
Anyone can join but we are limited to 20 spaces - so first come first serve.
Note that the course will also cost R150 per day. Note that the days build on each other so I recommend that you only skip days if you've done the course before and you want a refresher. This can be paid to Luke in person (a brother's gotta eat) - details to follow.
- A laptop with the Anaconda distribution of Python installed (https://www.anaconda.com/download/)
- A sound understanding of basic python: Part 1 at https://python101.pythonlibrary.org/index.html. You will quickly fall behind if you don't understand:
- types:
str, int, float, list, tuple, dict
- for loops
- if statements
- import packages
- types:
- Know how to have packages installed with
conda
in the command lineconda install pandas scikit-learn netCDF4 xarray
We will cover the tools you need to work with data in python to create plots like this (and many more):
However, you will not walk away as ninja. This takes time and practice. The course serves as a crash course to working with and plotting data. We will go over example problems, but it will help if you come with your own data so you can learn on the fly.
Core Python recap, numpy
and matplotlib
- recap core Python
- importing data
- working with data - indexing, slicing, etc.
- plotting lines and scatter
pandas
will change your life (if you work with time series or any other table data).
- importing data
- time series resampling
- plotting recap with pandas
- linear regression with
sklearn
xarray
is a netCDF tool and probably saved me four months in my PhD
- importing netCDF
- temporal resampling
- calculating climatologies
- plotting maps with cartopy