A spatial analysis of parliamentary elections in Sweden 1985–2018

Understanding where and why political change is happening in a country is a fundamental issue in political geography. While electoral choice is individual, it is influenced by various sociological, cultural, and geographical factors postulated to create ‘cultural fields’ influencing individual decision-making. Here, we test the cultural field hypothesis on Sweden, an important democracy of Europe long regarded as an example by other European countries, by studying the middle-long-term evolution of the spatial structure of political choice over the last three decades. In testing the cultural field hypothesis, an analysis of spatial correlations is combined with groupings of Swedish municipalities into larger communities reflecting the similarity of their voting profiles. We show that spatial correlations decay logarithmically, which is a sign of long-ranged interactions, and also demonstrate that Sweden can be divided into three or four large and stable politico-cultural communities. More precisely, a transition from three to four main politico-cultural communities is observed. The fourth community, which emerged in the early 2000s is of particular interest as it is characterized by a large vote-share for the Sweden Democrats, while almost all other parties underperform. Moreover, the Swedish electoral landscape seems to be increasingly fragmenting even when the voting profiles of the municipalities over the country are slowly converging.

'snapshots' of their current state. Borghesi and Bouchaud (2010); Borghesi et al. (2012) proposed to study cultural fields through elections by quantifying empirical regularities in the spatial distribution of some binary characteristics of the elections, such as the turnout rate or the winning rate. One of their main conclusions is that the spatial correlations in the turnout rate or in the winning rate display a logarithmic decay typical of power laws and other heavy-tailed distributions (Thurner et al. 2018) that characterizes two-dimensional (opinion) diffusion processes (Borghesi and Bouchaud 2010;Borghesi et al. 2012;Fernández-Gracia et al. 2014;Fortunato and Castellano 2007). Logarithmic decay has been documented for elections with either binary or multiple choices in at least eleven countries (Borghesi and Bouchaud 2010;Borghesi et al. 2012;Situngkir 2004;Maulana andSitungkir 2010, 2015;Fernández-Gracia et al. 2014), including Sweden (the general elections of 2006 and 2010 are analysed in Maulana and Situngkir (2010)). This universal behaviour is a sign of long-ranged interactions, in which the characteristic length of the system is much larger than the length on which interactions typically occur. It is usually interpreted as supporting the existence of cultural fields.
Long-ranged interactions imply the existence of large macroscopic domains of the order of the characteristic length of the system, typically between 150 and 300 km (Borghesi et al. 2012). These macroscopic regularities have led a few scholars to use community detection methods on the outcome of elections in order to group together administrative units sharing a similar voting profile. Fernández-Gracia and Lacasa (2018) performed such an analysis on Spanish elections in 2015 and 2016, while Maulana and Situngkir (2015) applied a similar methodology to the 2013 German elections, however, these studies discuss the resulting groups of entities only shortly. For example, the three main groups of municipalities identified by Maulana and Situngkir (2015) in the German case are taken to mainly reflect the historical divisions of the country.
In this paper, we test the cultural field hypothesis on Sweden by studying the evolution of the spatial structure of political choice in Sweden over the last three decades. The choice of Sweden is motivated by it being an important democracy of Europe, long regarded as an example by many other European democracies. In addition, its political landscape has significantly changed over the last three decades, notably with the fall of the Social Democrats and the emergence of the Green Party and the Sweden Democrats. In testing the cultural field hypothesis, analysis of spatial correlations is combined with groupings of Swedish municipalities into larger communities reflecting the similarity of their voting profile, computed with the help of the Bhattacharyya coefficient (Bhattacharyya 1943). The chosen similarity measure improves on the cosine similarity measure used in both (Maulana and Situngkir 2015;Fernández-Gracia and Lacasa 2018). The longitudinal analysis presented here represents one of the first attempts to use combined methods from statistical physics, network science, and spatial analysis to the study of electoral geography. While previous studies have only investigated the spatial correlations or the groupings of basic entities into communities, we also provide an extended discussion of our results in the light of the state-of-the-art electoral geography of Sweden. Our aim is to contribute to the understanding of Swedish electoral geography and its development over time by providing answers to the following questions: • Is the cultural field hypothesis supported for Sweden? Are the spatial correlations in electoral behaviour logarthmically decaying? If so, is the spatial dependence stable over time? • What is the spatial dependence of the Bhattacharyya similarity in electoral behaviour? • Can Sweden be partitioned into politico-cultural communities based on the full spectrum of electoral behaviour? If so, how many major communities can be identified? • Is the partition into politico-cultural communities stable over time? Can trends be observed? • How do the obtained partitions compare with the state-of-the-art electoral geography of Sweden?
A preliminary version of this study has been published in Michaud et al. (2021), where the partition into politico-cultural communities is discussed. The current study significantly expands on the material covered in Michaud et al. (2021) by also including an analysis of spatial correlations in electoral behaviour and of the spatial dependence of similarities between voting profiles, and also provides a more detailed discussion of the interpretation of the partitions of Sweden into politico-cultural communities. This paper is organized as follows. "Swedish parties and electoral geography" sectionprovides some background on Swedish electoral geography. "Data and methodology" section presents the data and methodology used here. "Results and discussion" sectionpresents and discusses the results and some concluding remarks are provided in "Conclusions" section. This paper is complemented by "Appendix", which discusses the dependence of the results on the similarity measure used.

Swedish parties and electoral geography
Following the seating order in the Swedish Parliament (Riksdagen) from right to left, the parties represented there after the elections of 2018 are: The largest of the eight parties is S (29% of the seats), followed by M (20%), SD (18%), C (9%), V (8%), and KD (6%), while the smallest ones, MP and L, have 5% or less of the seats.
The number of parties means that they need to form coalitions, or at least secure some tolerant opposition in order to establish governments. The coalitions have tended to follow the usual left-right division. Of the nine governments that have ruled Sweden since 1982, five have been Social Democratic minority governments, two minority coalitions between S and MP and one a bourgeois minority coalition between M, L, C and KD. The remaining, bourgeois government started 2006 with these four parties with a majority in the Parliament (the only government in that position since 1981), but lost its majority in the 2010 elections, however continuing for four more years as a minority government. V has not been in any government, but it has oftentimes helped the Social-Democrat-led governments to keep their power, while SD has so far not been counted on as supports.
Oscarsson and Holmberg have studied various perspectives on Swedish elections and electoral behaviour within the framework of the Swedish National Election Studies Program (SNES). As for the political geography in Sweden, they suggest two dividing lines that pervade the electoral behaviour: one between the North and the South and one between cities and the countryside (Oscarsson and Holmberg 2008, p. 247). Although regional variation of electoral behaviour in Sweden is quite weak compared with many other European countries (Lane et al. 1999) and may even have decreased for some parties during the 20th century (Gilljam 1993, p. 220), there are still clear differences between different parts of Sweden. A traditional feature within the North-South divide commonly mentioned in the literature (Oscarsson and Holmberg 2008;Lidström 2018;Holmberg 2000;Blomgren 2012), is the strong support for S and V in the northern parts of the country. Some other traditional patterns are the great support for L in Gothenburg, M in Stockholm and C on the island of Gotland (Holmberg 2000, p. 89).
Of particular interest for this study is the dynamics of Sweden Democrats, a relatively new party that was established in 1988 and started growing in 1998. Besides the stronger-than-average support for SD in rural areas, another geographical aspect related to it is the stronger-than-average support of the party in the South of Sweden, particularly in the regions of Scania and Blekinge (Oscarsson and Holmberg 2016;Sannerstedt 2017). By calculating a measure of under/overrepresentation of SD in seven Swedish regions in the 2014 election, Sannerstedt (Sannerstedt 2017) concluded that the party was overrepresented in Eastern and Northern Middle Sweden, in Småland, and in Southern Sweden, and underrepresented in Stockholm and Norrland. In Western Sweden, the support for the party was in line with its national average.
Regarding the evolution of the electoral geography in Sweden over time, there are not many studies concerned with the issue. One notable exception is the study by Oscarsson et al. (2018), where the geographical concentration of party support between 1991 and 2018 was studied by calculating the evolution of the coefficient of variation measure (CV). The CV is defined as σ µ , where µ is the mean vote share of a party and σ its standard deviation. CV is a measure of dispersion and a high value for a certain party indicates a large variation in support for the party between the regions of Sweden. Oscarsson et al. (2018) discuss the evolution of the CV for each party since 1991, noting in particular that S and M have the smallest regional differences in support. Summing it up, the electoral geography in Sweden, such as presented in the literature, has been quite unchanged over the years. The results from the 2018 elections, as presented by Oscarsson et al. (2018), can serve as a good summary of the literature as a whole: • Strong 2 support for V and S in the northern parts of Sweden. • Strong support for C in smaller cities and on Gotland.
• Strong support for MP in Stockholm and other university cities. • Strong support for SD in Scania and Blekinge. • Strong support for L in larger cities and on the West Coast (for instance Gothenburg). • Strong support for M in the three largest cities. • Strong support for KD in Småland and Norrland.
Since the literature mostly focuses on specific elections, or on the change from one election to the next, not much attention has been given to the longer-term evolution of Swedish political geography. Furthermore, it is common to simply present the locations where a certain political party has its strongest and weakest support (see, e.g., Oscarsson and Holmberg 2008). Sometimes more sophisticated methods are used, e.g., the regression-based analysis method employed by Lidström (2018). However, these studies are often performed in a party-by-party fashion, and do not provide an integrated view of electoral behaviour. In addition, they invariably lead to multidimensional results that are difficult to interpret and visualize. It appears that an integrated approach to the topic would be advantageous not least when analysing the factors underlying the political divisions.

Data
For this project, the results of parliamentary elections in Sweden from 1985 to 2018 at the municipal level are used. These data are freely available from Statistics Sweden (http:// scb. se) and also provided in Additional file 1. The level of municipality was chosen because it is coarse enough for the maps to be informative, yet fine-grained enough to provide some reasonable insights.
The map of municipalities has changed somewhat during the study period, as their number has increased from 284 to 290. The creation of new municipalities occurred without exception as a division of one municipality into two or three new ones 3 . The changes were handled by assuming homogeneity in electoral behaviour before the division and using the finer decomposition when comparing partitions into communities.
The vote-share distribution characterizing a municipality i is represented as an 11-dimensional vector v i , comprising the following choices: S, M, SD, MP, C, V, L, KD 4 , others (minor parties) 5 , invalid or blank votes, and abstention. The components of the vote-share vector are obtained by computing the percentage of votes for each option in each municipality.
In order to compute spatial correlations we need to compute the distance between two municipalities. These distances were estimated using the distance between their centroid. The distance matrix is provided as an Microsoft Excel file in Additional file 2.

Methods
The main idea is to represent Sweden as a network of its municipalities. The links between two municipalities can encode either their relative distance or the similarity of their voting profile (measured using the Bhattacharyya coefficient Bhattacharyya 1943). Using distances between municipalities, we can study the spatial correlations in electoral behaviour as well as the spatial dependence of the similarity between voting profiles. Employing similarity of voting profiles, Sweden was partitioned into politico-cultural communities using a functional network analysis (Latora et al. 2017), an analysis that produces a similarity network (called a functional network) of a given data set.

Measuring similarity
The degree of similarity between two multidimensional vectors x i and x j can be computed in different ways. A common way to compute similarity is using the cosine similarity measure, which is defined as For vectors representing discrete probability distributions, other similarity measures may be more appropriate. In this paper, we discuss the Jensen-Shannon similarity and the Bhattacharyya coefficient.
The Jensen-Shannon similarity is defined as (Endres and Schindelin 2003): where the Jensen-Shannon divergence JSD(x i , x j ) is defined as where m = 1 2 (x i + x j ) and D KL (x||y) = i x i log 2 ( y i x i ) is the Kullback-Leibler divergence. The Jensen-Shannon similarity is an information theoretic measure of how much information is shared between two probability distributions.
(1) S Cos ij := x i · x j �x i ��x j � . (2) Finally, the similarity measure based on the Bhattacharyya coefficient (BC) that we will refer to as the BC similarity measure (Bhattacharyya 1943) is defined as This coefficient is an approximate measure of the overlap between two probability distributions, here, two vote-share distributions. Its values vary between 0 and 1, reaching 0 when there is no overlap between the distributions. It increases with the number of parties present in both compared municipalities and with the amount of overlap in the vote shares for a party. In our data set, all choice options are present in every municipality, which in itself yields generally high values of the coefficient.
It is argued here that a similarity measure tailored to compare probability distributions is more natural than the more general cosine similarity. We tested both the BC and the Jensen-Shannon similarity measures (Endres and Schindelin 2003) and found that the partition decomposition was indistinguishable between the two (see "Appendix"). It was decided to use the BC as it is computationally cheaper, hence, we will write the similarity S ij := S BC ij . In "Appendix", the results of the community detection for different similarity measures are discussed in more detail.

Spatial dependence of correlations and similarity in electoral behaviour
Following Cavagna et al. (2010), the spatial correlation between two multidimensional vectors x i and x j , where i and j index a spatial position (in our case the location of a municipality) can be computed by, first, computing the spatial average x = 1 M i x i , where M is the total number of locations, and then, the fluctuations y i = x i −x . The spatial correlation function is then defined as where c 0 is a constant chosen so that C(0) = 1 and r ij is the distance between i and j. The delta function counts how many locations are at the same distance (or in the same distance bin). The spatial correlation function has the property that its spatial average vanishes. Positive values of C(r) indicate that municipalities separated by a distance r deviate from the spatial average in the same direction, whereas negative values indicate that they do so in different directions. Note that this correlation function is related to the cosine similarity, since both of them are based on the scalar product.
In order to compute the spatial dependence of the BC similarity measure, a similar strategy is used, however somewhat modified since similarities are defined between pairs of municipalities rather than for each municipality. We ij BC ij the mean similarity. We can then adapt (5) to similarities by defining , where s 0 is a constant chosen so that S(0) = 1 . S(r) > 0 whenever municipalities separated by a distance r are more similar than the average similarity between municipalities. For each correlation function or spatial dependence, one defines the correlation length or the similarity length as the smallest value of r for which the function vanishes. The spatial correlation (5) and the BC simiarity (6) are supported over the range [r min , r max ] , where r min = 3 km and r max = 1467 km are the minimum and maximum distances between two municipalities.

Partitioning Sweden into politico-cultural communities
The functional network associated with a given election can be specified by a matrix S , where the elements S ij represent similarity in electoral behaviour, represented by the vote-share vectors v i and v j , between two municipalities i and j. The nodes of this network are the Swedish municipalities, and the edges are weighted by the similarity between municipalities. As discussed in "Measuring similarity" section, the functional network is specified using the BC similarity (4). The resulting network is a fully connected weighted network.
In order to extract communities from a fully connected weighted network, a community detection algorithm that works well with weighted networks is needed. Modularity-maximizing algorithms are a natural choice since modularity can be computed for weighted networks. In addition, the number of communities should not be determined in advance, but the algorithm should yield the optimal solution. A standard communitydetection algorithm satisfying these criteria is the Louvain algorithm (Blondel et al. 2008), which is a stochastic modularity-maximizing algorithm that works by merging communities whenever it increases the modularity of the partition of the network. Since the resulting partition is tied to the choice of the community detection algorithm, the results presented in this paper are tied to this choice as well. In this paper, we do not assess the robustness of the partitions by using different community detection algorithms. Instead, we assess the relevance of the communities obtained by characterizing their properties, see "Identification and characterization of communities over time" section.
Using the Louvain algorithm, Sweden was partitioned into politico-cultural communities at each of the ten parliamentary elections between 1985 and 2018. The partitions can be visualized by projecting the network onto the map of Sweden and colouring the municipalities according to the community they belong to. Note that municipalities belonging to the same community are not necessarily geographically adjacent, since the criteria of grouping them together is based on similarity in voting only.

Spatial distribution of communities
Since the politico-cultural communities have been identified using voting similarity only, it is not clear whether they are clustered in space or randomly distributed. In order to quantify this property, a joint count test for k-coloured factors (Cliff and Ord 1981;Fingleton and Upton 1985) is employed. More specifically, we investigate the same-colour joint statistic. For this, the contiguity matrix of Swedish municipalities denoted as W is needed so as to determine which municipalities are adjacent to each other. For this, we use the so-called Rook contiguity, for which W ij = 1 if municipalities i and j have a common boundary, otherwise 0. Five of the municipalities 6 are islands and do not share boundaries with other municipalities. In addition to the contiguity matrix, we need a joint similarity matrix A , whose elements A ij = 1 if municipalities i and j belong to the same community, otherwise 0. The joint count statistic considered here is given by It counts the number of joints that connect municipalities belonging to the same community. The corresponding joint count test consists in extracting the expected distribution of Ŵ if municipalities had been randomly assigned to communities. For this test, the pseudo-p-value is reported, computed as T +1 N +1 , where T is the number of times when the randomly computed statistic is larger than the observed one and N is the total number of shuffles. Using N = 999 , the least possible pseudo-p-value is 0.001. In that case, no randomly computed values of the statistic exceed the observed value. In order to get a better idea of how far from the random distribution the observed value is, we also report the z-score computed from the random distribution of the statistic under the assumption that it is normally distributed.

Identification and characterization of communities over time
After identifying the communities existing at each of the ten elections, the next operation was to identify those communities that persisted over time, being similar from election to election. The lower size limit for a community was thereby set at eight municipalities.
The criteria used to identify communities over time is inspired by the Jaccard index J (c i , c j ) between two communities c i and c j used in Palla et al. (2007), Leone Sciabolazza et al. (2017) and defined as where the vertical bars denote the cardinality of the set. This index has a value 1 if c i = c j and 0 if c i and c j are disjoint. As it does not work very well for identifying growing or decreasing communities, it was modified to the index I(c i , c j ) defined as where the cardinality of the union is replaced with the average cardinality. The criteria for a community c t i belonging to the partition of election year t to be identified with community c t+1 j belonging to the partition of election year t + 1 is I(c t i , c t+1 j ) > 0.4 . For every long-lasting community identified, the evolution of their size, i.e. the number of municipalities within them, is reported.
In order to characterize the electoral behaviour in each major community, the average vote-share distributions in them are computed as averages of the vote-share distribution , 6 The five island municipalities are Ekerö, Gotland, Lidingö, Tjörn and Öckerö.
of all municipalities in the respective community. This is called the prototypical voteshare distribution of a community. The similarity measure used to construct the functional network is then also used to estimate the similarity between the communities, as well as their evolution. In addition, electoral behaviour in the major communities is characterized using standardized support scores. These are computed by the formula where µ C is the prototypical vote-share of community C, µ is the mean vote-share of all Swedish municipalities, and σ is the standard deviation of that. Thus, the score measures the over/underrepresentation of a party in a community with respect to the national municipality average.

Comparing partitions
In order to compare the partitions at different times it is necessary to quantify the difference between them. This is done using the normalized mutual information (NMI) measure (Danon et al. 2005;Kuncheva and Hadjitodorov 2004). The NMI is based on the confusion matrix N , where the rows correspond to the communities detected in partition A and the columns to those detected in partition B. The elements of N , N ij represent the number of nodes (here: municipalities) in community i of partition A that are also present in community j of partition B.
Let c A and c B be the number of communities found in partitions A and B, respectively. We denote the sum over row i of the confusion matrix N by N i· and the sum over column j by N ·j so that N is the total number of municipalities (the sum of all elements of matrix N ). With these definitions, the NMI measure is given by The values of the NMI measure vary between 0 and 1, being 0 when the two community structures are independent and 1 when they are identical.

Results and discussion
The cultural field hypothesis and spatial dependence of correlations and similarities

Spatial dependence of correlations and similarities
Here, we present the results of the analysis of spatial correlations for each of the ten Swedish parliamentary elections held between 1985 and 2018 and for the changes between two consecutive elections. In addition, we study the spatial dependence of the BC similarity measure for each election. Hence, for each election year and for each municipality, we define the vote-share vector v t i , where i indexes municipalities and t the election year. The change between two consecutive elections is defined as δv Finally, the BC similarity for each pair of municipalities and for each election year as S t is computed using (4). For each election year, the spatial correlation in electoral behaviour can be computed using (5), replacing y i with v t i − v t , where the bar denotes the average over municipalities. Similarly, the spatial correlation in vote-share changes between two consecutive elections can be computed replacing y i with v (5). Finally, spatial dependence can be analysed using (6).
Results are displayed in Fig. 1. In the two upper plots, the spatial correlation in electoral behaviour is reported, while the two middle plots show the spatial correlation in the changes in vote-share between two consecutive elections. In the two lower plots of Fig. 1, the spatial dependence of the BC similarity measure is reported. In all cases, the left panel uses a linear scale and the right panel a logarithmic one.
The spatial correlation functions at election years and between election years depend only weakly on the election year itself. Both display a rapid logarithmic decay over short distances as shown by the logarithmic plots, thus showing the long-ranged aspect of the underlying interactions. In addition, for longer distances, two peaks in the correlation function at about 400 km and 600 km were observed. These correspond to the distance between major cities on the East and West coasts of Sweden, suggesting that the voting behaviour in large cities is well-correlated. The existence of peaks in the correlation functions has not been reported in this context before. Even though the similarity of voting patterns in the largest cities has been known to politologists (Hagevi 2011;Oscarsson et al. 2018), the analysis on which this interpretation is based is of a new kind. The results for the changes between consecutive election years are noisier.
The spatial behaviour of the BC similarity is different from that of spatial correlations. Its decrease seems to be linear rather than logarithmic.
The correlation length for voting behaviour defined at the end of "Measuring similarity" sectionand displayed in Fig. 2 is stable over time, however increasing at the last election (2018). This may be a sign of convergence in electoral behaviour (see below). The correlation length is of a similar order of magnitude than that observed in other countries (Borghesi and Bouchaud 2010).
The similarity length defined at the end of "Measuring similarity" section appears to be growing until the 2010 election and then stays relatively stable, suggesting that electoral behaviour seems to be converging. Although the spatial dependence of the BC similarity is linear rather than logarithmic, the slope of the decay is so small that the similarity length exceeds the correlation length by a factor of two to three. Hence, voting behaviour in municipalities separated by a distance between the correlation length and the similarity length appears to be uncorrelated, on average, while at the same time being more similar than average. This suggests that the BC similarity is more sensitive to small differences in vote-shares, justifying the choice of the BC similarity measure.
Finally, the correlation length for changes in voting behaviour between consecutive elections fluctuates between the correlation length and the similarity length. It is not possible to compare the BC similarity for changes in vote-shares, since these do not form a discrete probability distribution and can be either positive or negative.

Consequences for the cultural field hypothesis
According to the cultural field hypothesis (Borghesi and Bouchaud 2010;Siegfried 1913;Bussi 1998;Gamache 2005), votes are not expected to be distributed randomly in space and time. Cultural fields are meant to encode the local biases in intentions and propensities to act in certain ways (Borghesi and Bouchaud 2010). Spatial differences in voting profiles can at least partly be tied to local politico-cultural history, which makes certain alternatives seem more appealing than others, and also influences the roads that a wish for change may take. This collective situation is analogous to Bourdieu's concept of habitus: due to past circumstances, the range of alternatives that seem relevant at present is different for different groups, and even those who rebel against the existing situation may do so in different ways in different groups (Bourdieu 1977). Borghesi and Bouchaud (2010); Borghesi et al. (2012) suggest to study cultural fields empirically by analysing spatial correlations in voting behaviour. Such behaviour is a sign of long-ranged interactions, as predicted by the (opinion) diffusion theories in twodimensional systems (Borghesi and Bouchaud 2010;Borghesi et al. 2012). Here, the same idea was applied, extending it to the study of spatial correlations in the changes in electoral behaviour between two consecutive elections. Moreover, the spatial dependence of the BC similarity measure was studied. The results presented in "Spatial dependence of correlations and similarities" sectionlend strong support for the relevance of the cultural field hypothesis, since such a field should not only influence the voting behaviour in a particular election but also how this behaviour evolves over time. Indeed, it would be hard to speak of 'cultural' fields without some durability. Moreover, the typical size of the correlation length is 150 km, which illustrates the fact that the macro-level patterns are long-ranged. Our finding that the similarity length is two to three times larger than the correlation length is also compatible with long-ranged interactions and, thus, with the cultural field hypothesis. As this study investigates a much longer time period than those cited, it adds important evidence in the evaluation of the cultural field hypothesis.

Visualization
Since the spatial correlation in voting behaviour decays logarithmically, the interactions are expected to be long-ranged, resulting in a pattern with a characteristic length scale equal to the correlation length. Figure 3 exemplifies this by visualizing the BC similarity to the voting profile of the Swedish capital, Stockholm. Let us define v S the voting profile of Stockholm municipality. Then, the BC similarity to Stockholm of a municipality i is given by BC iS := BC(v i , v S ) (see (4)) and the average BC similarity to Stockholm by BC S := 1 M i BC iS , where M is the total number of Swedish municipalities. We can then compute the deviation from the average similarity rescaled in such a way that δBC SS = 1.
The heat map displaying δBC iS is displayed in Fig. 3. The pattern is clearly long-ranged with patches of red and blue. The correlation and similarity lengths are included for readability. Other large Swedish cities such as Gothenburg and Malmö are coloured red, illustrating the similarity in voting between large cities, which contributes to the peaks in spatial correlations.

Politico-cultural communities in Sweden 1985-2018
The long-ranged pattern identified above motivates the partitioning of Sweden into communities. Only two previous studies have made partitions of the country (Spain Fernández-Gracia and Lacasa 2018 and Germany Maulana and Situngkir 2015) under investigation. The ambition here was to not only compute the partition, but to study it in detail over a long time period, while also looking at some properties of the communities identified. The fact that this study covers a 33-year period also enabled us to study timerelated properties such as the general stability of the pattern, the changes that occurred in it, and the varying rates at which they did so.

The meaning of 'politico-cultural community'
Applying functional network analysis to the ten Swedish parliamentary elections between 1985 and 2018, a partition of the country into politico-cultural communities was obtained for each election using the Louvain community detection algorithm (Blondel et al. 2008), based on the BC similarity. The identified regions are here called 'politico-cultural communities' , because (a) the division is based on electoral behaviour (thus political); (b) the basically stable yet sometimes even abruptly changing nature of , and (c) the type of the analysis employed was specifically designed to identify communities in a network (thus community). Before going to details it is important to understand the difference between party support and the distribution of voters between the parties, which are different but related concepts. There are stable differences between the communities as regards the support for different parties, e.g. so that some parties underperform and some overperform in relation to their respective national averages during the entire study period in some communities. This traditional way of analysing regional differences is, however, different from the method used here, which analyses the support for all electoral alternatives at once, comparing the voter distributions between municipalities. Thus, the fact that a certain party is underrepresented in two communities does not make the communities identical if the overrepresented parties are different. Practical examples of this will follow.
To this can be added that not only the votes for political parties, but also abstentions and invalid votes were here taken as parts of the electoral profile. Although they did not differentiate very much between communities they have not been included in previous studies of this kind.

Politico-cultural communities
Four politico-cultural communities have been identified using the procedure outlined in "Identification and characterization of communities over time" section. The corresponding values of the index I are reported in Fig. 4.
The analysis conducted here shows that Swedish municipalities can be divided into separate regions on the basis of the electoral behaviour of their populations. Without imposing any 'desired' number of such regions on the analysis, nine out of ten municipalities could be assorted into three, and later four, major stable regions between 1985  Fig. 5. In each of them, the four major communities are coloured; municipalities outside these are grey.
The four communities identified in Fig. 5 are:

North
The community displayed in green that covers most of the North of Sweden as well as some coastal municipalities in the South East. Urban The community displayed in yellow that covers the major Swedish cities, Stockholm, Gothenburg, and Malmö, along with many municipalities around them. The Urban community is noticeably similar to the red patches of the Stockholm-based similarity heat map of Fig. 3. Rural South The community displayed in blue that covers rural parts of the South of Sweden as well as some municipalities in the North.

Far South
The community displayed in brown that emerges in the far South of Sweden, expanding northward. This community is only identified from 2002. Before that, it is merely a rest category.
The identified communities appear to be geographically clustered, although not entirely cohesive (see Fig. 5). In 1985, only the North community is spatially highly concentrated, but over time the other communities seem to become more so as well. To quantify this, the same-colour joint count test described in "Spatial distribution of communities" sectionwas applied. The pseudo-p-value associated with this test is 0.001 for every partition, i.e. none of the random shuffles yielded a value higher than the observed one. In addition, the z-score is always larger than 14, which implies an   • The Rural South community is characterized by an overrepresentation of both C and KD and an underrepresentation of S and V. This pattern is stable over time, however, some decline for MP can be discerned. • The Far South community 7 is mainly characterized by a great overrepresentation of the SD party and an underrepresentation of V. It is also noticeable that the support for S has gone from the party being markedly overrepresented to being markedly underrepresented, and that for V becomes even more underrepresented over time.
Overall, the analysis shows that the major communities display marked differences, most of which are stable over time.

The development of the communities 1985-2018
The politico-cultural communities were identified at ten points in time, and they show a great deal of stability as regards which municipalities belong to which community. This is particularly clear for the North and Urban communities which have a very high I index over the entire period of study. This enables us to treat them as real phenomena with some persistency. However, they do change over time. This happens in three different ways: (a) the cluster structure changes spatially, expanding, shrinking, and/  or changing its shape when existing municipalities are 'lost' to other communities and new ones are 'won' from them; (b) the average voter-distribution profiles of the communities change over time as the support for the different alternatives (in relation to their national averages) changes within them, and (c) since the voter-distribution profiles are calculated in relation to the national averages, which are constantly changing, their real effects will be different at different occasions. Panta rhei: a community in 2018 is not exactly the same as 'it' was in 1985.
The community structure While the number of municipalities in the North and Urban communities has oscillated between 80 and 100 (see Fig. 6 (left)), that in the Rural South community has decreased from 99 to 31, while the new Far South community has grown from less than ten municipalities in 2002 to 42 in 2018. The number of municipalities outside the large communities remains approximately constant until 2014, when they jumped from 22 to 39.
The North community has been geographically stable, consisting of a large majority of municipalities in northern and mid-Sweden (see Figs. 4, 5) and a number of municipalities on the southeastern and even southern coastlands.
The Urban community's 'heartlands' around Stockholm, Gothenburg, and Malmö have also been stable (see Figs. 4,5), but their size around the respective large cities has varied, most markedly in 2010, when Stockholm and Gothenburg were almost connected by municipalities belonging to that community, and after 2014, when large parts of southernmost Sweden shifted from Urban to the new, Far South community.
The Rural South community, which in 1985 comprised almost all the inland municipalities of southern Sweden, a region towards the Norwegian border, and many single municipalities in the North of Sweden, has since then gradually shrank to its current area around the city of Jönköping, together with some geographical outliers. This reduction of the Rural South community seems to be due to three different dynamics. First, starting from the 1990s, those municipalities in the North that were previously parts of the Rural South community have switched to the North community. By 2018 only one municipality in Northern Sweden remains. Second, the Urban community has also gained some territory from the Rural South community. This is particularly visible in 2010, as Gothenburg and Stockholm are almost connected by Urban community, whereas in 1985, these two regions were separated by the blue region of the Rural South community. Third, in the southernmost parts of Sweden, the Far South community has grown mainly on the territory of the Rural South community.
The Far South community can only be identified from 2002. It is located in the southern parts of Sweden. During the period 2002-2018, this community has rapidly grown, mainly on the territory of the Rural South community.
Most (75%) of the larger ( > 50,000 inhabitants) municipalities retained their community membership throughout the study period, but some, notably the cities of Eskilstuna and Gävle, oscillated between three different clusters, starting from the North community and ending up undefined in 2018. Interesting, and perhaps indicative of future developments, is the move of Malmö, the third largest city of Sweden, away from the Urban community to undefined in 2018. Barring the existence of some local peculiarities, the undefined positions are normally located between the major alternatives, and indicate a propensity to change.
The rate of change in the geography of the communities can be estimated using the normalized mutual information (NMI) measure, see (10). The results, displayed in Table 5, show that the rate of change has accelerated since 1998, as the NMI has decreased from 0.84 to 0.70.
While the partition into communities did not change much between 1985 and 1988, a larger change occurred between the 1988 and the 1991 elections. After a temporary restabilisation, the community structure has since 2002 been changing at a markedly faster rate.
Electoral behaviour in the communities The second type of change, that of the voteshare distributions (relative to national averages) in the communities, is shown in Tables 1, 2, 3 and 4, and summarized comparatively in Fig. 7 (right), where pairwise BC similarity scores (see (4)) between the prototypical vote-share distribution 8 for the major communities are reported for each election. Overall, Sweden is relatively homogeneous (Lane et al. 1999) at this level of measurement, and the similarity scores between communities are high. 9 The average BC between the main communities varies between 0.971 (in 2002) and 0.980 (in 2018), see Fig. 7 (left). The values are high because, amongst other things, all options are present in every municipality, and the low proportions of blank and invalid votes do not vary greatly across municipalities.
Out of the three older communities, the Rural South has become more similar to both the Urban and the North communities over time, while the two latter have not got closer to each other. As regards the newcomer, the Far South community, it was rather close to all other communities in 2002, which may have made it a logical 'breaking point' in the political space. Since then its similarity to the Rural South has diminished, while that to the Urban and the North communities has grown. The general picture of these processes is that the differences in the vote-share distributions between the communities have not been increasing, but rather decreased somewhat. This may in turn explain the accelerated geographical change: when the general differences between communities decrease, single municipalities can more easily switch community. The almost uniform increase in similarity observed between 2014 and 2018 can somewhat unexpectedly be explained by the rise of the SD party, which occurred in all parts of Sweden, making the voting profiles in general more similar than before. This can also be seen from the distribution of similarities displayed in Fig. 7 (left), in which the distribution for the 2018 election shows a higher degree of similarity. This result is consistent with the increase in similarity length observed in Fig. 2.
Larger sudden changes in the average preferences within the communities-in relation to a party's national average-are few, and concern mostly smaller parties. The most marked changes in the relative support for single parties have occurred in Urban and Far South communities. In the Urban community, the great decline of SD has been compensated by the large relative progress of C and KD. The reasons for the changes in preferences within the Urban community may lie in change in opinion, but also in internal migration to these municipalities or the changes in the geographical boundaries of the community. In the Far South, both S and V have been in steep decline. Finally, the share of invalid or blank votes has clearly decreased in the Urban community, while it has increased in the Rural South.
The communities vary also as regards their internal homogeneity. The differences in this regard are shown in Fig. 6 (right). Between 1985 and 1998, the municipalities within the North and the Rural South communities were more similar to each other than those within the Urban community. In 2002, the North community's internal variation suddenly increased, but has decreased since then. After 2002, both the Rural South and Far South communities have been internally more cohesive than the other two. Changes in the national-level support of parties The third type of change relates to the changes in the national-level support of the parties. Since 1985, there have been some major trends and many fluctuations here, too. S have gone more or less steadily downwards, falling below 40% for the first time in 60 years in 1991, and in 2018 below 30% for the first time for almost 100 years. V's vote share has typically been 5-6%, jumping to 8% in some elections and even to 12% in 1998. The share of MP has likewise oscillated between 4 and 7 percent. On the right side of the political field, M has had its ups and downs around 20% of the vote, reaching 26% in 2006 and 30% in 2010. For L, the oscillations have been stronger: shares of 12-14% in the 1980s, and a lone 13% in 2002, have alternated with the more typical 5-7%. KD, also typically at 5-7%, had two successful elections around the Millennium with 10% of the vote. C went below 10% of the vote in the 1990s, and down to 5% in 1998, but has stabilized around 6-8% since. Finally, SD were minuscule in the 1990s, increased to 3% in 2006, and then rapidly to almost 18% in 2018. The share of the "other" parties has varied greatly, depending on what has been on offer. 10 Taken together, they have typically received 2-4% of the vote, with the exception of 1991, when almost 8% voted for them. The share of abstainers rose from 10% of the voters in 1985 to 20% in 2002, after which there has been a clear decline.
Putting the national figures into the context of vote distributions in communities, we can see that some of the changes in electoral support have had a regional (communityrelated) aspect, others not. S's downward trend has been stronger than the national average in the Urban and Far South communities, and the Far South was very central in SD's first notable election result in 2006. On the other hand, C's sinking results until 1998 were seemingly evenly distributed between communities, as were L, KD and V parties' successes in 1998 and 2002 and those of M in 2006 and 2010. Following the hypothesis, changes in electoral support that have a regional aspect can be interpreted as having been influenced by existing cultural fields.
A comparison with the results from Swedish electoral research shows that the dividing lines proposed by Oscarsson and Holmberg (2008) and the parties involved in their description find support here, although with some specification 11 . The same applies to the stronger-than-average support for SD in southernmost Sweden (Sannerstedt 2017;Oscarsson and Holmberg 2016). However, our analysis goes beyond these observations, identifying a new community with its own profile of voting, something that has not resulted from the changes in other parties' support figures. In terms of the cultural field hypothesis, we could speak of the emergence of a new such field, currently centered around high support for the SD party in Southern Sweden, however, not necessarily limited to either the party or the geographical location.
Fragmentation and convergence In politological literature, the notion of (party system) 'fragmentation' is normally used to depict an increase in the number of political parties (Best 2013). In this study, analysing the political geography of Sweden, the meaning of 'fragmentation' is tied to the number of different voting patterns recognizable in the municipalities. These two processes are not necessarily independent of each other. Similarly, 'convergence' would here not necessarily point at fewer parties, or more similar political ideas across parties, but at a decrease in the number of distinct voting patterns. The Swedish party system has become more fragmented during the research period. The number of parties represented in Riksdagen grew from six in 1985 to eight in 2018 as the Green Party (1988) and the Sweden Democrats (2010) acquired the vote share of 4% required for representation. In addition, the populist, now extinct, New Democracy party had some parliamentary seats 1991-1994. Some evidence for these changes having been reflected in political geography can be found in the fact that the three large, identifiable communities in the 1980s-1990s became four in the 2000s-2010s. They are also reflected in the doubling of the total number of communities detected by the Louvain algorithm from 1985 to 2018 (see Table 6).
The number of municipalities outside the large communities also almost doubled between 2014 and 2018 (see Fig. 6 (left)). It is, however, uncertain whether that really is a sign of further geographical fragmentation or just a continuing transitory phase between the three-and the four-community systems.
In a seeming paradox, the larger communities were, despite the fragmentation, more similar with each other in 2018 than they were in 1985 (see Fig. 7). This happens in association with the emergence and growth of SD, which has contributed to geographical fragmentation by creating discernibly distinct voting profiles for many municipalities where they are prevalent. However, a large new party that collects votes in all municipalities, taking them from other parties, also brings the support figures of the other parties closer to each other, thus pushing the municipalities'-and in continuation the communities'-voting profiles closer to each other. In this manner, party system fragmentation can actually lead to converging voting profiles. The convergence phenomenon is also observed in the analysis of spatial correlations and of the spatial dependence of the BC similarity.

Conclusions
In free and fair elections, voters can freely choose among the parties on offer, give a blank vote, or choose not to vote. The individual nature of voting, along with the variation in preference always present among individuals, divides the votes within an administrative unit among the alternatives in different proportions. However, since voters are in social interactions with each other, votes are not randomly distributed over space and time. Seen from an aggregate-level perspective, many administrative units-often neighbouring ones-are reminiscent of each other in the division of votes among parties. In previous research, numerous examples of regional propensities towards over-or underrepresentation of certain parties can be found (see e.g. Borghesi et al. 2012;Maulana and Situngkir 2015;Oscarsson et al. 2018). This is sometimes referred to as the cultural field hypothesis (Borghesi and Bouchaud 2010;Siegfried 1913;Bussi 1998;Gamache 2005). Cultural fields can be fairly constant despite the changing results of the parties at the national level. At the same time, entire regions can change, however slowly, and some parts of them can change more than others. This paper constitutes an attempt to identify and systematically analyse these processes in Sweden over a 33-year period. Here, we have analysed the spatial behaviour of correlations in electoral behaviour during and Table 6 Number of communities detected by the Louvain algorithm for each election between elections and of the BC similarity, which suggest long-ranged patterns that can be analysed through partitioning Sweden in politico-cultural communities.
Many of the findings of this study, while new as such, are related to the community structure that was found. Thus, their value as new contributions is tied to the robustness of that structure. After an analysis of the evolution of political geography in Sweden over a period of 33 years, we may conclude that the general picture has been stable enough to justify the use of these communities as entities in further analyses. However, the emergence of SD has caused a marked change in the South of Sweden, where a belt of communities with a new common voting profile has sprung up and expanded since 2002. The Rural South community, dominated by C and KD, has been on the wane during the entire study period, losing the majority of its municipalities. In order to estimate the real importance of the new entities for the national politics it is, however, essential to understand their social, and especially demographic, character that will in the last end determine their political weight in the future. As regards single parties, it is also important to take into account their possibilities of 'relocating' their vote-in this regard, the slight gains in the Urban community may in the longer run be more important to C (or KD) than the losses 12 in the Rural South.
In summary, it has been shown here that the Swedish electoral landscape seems to be increasingly fragmenting while transitioning from three to four main politico-cultural communities. There are more large parties and more types of collective voting profiles at the municipal level in 2018 than there were in 1985. Both of these indicate that fragmentation in the Swedish political field, as indicated by its geography, has increased, especially after 2010. The fact that the identified dissimilarities are smaller in 2018 than 1985 indicates, in turn, that the voting patterns in Swedish municipalities as such have tended to converge, due mainly to the relatively ubiquitous nature of the fragmentation process. In this manner, it seems that the fragmentation of the field of alternatives has been accompanied by a simultaneous convergence as regards the contents of the collective voting profiles.

Appendix: Dependence of the partitions on similarity measures
One important methodological question of this paper was the choice of similarity measure in the construction of the functional network. While the BC similarity was chosen here, there are other possibilities. Fernández-Gracia and Lacasa (2018) and Maulana and Situngkir (2015), e.g., have performed a similar analysis using the cosine similarity measure (1). When choosing a similarity measure for this paper, the alternatives were a) the cosine similarity measure, b) the Bhattacharyya coefficient (BC similarity), and c) Jensen-Shannon similarity (JS similarity) (Endres and Schindelin 2003). Theoretically, the BC similarity and JS similarity should yield more reliable results, since they are both designed to compare discrete probability distributions, while the cosine similarity is not. JS similarity is an information-theoretic measure designed to compute the amount of information shared by two probability distributions and the BC similarity is a proxy Michaud et al. Appl Netw Sci (2021)  for estimating the amount of overlap between two probability distributions. The results obtained using them are displayed in Figs. 5 for the BC similarity and 9 for the JS similarity). Figure 10 shows the NMI value between partitions obtained by different similarity measures. We observe that the NMI between the partitions obtained using the BC similarity and the JS similarity are very close to one and thus almost indistinguishable. The BC similarity was chosen mainly due to its lower computational cost.
We also computed the partitions into communities using the cosine similarity (see Fig. 8). The partitions obtained are different from that obtained with the BC similarity or the JS similarity. According to Fig. 10, the NMI value decreases in the beginning of the study period, when the voting profiles of the different communities where more clearly separated. As a result of the convergence in voting profiles, smaller differences are no longer captured by the cosine similarity and the NMI drops to about 0.6. Nevertheless, the main communities detected by the BC and JS similarity measures are recognizable. In particular, the North community and the Urban communities are clearly visible in the maps. However, it seems that the Rural South, detected in the maps from 1985 until 2002 (with the exception of 1998), disappears after that and is replaced by a different community (still colored in blue) corresponding to the Far South community identified by the BC and JS similarity measures. Thus, the cosine similarity measure provides similar results to the other two measures, but it seems to be less sensitive to small differences in voting profiles and, hence, typically detects a smaller number of communities than the other two measures. Nevertheless, the main features discussed in this paper are confirmed by all three similarity measures.