final version of the H.R code
Merge branch 'master' of https://github.com/emfuller/Regional_Collapse