README.md 5.87 KB
Newer Older
Toby Hodges's avatar
Toby Hodges committed
1 2
# Introduction to Python Programming
## A programming course suitable for beginners
3

Toby Hodges's avatar
Toby Hodges committed
4
__Click the button below to launch the course materials in an interactive environment, thanks to the [Binder](http://mybinder.org) service from [The Freeman Lab](http://thefreemanlab.com).__ (Current build of Binder materials: 17-Jan-2018)  
5

Toby Hodges's avatar
Toby Hodges committed
6
[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/tobyhodges/ITPP/master)
Toby Hodges's avatar
Toby Hodges committed
7

Toby Hodges's avatar
Toby Hodges committed
8
Welcome to Introduction to Python Programming. The course materials are divided into sections. You can use the links below to view each section in your browser.
9

10 11
1. [Getting Started](http://nbviewer.jupyter.org/github/tobyhodges/ITPP/blob/master/1_GettingStarted.ipynb) - an introduction to the basics of the language
2. [Beginning Programming](http://nbviewer.jupyter.org/github/tobyhodges/ITPP/blob/master/2_BeginningProgramming.ipynb) - exploring some of the central concepts and operations of programming
12 13
3. [Nested Data Structures](http://nbviewer.jupyter.org/github/tobyhodges/ITPP/blob/master/3_NestedDataStructures.ipynb) - an introduction to creating and working with more complex data structures
4. [Plotting Data](http://nbviewer.jupyter.org/github/tobyhodges/ITPP/blob/master/4_PlottingData.ipynb) - creating interactive plots with the `matplotlib` & `bokeh` libraries
14

15
##### The Language
Toby Hodges's avatar
Toby Hodges committed
16 17 18
Python is a high-level programming language, which is highly versatile, relatively accessible, and extremely well-supported. If you've never programmed before, Python is a great language to start with. A couple of the big reasons for this are: by the standards of programming languages, it is easy for humans to read; and, instead of spending a lot of time worrying about defining rigid types and arranging things in multiple files, it is quick to get started with actually _doing things_ with Python. 

This course focuses on handling tabular data and creating plots, but, after learning some of the language, you could use Python for a huge range of other tasks, such as: automating repetitive tasks; generating web content; processing images; creating cross-platform GUI applications; or writing programs to quickly perform complex analyses. These are just a few examples of the possibilities. 
19

20
##### The Course
21
This course provides an introduction to programming with the Python language. The course material is suitable for complete beginners, with no previous programming experience or knowledge required or assumed.  
22

23 24
The course was first written for a target audience of life scientists, and this is reflected in the simplistic example dataset used for the plotting exercises, but the material itself is designed to be accessible also for people with no scientific background, and the skills taught can be applied to a _much_ wider range of disciplines. Some knowledge of foundational mathematics is assumed.

25 26 27 28 29 30
The materials are split into broad sections, which we call worksheets, containing exercises for you to try and most of the information that you will need to complete them. The material covered is far from exhaustive. Instead, we try to provide enough information and tasks to get you started and we hope to get you quite quickly to a level where you are then capable to continuing to use Python for your own projects.

These materials are free to use. If you would prefer to attend a course in person, these are run in the Department of Biology at the [University of York](http://www.york.ac.uk/biology/technology-facility/bioinformatics/bi-tf-courses/), UK. For a similar introduction to programming (as well as other essential computing skills), check out [Software Carpentry](http://software-carpentry.org).

You can always get more information on any topic/object type/function etc. by looking at the Python help pages - type `help(object)` in the Python shell to get help on _object_ - or the 'cheat sheet', or by searching online. The online Python documentation (for [version 2.7](https://docs.python.org/2/) or [version 3](https://docs.python.org/3/)), people's previous questions on [StackOverflow](http://stackoverflow.com), and a lot of the module homepages are very good places to start.  

31 32 33 34 35 36 37
If you work through the materials, you will learn:
* the basic concepts and building blocks of programming in Python
* how to quickly automate repetitive tasks and calculations
* the best ways of handling different types of data
* about working with the extensive catalogue of subject-specific modules available for Python
* how to read data from a file, process, and summarise it
* how to visualise data using Python’s powerful plotting libraries
38

39 40
We recommend using the [Anaconda distribution](https://store.continuum.io/cshop/anaconda/) of Python. It's free and comes with a large number of additional modules included ready for importing into your scripts, IPython shell and notebook interfaces, a powerful Python text editor (Spyder), and a good package manager, _conda_, for updating and installing packages.   

41 42 43
As well as the main notebooks, we provide walkthroughs of the plotting exercises in Section4, for your reference.  
[Exercise 4.6](http://nbviewer.jupyter.org/github/tobyhodges/ITPP/blob/master/Exercise4_6WalkthroughMPL.ipynb)  
[Exercise 4.7](http://nbviewer.jupyter.org/github/tobyhodges/ITPP/blob/master/Exercise4_7WalkthroughBokeh.ipynb)  
44
If you are taking the course, or working through the materials on your own, try to find your own solution to these exercises, and then use this ipynb if you get stuck, or want to compare your results to ours.
45

46 47
All materials written by:
* [Peter D Ashton](https://www.york.ac.uk/biology/research/bioinformatics-biosystems/peter-d-ashton/) (Department of Biology, University of York, UK)
Toby Hodges's avatar
Toby Hodges committed
48
* [Holger Dinkel](https://git.embl.de/u/dinkel) (formerly of Gibson Team, European Molecular Biology Laboratory)
49
* [Toby Hodges](https://www.github.com/tobyhodges) (Zeller Team, European Molecular Biology Laboratory)
Toby Hodges's avatar
Toby Hodges committed
50
* [Karin Sasaki](https://github.com/karinsasaki) (EICAT, European Molecular Biology Laboratory)