date conversion runs faster directly in code than via function. Not sure why? But added it to the main script.
no longer plotting mean locs, using gam smoothing instead, so deleted old plot code.