Large cities are cosmopolitan environments where people embrace inter-national connections whereas small towns, villages, and the countryside are more likely to prioritize the maintenance of national traditions. These geographic divides are at the center of contemporary politics but we do not know why they exist. One possibility is that cities make people more cosmopolitan while smaller areas make people less cosmopolitan. However, credibly measuring geographic effects is difficult because people sort across geography in ways that are correlated with political attitudes. I address these methodological challenges with longitudinal data from the Swiss Household Panel. My central result is that evidence of contextual effects is limited and unlikely to account for the broad geographic divides. Instead, sorting is likely to be the most important explanation for spatial polarization over cosmopolitanism. These findings have several implications for our understanding of geographic divides.