Plotting and Programming in Python

This lesson is an introduction to programming in Python for people with little or no previous programming experience. It uses plotting as its motivating example, and is designed to be used in both Data Carpentry and Software Carpentry workshops. This lesson references JupyterLab, but can be taught using a regular Python interpreter as well. Please note that this lesson uses Python 3.

Prerequisites

  1. Please make sure you have installed any required software

  2. Please download and extract the file python-data.zip.

Schedule

Setup Download files required for the lesson
09:00 1. Running and Quitting How can I run Python programs?
09:20 2. Variables and Assignment How can I store data in programs?
09:45 3. Data Types and Type Conversion What kinds of data do programs store?
How can I convert one type to another?
10:05 4. Built-in Functions and Help How can I use built-in functions?
How can I find out what they do?
What kind of errors can occur in programs?
10:30 5. Break Break
10:40 6. Lists How can I store multiple values?
11:00 7. Libraries How can I use software that other people have written?
How can I find out what that software does?
11:20 8. Working with NumPy What is NumPy and how do I use it?
11:40 9. Plotting How can I plot my data?
12:10 10. Reading Tabular Data with Pandas How can I read tabular data?
12:30 11. End Of First Session
13:15 12. For Loops How can I make a program do many things?
13:45 13. Conditionals How can programs do different things for different data?
14:15 14. Writing Functions How can I create my own functions?
14:45 15. Break Break
14:55 16. Variable Scope How do function calls actually work?
How can I determine where errors occurred?
15:05 17. Dictionaries How can I store key-value data?
15:40 18. Working With Geospatial data How can I read in and plot geospatial data?
15:40 19. Programming Style How can I make my programs more readable?
How do most programmers format their code?
How can programs check their own operation?
15:50 20. Wrap-Up What have we learned?
What else is out there and where do I find it?
16:00 Finish

The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.