Abstract
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.
Introduction
Debates over cosmopolitanism are at the center of political conflict across Europe and North America (de Wilde et al., 2019; Kriesi et al., 2012). The core tenet of cosmopolitanism is that humans are one community (Beck & Grande, 2007). Cosmopolitans are open to transnational connections and support immigration, multiculturalism, and robust international institutions. Anti-cosmopolitans oppose that agenda and advocate for national sovereignty and the maintenance of historical national traditions. This divide over how to engage the world beyond nation-state borders is so intense that it may become the new cleavage structuring political party competition across Europe and North America (De Vries, 2018; Hooghe & Marks, 2018). 1
One reason for the deep conflict over cosmopolitanism is its overlap with geographic divides (Alba & Foner, 2017; Hochschild, 2016). Cosmopolitan orientations are most present in large cities and anti-cosmopolitanism is strongest in small towns, villages, and the countryside (Cramer, 2016; Lichter & Ziliak, 2017). This urban–rural split over cosmopolitanism may lead to segregated societies where the two sides have little prospect for compromise (Hetherington & Weiler, 2018; Jennings & Stoker, 2016; Rodden, 2019).
Geographic polarization over cosmopolitanism is well-documented but scholars are still exploring why those geographic divides exist. Research suggests that sorting is one important explanation for geographic polarization, and it can operate in several ways. One type of sorting is based on macroeconomic demographic trends. Recent economic developments in Europe have concentrated high-skilled high-wage jobs—and as a result highly educated professionals—in large cities (Cunningham & Savage, 2017; Oberti & Préteceille, 2016). This matters for cosmopolitanism divides because highly educated professionals are more likely than people with less education and manual occupations to have cosmopolitan pro-immigration and pro–European Union (EU) preferences (Cavaillé & Marshall, 2019; Hainmueller & Hopkins, 2014; Kunst et al., 2020). Therefore, even though highly educated professionals are generally cosmopolitan regardless of where they live (Bornschier et al., 2019; Igarashi & Saito, 2014; Maxwell, 2019), geographic sorting of educational and occupational groups leads to immigration and EU attitudes being more positive in large European cities. Another way in which sorting may operate is if people choose to move to geographic areas that match their cultural and political preferences (Favell, 2008; Florida, 2005; Tam Cho et al., 2013), although there is an ongoing debate about the extent of this dynamic (Martin & Webster, 2020; Mummolo & Nall, 2017).
In this article, I explore an alternate explanation for geographic divides: contextual effects. The logic of contextual effects is that geographic contexts shape political attitudes (Ethington & McDaniel, 2007). I do not contest the existence of geographic sorting, which has robust support in existing studies. Yet, if there is evidence of contextual effects, that would enrich our understanding of geographic divides and point to different strategies for reducing geographic polarization. Sorting suggests that geographic divides are a second-order manifestation of deeper polarization on other dimensions. In contrast, contextual effects suggest that something about place is essential for understanding cosmopolitan attitudes.
When estimating contextual effects, the key methodological challenge is the fact that people are not randomly distributed across space (Gallego et al., 2016; Kaufmann & Harris, 2015). One might be tempted to gauge the importance of context by analyzing whether cosmopolitan attitudes vary across geography. However, individuals select where to live and attitudinal variation across space may reflect the types of people who choose to live in different environments as opposed to the effect of geography on attitudes. This is a very difficult problem that is impossible to solve without random (or exogenous) assignment to different geographic contexts. In this article, I minimize concerns about sorting by leveraging longitudinal data from the Swiss Household Panel (SHP) merged with contextual data on respondents’ municipal-level environment. This allows me to observe residential trajectories over time and account for sorting processes in my statistical analysis. I focus the bulk of my analysis on attitudinal changes within individuals, as they move from one geographic context to another or as their local context changes its character.
The main result is that I do not find evidence that contextual effects can account for broad geographic divides over cosmopolitanism in Switzerland. There is no evidence that moving to large cities makes people more cosmopolitan or that moving to smaller towns or the countryside makes people more anti-cosmopolitan. There is also no evidence that over time, changes in municipality demographics can account for broad geographic divides over cosmopolitanism. 2 I find limited evidence that spending one’s entire life in larger as opposed to smaller municipalities is associated with more cosmopolitan attitudes. However, these results should not be overinterpreted because—unlike the other two sets of analyses—they rely on cross-sectional models that make it more difficult to account for sorting. In addition, the subset of respondents who spend their entire lives in the same municipality is very small and there are similar geographic divides among movers.
My findings have several implications for our understanding of contemporary political geography. First, the limited evidence of contextual effects is consistent with recent research suggesting that sorting mechanisms are the key to understanding broad geographic polarization (Gallego et al., 2016; Maxwell, 2019). Any effort to bridge urban–rural divides will likely need to account for the macrohistorical factors that create uneven economic opportunities across space and cluster highly educated professionals in large cities. In addition, bridging urban–rural divides will require addressing the cultural factors that can lead people with different political preferences to cluster in different places (Bishop, 2008; Florida, 2005).
Yet, my findings should not be interpreted as evidence that contextual effects are irrelevant. I find limited evidence that growing foreign populations may make people more anti-immigration and that spending one’s whole life in larger municipalities may make people more cosmopolitan. Neither dynamic can account for the broad geographic divide over cosmopolitanism, but both are consistent with recent research arguing that contextual effects are often limited in scope and conditional on specific factors (Larsen et al., 2019). My findings build on this research and suggest that municipal-level contexts can affect cosmopolitan attitudes but are perhaps best considered a minor factor in the overall landscape of geographic polarization. Future research can further explore the nuances of how these effects operate.
Geographic divides over cosmopolitanism are likely to remain salient across Western Europe and North America (Gimpel et al., 2020; Guilluy, 2014; Rodríguez-Pose, 2018). The key implication of this article is that geography in and of itself is not likely to be the main cause of that divide.
Hypotheses About Context and Cosmopolitanism
The basic claim of contextual effects is that the experience of living in a specific geographic context should shape political attitudes (Ethington & McDaniel, 2007; Fitzgerald, 2018; Johnston & Pattie, 2006). This may operate in several ways for cosmopolitan orientations. One is that people in larger municipalities are more likely to share public space (e.g., public transportation, parks, and shops) with a larger and more diverse set of people (Huckfeldt, 1986; Parker, 2015). Being forced to share space may lead people to develop understanding and tolerance for cultural difference (Wessendorf, 2014; Wood & Landry, 2008).
In addition, larger municipalities have greater demographic and economic churn. People in large cities are more likely to move and not remain in the same residence for their entire lifetime. Businesses in large cities are more likely to change over time or close (Parker, 2015). Exposure to these fluctuations may make urban residents more comfortable with change and less likely to sacralize traditional culture (Deutschmann et al., 2018; Recchi, 2015).
Finally, larger municipalities tend to have more foreign residents and there is a long tradition of research on how exposure to different national origins, races, or religions can promote tolerance and cosmopolitan attitudes (Allport, 1954; Kaufmann & Harris, 2015; van Heerdin & Ruedin, 2019). There is also a long tradition of research on how exposure to different groups can generate threat and negative attitudes (Blalock, 1967; Dancygier, 2010; Enos, 2017). However, threatening ramifications of exposure to foreign residents are unlikely to explain urban–rural variation in cosmopolitanism, because there are more immigrants in large Swiss cities and more cosmopolitan attitudes in those cities. 3 Instead, it is more likely that exposure to foreign residents generates positive attitudes because of meaningful relationships or casual public encounters (Mo & Conn, 2018; Paluck et al., 2019; Pettigrew & Tropp, 2006).
An ideal test of contextual effects would analyze cosmopolitanism among people who had been randomly assigned to different geographic areas. However, the geographic sorting processes mentioned earlier make that ideal test impossible. 4 In this article, I analyze the general Swiss population using longitudinal data that allow me to account for sorting and test three hypotheses about how contextual effects may operate.
The first hypothesis builds on the insight that moving to a new geographic location exposes people to new contextual influences (Nisic & Petermann, 2013). This suggests that changes over time can be leveraged to identify the effects of living in specific places. However, attitudes may change over time for many reasons unrelated to the new geographic context. Therefore, the key to this approach is a comparison of time trends for movers relative to nonmovers (Lancee & Schaeffer, 2015). 5 If the effect of moving could account for geographic polarization over cosmopolitanism, then attitudinal time trends for movers should become more cosmopolitan (relative to nonmovers) after moving to larger communes. Similarly, attitudinal time trends for movers should become less cosmopolitan (relative to nonmovers) after moving to smaller communes.
A second approach to contextual effects examines how attitudes change as the geographic context changes over time. This approach has become standard for research on contextual effects, because it targets and exploits variation in the specific aspects of geography that should matter most (Dinesen et al., 2020). For cosmopolitanism, a key aspect of geography that varies over time is size of the foreign population. As mentioned earlier, there is a long tradition of research on how exposure to different groups can promote cosmopolitan attitudes. Moreover, there is a growing body of research in Europe documenting cases where local-level increases in the foreign-born population are associated with more positive attitudes about immigration (van Heerdin & Ruedin, 2019; Weber, 2019). If the growth in foreign residents could account for geographic polarization over cosmopolitanism, then attitudes should become more cosmopolitan among individuals who experience greater increases in the local foreign population. 6
The third hypothesis departs from the insight that people who move several times are likely to accumulate a series of contextual influences that may be difficult to disentangle (Recchi, 2015). It might be possible to trace the effects of multiple moves with data that measured cosmopolitan attitudes and geographic context throughout the life course, but unfortunately those data are not available in the SHP. Yet, the SHP does have data on the length of residence, which allows me to identify people who have lived their entire lives in one municipality. This provides a focused and clean measure of the geographic treatment, because each respondent has effectively only been exposed to one type of geographic context. Moreover, tracing the childhood environment to the adult environment builds on extensive research about the importance of long-term political socialization that begins early in life (Sapiro, 2004). 7
Admittedly, some aspects of the municipal environment are likely to change over time (e.g., percent foreign residents as explored by H2). I focus on variation between smaller and larger municipalities, which is a difference that is relatively constant over time. This generates the hypothesis that people who spend their entire lives in larger municipalities should be more cosmopolitan than people who spend their entire lives in smaller municipalities.
Data and Measures
The longitudinal nature of the SHP is useful because it allows me to observe whether cosmopolitan attitudes change as people move or as the composition of local geographic contexts change over time. One challenge with longitudinal data is how to handle nonrandom attrition from the panel. In particular, respondents who are young, male, foreign-born, socially and economically marginalized, or who move residence have a greater risk of leaving panel studies (Rothenbühler & Voorpostel, 2016; Voorpostel & Lipps, 2011). Supplemental Appendix B provides a detailed discussion of how this might affect my analysis, but it is not clear that it should threaten the main findings.
The SHP began in 1999 and conducts annual face-to-face interviews. 8 New respondents were added in 2004 and 2013 to address attrition. I use the 19 SHP waves available at the time of analysis (1999–2017). All analyses use SHP weights that account for stratification and clustering and adjust for nonrandom patterns of attrition (Antal & Rothenbühler, 2015). More details on the SHP data are in the supplemental appendix.
Cosmopolitanism is the belief that all humans are part of the same community and should not be divided on the basis of class, race, religion, nation, or other social boundaries (Beck & Grande, 2007). There are multiple dimensions of cosmopolitanism, including identity, cultural values, consumption, policy preferences, and political attitudes (Pichler, 2009). A comprehensive investigation of cosmopolitanism would include indicators for all dimensions but such wide-ranging measures are not available in the SHP. I focus on cosmopolitan political attitudes, which are at the center of political debates in Switzerland and elsewhere in Europe and North America, and for which there are multiple measures in the SHP.
The first cosmopolitan item is immigration attitudes. This taps into beliefs about how open or closed society should be to humanity and has been one of the most contested issues in European politics in recent years (Clarke et al., 2017). The immigration attitude question in the SHP is about opinions on chances for foreigners in Swiss society. 9 This is an unconventional measure compared with standard items about immigration policy or views on immigrant integration. However, it is the only relevant item available in the SHP and it directly captures attitudes about the salience of the conational/foreigner boundary, which is a central aspect of cosmopolitanism debates.
The second item is attitudes toward European unification. Switzerland is one of the few West European countries that is not part of the EU, but the extent and the form of European integration is a major issue across all European countries. Moreover, the extent to which people are willing to look beyond national boundaries and connect with international communities like the EU is a core aspect of cosmopolitanism (Beck & Grande, 2007). The SHP item is a straightforward question about whether Switzerland should join the EU. 10
The third measure of cosmopolitanism is support for Radical Right–wing parties. 11 This measure is not as precise as the previous two measures because there are many reasons that one might vote for a Radical Right party, including immigration and EU preferences. Radical Right policy positions also vary across parties and have evolved over the years (most notably a leftward drift on economic issues). Yet, the consistent core appeal of Radical Right parties has been support for greater national sovereignty and a rejection of globalization and cosmopolitan values. 12 I use an item that asks which party respondents would vote for if there were an election tomorrow. I code support for Radical Right parties as “1” and all other responses (including “would not vote”) as “0.”
Three cosmopolitan items provide a broad multifaceted perspective on contemporary European divides and are more reliable than analysis based on only one cosmopolitanism measure. It is important to note that each measure is binary, which limits the possible variation in how cosmopolitanism is expressed. More sensitive measures (with more response categories) would make it easier to detect subtle attitude changes over time. Yet, one advantage to binary measures is that they are stricter tests of cosmopolitanism. Binary measures conceptualize the relevant preference as either present or not.
An ideal study might analyze multiple types of cosmopolitan measures (both binary and more fine-grained), but I am limited by what is available in the SHP. The immigration and EU support questions include three response categories, so there is potential for more nuance than binary measures. Yet, in each case, the middle response category valence is ambiguous. Therefore, in my main analyses, I opt for the conservative approach of splitting each question into two clear binary variables. As a robustness check, I use a more fine-grained measure of cosmopolitanism by creating an additive index of the full immigration, EU, and Radical Right measures. 13 Results for the cosmopolitan index are discussed below and are consistent with the binary measures.
I measure geographic residence by merging census data on municipal population. This provides a continuous measure from the smallest (Calonico—58 people) to the largest municipal (Zurich—ranging from 337,900 to 409,241 people across panel waves). Population size is not the only way of measuring geographic divides. For additional analyses, I use government codes that classify municipalities into different urban, suburban, or rural categories. I do not start with these codes because they coarsen the data and impose categories that do not necessarily reflect how cosmopolitan divides operate in Switzerland. Instead, the main analyses use the more fine-grained measure of municipality population size.
I limit my analysis to respondents born in Switzerland and who have Swiss citizenship. The core cosmopolitan debate is the extent to which society should be open to international influences, including immigrants. Immigrants and noncitizens generally have more cosmopolitan views than native citizens and are not as geographically polarized as native citizens. 14 Limiting my analysis to respondents born in Switzerland provides a sample of 113,483 person-year observations and 7,937 respondents. SHP questions about immigration and EU attitudes are asked in Waves 1999–2009, 2011, 2014, and 2017. Questions about party support are asked every wave.
Urban–Rural Divides: The Swiss Case
The extent of urban–rural polarization in Switzerland is similar to many other West European countries. Supplemental Appendix Figures A1 to A4 plot differences between the largest city and the countryside on immigration attitudes, views on the EU, and support for Radical Right wing parties in 13 West European countries. On each measure, the urban–rural gap for Switzerland is within a few percentage points of most other countries. This suggests that Swiss urban–rural divides over cosmopolitanism are similar in size to those of other West European countries. 15
The structural dynamics underlying urban–rural divides over cosmopolitanism are also similar in Switzerland to elsewhere in Western Europe. Large Swiss metropolitan areas have experienced macroeconomic trends that concentrate highly skilled service sector employment and highly educated (cosmopolitan) professionals in the large cities. In addition, larger Swiss cities have more foreign residents and global connections than small villages and the countryside (Kübler et al., 2013). 16 As a relatively small country that depends on international trade, economic globalization is less controversial in Switzerland than in some other European countries. Yet there are strong cultural and political divides across social classes and geography, which mirror the dynamics elsewhere in Europe (Koseki, 2018).
It is beyond the scope of this article to analyze cross-national differences in contextual effects. However, Swiss residential mobility is in the middle of the range for Organisation for Economic Co-Operation and Development (OECD) countries (Sánchez & Andrews, 2011). This suggests that the likelihood of mobility (H1) and the likelihood of residential stability (H3) are roughly average relative to other countries in Europe and North America. In addition, the growth of the foreign population in Switzerland (H2) is the middle of the range for European countries (Eurostat 2015; Nguyen, 2017).
A distinctive aspect of Switzerland is the multiple prominent geographic divides. Historically, Switzerland has been geographically divided by religion (Catholic and Protestant) and language (German, French, Italian, and Romansh; Kriesi & Trechsel, 2008; Linder, 2010). However, the urban–rural rural divide is now prominent as well (Jaberg, 2012). For an overview of how Swiss urban–rural divides have evolved over time, Supplemental Appendix Figures A5 to A7 plot differences between the smallest and largest municipalities on immigration and EU attitudes and Radical Right support across each year of the 19-year SHP panel. The results indicate that geographic divides in Switzerland have been prominent throughout the past two decades and in the case of immigration attitudes may even be getting stronger over time. 17 In short, geographic divides over cosmopolitanism in Switzerland share many common dynamics with other European countries.
Results: Geographic Divides
Figure 1 provides an overview of cosmopolitan attitudes across geography in the SHP. The results plot the percentage of respondents who hold anti-cosmopolitan attitudes across municipal population deciles. 18 For each indicator, respondents are more anti-cosmopolitan in smaller as opposed to larger municipalities. Attitudes are fairly constant across the seven smallest population deciles and then become more cosmopolitan in the top three population deciles. This is consistent with recent research suggesting that large cities are the pro-cosmopolitan outliers across Europe (Maxwell, 2019).

Anti-cosmopolitan attitudes across geography.
The majority of Swiss respondents lean cosmopolitan on the “better opportunities for Swiss citizens” and “support for Radical Right” items. In comparison, the majority of respondents hold anti-cosmopolitan anti-EU attitudes. This suggests mixed preferences on the broader question of how cosmopolitan Swiss society should be. Nonetheless, for each item, there is a difference of roughly 10 percentage points from the smallest to the largest population decile, which are sizable geographic gaps.
Do Attitudes Change After Moving?
H1 predicts that contextual effects on cosmopolitan attitudes should be observable among people who move to different geographic areas. I test this hypothesis by exploiting the panel structure of the SHP and examining cosmopolitan attitudes before and after respondents move to municipalities with larger or smaller populations (i.e., before and after receiving the contextual “treatment”). I compare the attitudinal time trend of people who move to larger or smaller municipalities with the attitudinal time trend of people who do not move to larger or smaller municipalities (the “control group”). This approach accounts for the fact that attitudes may change over time for reasons unrelated to moving. 19
I compare time trends by estimating linear regressions with person fixed effects. 20 There are three key covariates. One is a bivariate measure of whether respondents moved to a municipality with a larger or smaller population size since the previous survey wave. This captures whether the attitude change from one wave to the next is different for people who change municipality as opposed to those who do not. There are 2,222 Swiss-born Swiss citizen respondents who move to a larger municipality and 1,612 who move to smaller municipalities, which are subsets large enough for reliable analysis. 21
The second key covariate is a categorical variable for the years prior to moving to larger/smaller municipalities. This captures whether the attitude change over several time intervals is different for people who will move to larger/smaller municipalities as opposed to those who will not move. The final covariate of interest is a categorical variable for years after moving to larger/smaller municipalities. This captures whether the attitude change over several time intervals is different for people who have moved to larger/smaller municipalities as opposed to those who have not moved. If moving to larger/smaller communes has a causal effect on cosmopolitan attitudes, we would expect the coefficients to be zero prior to the move (in line with the parallel trend assumption) and deviate from zero after the move.
SHP respondents who move to larger municipalities are more cosmopolitan prior to their move than respondents who never move to larger municipalities, which is consistent with the logic of sorting. 22 However, SHP respondents who move to smaller municipalities are also more cosmopolitan prior to their move than respondents who never move to smaller municipalities. In addition, respondents who move to smaller municipalities have mean cosmopolitan attitudes similar to those of respondents who move to larger municipalities. This cosmopolitan bent among people who move to smaller municipalities likely reflects the fact that people with enough resources to move tend to have higher socioeconomic status and pro-cosmopolitan orientations (Recchi, 2015). Yet, this is not consistent with the logic of sorting, which predicts that anti-cosmopolitan people should move to smaller municipalities. Yet, if smaller municipalities make these people become more anti-cosmopolitan after their move, that would be consistent with the logic of contextual effects.
Figure 2 presents results for the three anti-cosmopolitan measures and provides no evidence of contextual effects. 23 The coefficients for time since moving in the “Better opportunities for Swiss” are clustered around zero and are not statistically significant at p < .05. For EU attitudes and support for the Radical Right, there is suggestive evidence that attitudes may get more anti-cosmopolitan after moving to smaller municipalities, which would be consistent with H1. However, in both cases, respondents who move to smaller municipalities already exhibit a more negative time trend for EU attitudes prior to their move. In short, there is no evidence in Figure 2 that moving to larger or smaller municipalities changes cosmopolitan attitudes.

Anti-cosmopolitan attitude time trends.
The models in Figure 2 test whether the general process of moving affects attitudes, but movers are not a random subset of the population. People who move may already be aware of the local culture in their destination, which could limit the likelihood that cosmopolitan attitudes would change after moving. It is not possible to randomly assign people to new municipalities across Switzerland, but given the existing data I can address this selection issue by examining whether moving only affects people from dramatically different environments.
For example, moving may only change attitudes when the new municipality is dramatically larger or smaller than the previous municipality (i.e., when the population size “treatment” is stronger). I explore this possibility by estimating attitudinal time trend models only for movers in the top and bottom quartile of municipality population differentials. 24 These results are in Supplemental Appendix Tables C2 and C3, and for the most part, the coefficients are clustered around zero and provide no evidence of contextual effects on cosmopolitan attitudes.
Another possibility is that moving only affects cosmopolitanism if the new municipality is an extreme case. To test this possibility, I use SHP codes for different types of municipalities to distinguish between “great urban centers” (the most cosmopolitan) and rural municipalities (the least cosmopolitan). 25 These results are in Supplemental Appendix Tables C4 and C5 and provide no evidence of contextual effects on cosmopolitan attitudes. Some rural municipalities are near large urban centers and may function as part of the broader metropolitan area. Therefore, I examine whether attitudes become more anti-cosmopolitan after moving only to the rural communes that are in cantons without large urban centers. The results are in Supplemental Appendix Table C6 and provide no evidence of contextual effects.
My primary measures of cosmopolitanism are dichotomous, which may make it difficult to observe subtle attitude changes after moving. Supplemental Appendix Table C7 presents results from time trend analyses using the more fine-grained anti-cosmopolitan index. Supplemental Appendix Table C7 presents results for moving to larger/smaller municipalities, larger/smaller municipalities in the largest quartile of population differential, and large urban centers/rural areas. In none of the models is there any evidence that moving affects cosmopolitan attitudes.
Finally, the effects of moving may depend on the type of person who moves. Research suggests that higher socioeconomic–status individuals benefit from cosmopolitan globalization while lower socioeconomic–status individuals are more likely to feel threatened (Hobolt & de Vries, 2016; Igarashi & Saito, 2014). To the extent that this is true, the pro-cosmopolitan effects of moving to larger municipalities may be limited to higher socioeconomic status respondents while the anti-cosmopolitan effects of moving to smaller municipalities may be limited to lower socioeconomic respondents. In addition, the effects of moving may be most pronounced among younger individuals who are in a more impressionable age.
Supplemental Appendix Tables C8 to C14 present time trend analyses for different socioeconomic subsets. Supplemental Appendix Tables C15 and C16 present time trend analyses among the youngest quartile of respondents. In none of the tables is there any evidence that moving affects cosmopolitan attitudes. In short, a series of alternate specifications finds no evidence that moving to municipalities of a different size affects cosmopolitan attitudes.
What Happens When Municipalities Change Over Time?
The second line of inquiry focuses on change over time in one of the key contextual factors that should affect cosmopolitan attitudes: size of the foreign population. 26 Figure 3 presents average changes in the foreign population over time. Results indicate that the foreign population increases faster in larger municipalities. This is consistent with the logic of H2 because if exposure to foreign people causes the Swiss to become more cosmopolitan, the more rapid growth of the foreign population in larger municipalities might account for the higher levels of cosmopolitanism in those municipalities.

Changes in the foreign population across municipalities.
To test H2, I regress cosmopolitan attitudes on the local percentage of foreign residents and use person fixed effects to estimate the importance of within-person changes in municipal characteristics over time. This is preferable to estimating models that compare cosmopolitan attitudes across respondents living in municipalities where the foreign percentage of the population changes at different rates. Analyzing variation across respondents confounds variation over time and variation across individuals. This is a problem because cosmopolitan individuals self-select into the larger cities where foreign population growth is the fastest (as seen in Figure 3). That variation across individuals is largely driven by selection and should not be interpreted as the result of contextual effects changing attitudes. Instead, my within-person analysis is a more appropriate strategy for identifying the effect of changing municipal characteristics on cosmopolitanism.
Table 1 presents results from models that regress anti-cosmopolitan attitudes on the size of the foreign population. Table 1 presents results for year-to-year changes in the foreign population and year-to-year changes in the rate of change of the foreign population. 27 There is no evidence that foreign population growth is associated with more cosmopolitan attitudes. 28 Instead, Model 1 in Table 1 suggests that immigration attitudes become less cosmopolitan as the foreign population grows. These results are consistent with findings from previous research which finds that exposure to outgroups can generate negative attitudes (Dinesen et al., 2020; Kaufmann & Goodwin, 2018). However, the effect sizes are small. For an average year-to-year change in the foreign population (0.23 percentage points), the coefficient in Model 1 suggests an increase of 0.0005 points in the likelihood of supporting better opportunities for Swiss citizens. Moreover, this runs counter to the predictions of H2 and is unlikely to account for geographic variation in immigration attitudes. Immigration attitudes are most positive in the largest cities, where the foreign population increases the fastest.
Anti-Cosmopolitan Attitudes and Changing Foreign Population.
Linear regression models with person fixed effects and controls for year, region,and municipal population. Models restricted to Swiss citizens born in Switzerland who did not move. “Foreign percentage” is the share of the population that is foreign-born. Models 1 to 3 estimate the effect of year-to-year changes in the foreign percentage of the local population. Models 4 to 6 estimate the effect of the rate of year-to-year changes in the foreign population. EU = European Union.
p < .01.
Table 1 examines year-to-year changes but foreign population growth may require longer time horizons to affect cosmopolitanism. Supplemental Appendix Table D2 presents results from models that regress each cosmopolitanism measure on rates of foreign population change over 2-, 3-, 4-, and 5-year intervals. 29 These additional models provide no evidence that growth in the foreign population is associated with more cosmopolitan attitudes. 30
The effect of foreign population growth may be stronger in specific types of municipalities. For example, foreign population growth might yield the biggest influence on cosmopolitanism in the larger municipalities where foreign growth is the most dramatic. Alternatively, foreign population growth might have greater effects on cosmopolitanism in rural areas. Rural municipalities have fewer foreign residents and lower levels of cosmopolitanism, so the effect of foreign population growth might be more distinctive in such settings. Supplemental Appendix Table D3 explores these possibilities with a series of models that regress each cosmopolitanism measure on foreign population in large urban centers, urban centers, and rural areas. The results in Supplemental Appendix Table D3 provide no evidence that growth in the foreign population is associated with more cosmopolitan attitudes.
Increasing percentages of foreign residents might matter most in high-density municipalities because those environments are more likely to expose native Swiss to the new foreign residents. Supplemental Appendix Table D4 regresses each cosmopolitanism measure on foreign population only among respondents in municipalities in the highest quartile of population density. The results provide no evidence that growth in the foreign population is associated with more cosmopolitan attitudes.
Another possibility is that the effect of foreign population growth is conditional on economic factors. Research suggests that immigration is most likely to be perceived as a threat when natives face economic difficulties (Dancygier, 2010; Dancygier & Walter, 2015). Therefore, the effects of foreign population growth may vary according to socioeconomic status. High socioeconomic status respondents may be open to the pro-cosmopolitan effects of foreign population growth whereas low socioeconomic status respondents may feel threatened and become less cosmopolitan. Supplemental Appendix Tables D5 and D6 present models that regress cosmopolitanism on foreign population growth among different (educational and occupational) subsets of high and low socioeconomic status respondents. There is no evidence that growth in the foreign population affects cosmopolitanism in any direction for any subgroup.
The municipal economic context may also be an important conditioning factor for when and how local foreign population growth affects cosmopolitanism. Supplemental Appendix Tables D7 to D9 examine the potential effects of foreign population growth across municipalities with different sectoral compositions. Supplemental Appendix Table D10 examines municipalities with different levels of local residents receiving social welfare. Supplemental Appendix Table D11 examines municipalities with different levels of local unemployment. There is a more detailed description of the expectations for these models and their results in Supplemental Appendix D. However, the main result across all of the analyses is no evidence that a growth in the local foreign population is associated with more cosmopolitan attitudes.
Supplemental Appendix Table D12 presents analyses using the more fine-grained anti-cosmopolitan index. Echoing the results from Table 1, there is evidence that growing foreign populations may be associated with more anti-cosmopolitan attitudes. Yet, this runs counter to the predictions of H2 and is unlikely to account for geographic variation in cosmopolitanism. 31 Supplemental Appendix Table D12 also explores whether the relationship between foreign population and cosmopolitanism may take nonlinear forms. Models include a measure of foreign population squared, but there is no evidence from this specification that foreign population growth contributes to geographic divides over cosmopolitanism.
Lifelong Exposure to the Same Geographic Context
The logic of H3 is that contextual effects should be observable among people who spend their entire lives in one geographic context. By reducing the sample to people who have only received one geographic treatment, I can estimate the effect of living in smaller or larger municipalities by regressing cosmopolitan attitudes on municipal population size. However, one cost to this approach is the loss of respondents. There are only 152 Swiss citizens born in Switzerland in the SHP data who have lived in the same residence since birth. Therefore, I estimate a series of models among people who have lived in the same residence since birth and since the ages of 1 through 10 years old. 32
Figure 4 plots results from the series of models for the anti-cosmopolitanism measures. The bottom panel shows no evidence of a relationship between municipality size and support for the Radical Right but the top two panels suggest living in larger municipalities is associated with less anti-cosmopolitan attitudes across most model specifications. 33 Moreover, the relationships are notable in size. Using the models for living in the same residence since at least 10 years old (the models with the largest sample size), the predicted probability of supporting “Better opportunities for Swiss citizens” is .45 for residents in the lowest decile of municipal population, compared with .28 for residents in the highest decile of municipal population. The predicted probability of supporting “Do not join the EU” is .60 for residents in the lowest decile of municipal population, compared with .46 for residents in the highest decile of municipal population.

Anti-cosmopolitanism among lifelong residence in the same municipality.
Results in Figure 4 are consistent with H3. To ensure they are not an artifact of calculating municipal population in deciles, Supplemental Appendix Tables E3 to E7 present similar models, where municipal calculation is measured in a coarser (quartiles) and more fine-grained (continuous) way. Results for the coarser measure are consistent with Figure 4, as lifelong residence in larger municipalities is associated with more cosmopolitan immigration and EU attitudes, but has no relationship with support for the Radical Right. Results from the more fine-grained measure do not suggest any relationships that are statistically significant (at p < .05) between municipality size and cosmopolitanism. This raises questions about the robustness of the finding, but may be due to the difficulty of identifying statistically significant relationships for such a fine-grained measure with relatively small sample sizes.
A more serious concern with results in Figure 4 is the challenge of accounting for selection effects. The advantage of this analysis is identifying the subpopulation that has only received one geographic treatment. However, people are not randomly assigned to remain in the same municipality throughout their life and some of the factors that lead people to be more or less cosmopolitan may be associated with their decision to move away or remain in their childhood municipality. The models in Figure 4 include covariates to control for some of these factors (education, occupation, and age), but there are likely to be other life course experiences that shape both residential choices and cosmopolitanism and which are not measured by the SHP.
Yet, even if results in Figure 4 were the true measure of contextual effects on cosmopolitanism, they could not explain the overall geographic divides. One reason is that respondents who remain their whole lives in the same municipality are an extremely small subset of the population. Among Swiss citizens born in Switzerland in the SHP, respondents who have been in the same municipality since birth are 1% of the population and respondents who have been in the same municipality since the age of 10 are 6% of the population. Moreover, Figure 5 suggests that the geographic divides are not limited to long-term stayers. Figure 5 plots geographic divides on “Better opportunities for Swiss citizens” among three long-term stayer subsets and respondents who move at least once during the SHP. There is more volatility in the plots for long-term residents because of the smaller sample sizes, but the geographic gaps are similar in size across each subgroup: roughly 0.20 points from the smallest to the largest population decile. 34

“Better opportunities for Swiss citizens” across geography among lifelong residents of the same municipality and movers.
In short, I find suggestive evidence that lifelong residence in different types of municipalities may affect cosmopolitanism. However, these results should not be overinterpreted because of concerns about self-selection and because the small subgroup of long-term stayers cannot account for the overall geographic divides.
Discussion
I have explored whether contextual effects can account for geographic divides over cosmopolitanism. Prior research suggests sorting is a key explanation of geographic polarization because different types of people live in different geographic environments. Yet, it has been difficult for previous research to credibly evaluate contextual effects, which is the other possible explanation for geographic divides. I address these challenges by leveraging longitudinal data from the SHP merged with contextual data on municipal-level environments.
The takeaway message is that geography in and of itself is not the main explanation for geographic divides on cosmopolitanism. I find no evidence that moving to a different municipality or living in municipalities that change composition over time affects geographic divides on cosmopolitanism. Nonetheless, my results suggest that contextual effects do exist. I find suggestive evidence that lifelong residence in larger municipalities may increase cosmopolitanism, although those results should be interpreted with caution and cannot account for the overall geographic divides. I also find evidence that increases in the local foreign population can be associated with more anti-cosmopolitan attitudes, although this too cannot account for the overall geographic divides.
Future research should continue to explore the nuanced ways that contextual effects may affect cosmopolitanism. Data were not available to disaggregate the local foreign population according to country of origin. Yet it is likely that Swiss people respond to different foreigners in different ways. In addition, there may be indirect effects of geographic context on cosmopolitanism. We know that education and occupation are two of the most important demographic predictors of cosmopolitan attitudes. Geographic context likely shapes educational and occupational attainment and may have an indirect effect on cosmopolitanism through those demographic variables.
The results in this article are from Switzerland, but urban–rural polarization is relevant for countries across Europe and North America. The geographic divides are real and may foreshadow increasingly polarized communities within nation-states. However, my findings suggest that contextual effects are not likely to be the main cause of those geographic divides. Future research should focus on better understanding the sorting processes that are likely the key to spatial polarization.
Research Data
CPSReplicationESS for Geographic Divides and Cosmopolitanism: Evidence From Switzerland
CPSReplicationESS for Geographic Divides and Cosmopolitanism: Evidence From Switzerland by Rahsaan Maxwell in Comparative Political Studies
Research Data
CPSReplicationSHP for Geographic Divides and Cosmopolitanism: Evidence From Switzerland
CPSReplicationSHP for Geographic Divides and Cosmopolitanism: Evidence From Switzerland by Rahsaan Maxwell in Comparative Political Studies
Supplemental Material
SwissurbrurCPSReplicationinfo – Supplemental material for Geographic Divides and Cosmopolitanism: Evidence From Switzerland
Supplemental material, SwissurbrurCPSReplicationinfo for Geographic Divides and Cosmopolitanism: Evidence From Switzerland by Rahsaan Maxwell in Comparative Political Studies
Supplemental Material
SwissurbrurCPSRnRappendixFinalversion – Supplemental material for Geographic Divides and Cosmopolitanism: Evidence From Switzerland
Supplemental material, SwissurbrurCPSRnRappendixFinalversion for Geographic Divides and Cosmopolitanism: Evidence From Switzerland by Rahsaan Maxwell in Comparative Political Studies
Footnotes
Acknowledgements
I would like to thank Boris Wernli and the Swiss Household Panel for data assistance and access to commune-level data. Claire Adida, Ryan Bakker, Cameron Ballard-Rosa, Jóhanna Birnir, Simon Bornschier, Lenka Bustikova, Volha Charnysh, Catherine De Vries, Ryan Enos, Jeremy Ferwerda, Marc Helbling, Sara Hobolt, Eroll Kuhn, Lilliana Mason, Jan Rovny, and several anonymous reviewers provided helpful comments.
Author’s Note
Previous versions of this article were presented at University of British Columbia, University of Texas at Austin, University of North Carolina at Chapel Hill, Harvard University, and the American Political Science Association annual conference.
Declaration of Conflicting Interests
The author declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author received no financial support for the research, authorship, and/or publication of this article.
Notes
Author Biography
References
Supplementary Material
Please find the following supplemental material available below.
For Open Access articles published under a Creative Commons License, all supplemental material carries the same license as the article it is associated with.
For non-Open Access articles published, all supplemental material carries a non-exclusive license, and permission requests for re-use of supplemental material or any part of supplemental material shall be sent directly to the copyright owner as specified in the copyright notice associated with the article.
