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.

  1. Download the datasets for this exercises and save them in your data folder:
  1. 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.
  • Script 1: the Excel exercise (Python, R)
  • Script 2: the SPSS exercise (Python, R)

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.py

Python only — this exercise has no R version.

Reuse