2 Programming in Python
As a prerequisite to almost all of the other material we teach, you will need to have a good grasp of the basics of Python programming.
Tip
You don’t need to be a Python master before progressing through the rest of the material!
We do also use two non-Python tools
- QGIS in the geographic visualisation section (though more advanced visuals and optimisation problems are carried out in Python)
- system dynamics (which uses the online tool ‘Insight Maker’)
To move onto later modules, it’s recommended that you have some familiarity with
- variables
- key Python data types, including lists and dictionaries
- importing packages
- using functions
- writing functions
- conditional logic (if, elif, else)
- loops (while loops, for loops)
- reading text and data files
- simple data manipulation with the
pandas
library - simple data visualisation with the
matplotlib
orplotly.express
libraries
For discrete event simulation and agent-based simulation, it is recommended that you have an understanding of object-oriented programming in Python.
All of these topics are covered in the book - take a look and consider refreshing your memory before moving on.
Click here to open the HSMA Intro to Python book in a new tab, or take a look at it below.