Source: NBC News analysis of Census data and official election returns.