Scotland's shifting population, 1770-1850