Add python and R code to calculate average wait times