Migration shapes patterns of disease transmission