Statistics
Session 2 Tasks
In this part of the practical, we will use what we have learned so far to perform the same analysis you have already learned with other tools, but this time using Python.
- Download the datasets for this exercises and save them in your
datafolder:
- Download the following scripts and try to run the code in them. Your job is to debug these scripts by fixing the intentional errors so they run correctly.
R version: If you prefer R, the same exercises are available in R. See the R script links above.
More Debugging Practice
If you want more of the same once those two scripts run, the follow-on course Python for Transport & Civil Engineering has a traceback safari: six short scripts, each containing one deliberate error, with a marker that reports which ones you have fixed without telling you how to fix them. It uses only the Python standard library, so there is nothing to install.
git clone https://github.com/chris-r-uol/python_learning.git
cd python_learning/week1_setup/exercises
python check.pyPython only — this exercise has no R version.
Reuse
Copyright
© 2026 Robin Lovelace & contributors