Polarized Ukraine 2014: opinion and territorial split demonstrated with the bounded confidence XY model, parametrized by Twitter data

Multiple countries have recently experienced extreme political polarization, which, in some cases, led to escalation of hate crime, violence and political instability. Besides the much discussed presidential elections in the USA and France, Britain's Brexit vote and Turkish constitutional referendum showed signs of extreme polarization. Among the countries affected, Ukraine faced some of the gravest consequences. In an attempt to understand the mechanisms of these phenomena, we here combine social media analysis with agent-based modelling of opinion dynamics, targeting Ukraine's crisis of 2014. We use Twitter data to quantify changes in the opinion divide and parametrize an extended bounded confidence XY model, which provides a spatio-temporal description of the polarization dynamics. We demonstrate that the level of emotional intensity is a major driving force for polarization that can lead to a spontaneous onset of collective behaviour at a certain degree of homophily and conformity. We find that the critical level of emotional intensity corresponds to a polarization transition, marked by a sudden increase in the degree of involvement and in the opinion bimodality.


I. INTRODUCTION
Ukraine represents a bright example of a nearly evenly split society with two opposing camps, where the East/South gravitates towards Russia while the West/North towards European neighbors [1].The overall political vector in the country sways between political parties and leaders that on the one side seek closer ties to the West and in particular Europe and on the other hand to the East and in particular Russia.The Orange Revolution in 2004 brought pro-western politicians to power, however, in the 2010 elections a pro-eastern politician, Viktor Yanukovich, was elected for president, not least because of major support in the eastern regions of Ukraine (see Fig. 1).In November 2013, after Yanukovich failed to sign a political association and free trade agreement with the European Union, protests in Ukraine erupted.The initially peaceful rallies became violent in January 2014 after the government passed laws to suppress the protests.In February 2014, the violence escalated, which led to the removal of Yanukovich from office by the parliament.Meanwhile a separatist and anti-interim-government movement rose with the support of Russia in eastern and southern parts of Ukraine, and ignited a military conflict.Crimea was annexed by the Russian Federation after a referendum that was denounced internationally as illegitimate and illegal.Later in 2014, the crisis resulted in further territorial separation with over 2.6 million internally displaced persons and refugees and a formation of self-proclaimed states in Donetsk and Luhansk [2].These events escalated the po- larization in the country that has grown over the years.As the two political sides became more extreme in their views in the course of the events a dialogue and therefore a peaceful solution has become increasingly difficult.The extreme opinion divide affected not only society as a whole but also destabilized multiple families and local communities.
Opinion polarization has been intensely studied over the last few decades, initiated by the observation that groups tend to adopt positions that are more extreme than the initial individual positions of its members [4,5].One explanation of this phenomenon is based on the Social Comparison Theory, which suggests that people want to be perceived in a more favorable way than what we perceive to be the average tendency.Through observations they determine what the average tendency is and then they express a slightly more extreme opinion than the perceived average opinion [4,6,7].There is clear evidence for this assumption from numerous experimental studies [4,8,9].Moreover, due to the homophily phenomenon [10], which states that people are more likely to interact with those who are similar to them with respect to socio-economic background [11] as well as attitudes [12], people are more likely to socially compare themselves to similar peers.Group polarization phenomena are also explained drawing on the Persuasive Argument Theory, which states that people are more likely to change their opinion when presented with persuasive arguments.Group polarization can occur when the group discourse is manipulated through biased information or misinformation, exposing a group to false persuasive arguments [4,7,13].The theory is strongly supported by empirical evidence from numerous experimental studies [4,14,15].The two mechanisms, social comparison and persuasive argument usually co-occur.For instance, persuasive arguments in an environment of biased information can further push an individual to adopt a more extreme attitude than expressed in the group they compare themselves to.Another mechanism with respect to polarization dynamics is the Biased Assimilation [16] in opinion formation processes, which maintains that people are likely to keep their original position and draw support for it if confronted with mixed or inconclusive arguments.This mechanism, which again is empirically well established [17][18][19], shows that people are only to a limited extent open to change their opinions and this can contribute to polarization dynamics.In fact, Dandekar et al. [12] show that the two earlier described mechanisms and in particular the social comparison mechanism, is not sufficient to produce polarization, the biased assimilation mechanism has to be added.
Polarization processes have been empirically investigated through experimental studies as mentioned previously and to a lesser extent through survey based studies [20,21].Furthermore, applied statistical physics and agent-based modeling approaches [12,[22][23][24] have been used extensively to study polarization mechanisms through computer simulations.Prominent are for instance bounded confidence models of opinion dynamics, stochastic models for the evolution of continuous-valued opinions within a finite group of individuals that explore conditions for consensus and opinion fragmentation, introduced by Deffuant et al. [25] and further elaborated by numerous studies [26][27][28].We will draw inspiration from these models as well.The challenges of using statistical physics models for modeling social phenomena are known.The tractable models are usually oversimplified and too general and thus lack flexibility required to reflect the features of a particular social phenomena.Moreover, while computational studies are rigorous in investigating the specific mechanisms and dynamics of polarization they often lack empirical foundation and thus it remains often unclear to what extent these often abstract models accurately represent phenomena we see in real world.More recently, social media (e.g.Twitter and Facebook) data have been increasingly used to study opinion polarization [29,30].Gruzd and Tsyganova [31], for instance, use Ukrainian Vkontakte data to demonstrate the split between the two political camps in Ukraine (pro-East vs. pro-West) during the Maidan protests.Twitter has also played a quite important role as a contested public debate arena throughout the crisis in Ukraine [4,5].Studies with social media data have revealed the strong effect of homophily in online social networks, which may lead to phenomena like the echo chamber [34,35], where opinions are amplified through communication and repetition inside an "enclosed" social system.Echo chambers can prevent people from noticing contrary persuasive arguments and they skew the perceived average that people take into consideration in social comparison processes.Though social media data is potentially rich, i.e. finegrained, time-resolved, relational, geo-coded, etc., without an explicit theoretical underpinning, the studies of polarization on social media remain usually rather descriptive.There is often no understanding of the mechanisms that determine the processes of polarization.
In this paper, we present a novel approach, in which we combine rich social media data with the power of methods of statistical physics, to study political opinion polarization mechanisms.Though the integration of the two approaches has been increasingly discussed [36,37], there are only few studies so far that have actually attempted to combine these [38][39][40][41][42]. None of them, however, studies polarization and integrates the unstructured data analysis comprehensively with the computational model.In the past studies there has been a methodological gap between the social media analysis and agent-based modeling, which has limited the relation between the two to rather qualitative statements.We are presenting an approach here that elaborately links the two approaches.Combining them has the advantage to parameterize the computational model and validate it by empirical evidence and on the other hand to make use of the rich social media data in a theory-guided way beyond mere descriptives.This holds the potential to gain new insights into the underlying social mechanisms of polarization.In the following, we will describe a new computational model of polarization, a 2D lattice agent-based model, that is informed by the theoretical work on polarization discussed above and that brings in the spatial dimension and emphasizes the role of regional differences.We then look at the empirical polarization dynamics in the Ukrainian Twittersphere, before parameterizing the model with the analyzed Twitter data, hereby validating the model.The combination of the two approaches reveals the important role that emotional intensity levels play in polarization thus far not sufficiently accounted for by classical theoretical or empirical studies of polarization.

A. Political opinion mining of Twitter data
We used the archived Twitter API Streaming data from October 2013 to September 2014 provided by the Archive Team [43].The archived data is the freely available Twitter Streaming API Spritzer Sample, which collects 1% of all public tweets in real-time.The data for January 2014 was missing and we did not find any other archive providing this data.The tweet data is stored in JSON format.The data was processed and analyzed in Python.Specifically, the data was filtered for Russian/Ukrainian language (excluding Twitter users who specified being from Russia), cleared of SPAM, and then filtered for political content with an extensive set of keywords (see the electronic supplementary material for details).We used the tweets to determine the political affiliation of each Twitter user using a set of keywords indicating neutral, pro-or anti-West attitudes and a set of keywords indicating neutral, pro-or anti-Russian attitudes (see the electronic supplementary material for details).Moreover, we conducted a sentiment analysis of the tweets, in order to determine the political affiliation for previously seemingly neutral Twitter users.For this purpose we utilized the SentiStrength system for automatic sentiment analysis, built an Ukrainian sentiment words dictionary and extended the SentiStrength Russian sentiment words dictionary to make it equivalent to the Ukrainian sentiment words dictionary (see the electronic supplementary material for details).Our classification algorithm scanned all tweets for each user and checked whether the tweet contained any of the keywords and any of the sentiment words specified and calculated overall scores for political "West" and "East" affiliation as well as sentiment scores (see the electronic supplementary material for details).For the geo-plots in Fig. 2E,F, we focused on the data of the last week in September 2014.We scanned the Twitter data of each user for two possible geographical information, the value of their "location" tag and/or geo/place "coordinates" tag which is a latitude and a longitude coordinate value.The vast majority of users have the default option "geo enabled:false", thus do not provide precise geographical information attached to the tweet, a few more provide profile "location" information, but overall, geographical data is often not specified and thus missing.We therefore ended up with only 493 Twitter users for whom we had a geographical information.The "West" and "East" political affiliation scores of these 493 Twitter users were plotted in Fig. 2E,F (see the electronic supplementary material for details).

B. Bounded Confidence XY Model of Opinion Polarization
We model opinion dynamics in an assembly of interactive agents placed on a two-dimensional lattice of fi-nite size, which emulates a regional opinion distribution and localization.Each opinion is represented by a vector that can freely rotate in plane, similar to that in the XY model of a magnet, and is characterized by the length p (emotional intensity, i.e. fervent strength of an opinion) and polar angle θ (orientation).This allows us to model a continuous opinion spectrum with respect to the specified direction by a cosine of the angle between the vectors, which can vary in the range between -1 (agent opposes the opinion) and 1 (agent fully supports the opinion).Each agent can interact with a fixed number of nearest neighbors.The social interactions are introduced via local mean field, similar to the Vicsek model [44]: the new orientation of each vector is calculated as a mean of the average direction of the neighbors and agent's own orientation: (1) where N is the number of interacting agents, ξ is the angular noise variable uniformly distributed in the interval [−η/2, η/2] and η is the noise strength.The noise is added to model the level of conformity of the individual: zero noise, η = 0 corresponds to full conformity, η = 2π allows an individual to deviate from the group opinion by an unlimited value.A contribution of each interacting agent is weighted by the emotional intensity of its opinion p.The interaction has a limited range r, which sets the number of nearest neighbors considered.In 2D, interaction range r = 2 corresponds to 24 interaction peers, r = 3 gives 48 peers, etc (see the electronic supplementary material for details).In addition to this, the interaction is selective so that the vectors align only with those neighbors, whose orientation (opinion) deviates by an angle less than some fixed value α from their own opinion vector.This rule is inspired by the bounded confidence model, or Deffuant model [25], and allows one to imitate systems with different levels of opinion tolerance [45].Scaled value α/π denotes a fraction of the opinion spectrum that is taken into account by each individual, e.g.α/π = 0.1 corresponds to 10% closest opinions taken into account.
We model a finite system with the boundary conditions set by two fixed rows of agents on each side.The boundary vectors are fixed according to the following scheme: the left and upper rows are oriented to the left (θ = π), imitating a bias towards "West" and the right and bottom rows are fixed to point in the opposite direction (θ = 0), thus mimicking a bias towards "East".When other agents interact with the boundary vectors this introduces a spatially dependent local bias that can account for geographical inhomogeneity in opinions, thus imitating cultural or ethnic differences, information bias, etc. (see the electronic supplementary material for details).
These model settings reflect the theoretical assumptions about polarization described above.The orien-tation represents political attitudes and the local mean field calculation of new orientations for each agent represents the social comparison theory assumptions.The homophily effect is included through the bounded confidence feature, where agents align only with those neighbors, whose political orientation is similar to their own.Furthermore, the biased assimilation mechanism is reflected in the noise variable that determines the agents' willingness to change opinion (conformity level).Finally, the persuasive argument theory assumption, in particular with respect to the contribution of biased information to polarization, is simulated via the boundary conditions.We have added a further parameter to our model, the emotional intensity, i.e. vector length, that represents the level of emotional strength and vehemence of a political opinion.This parameter reflects results we have obtained from Twitter data sentiment analysis discussed in the next sections.It also builds on recent computational models and big data analysis of opinion dynamics [46,47], which showcase the importance of emotions, and in particular of negative emotions, for people's engagement in political debates and for opinion formations and changes.
We modeled evolution of the opinion spectrum in the described system starting from randomized initial distributions of agents' emotional intensity and orientations based on general uniform distributions.The emotional intensity levels for each agent were kept fixed in each simulation while the orientations evolved due to noise and interactions.For each opinion spectrum extracted from Twitter data, we performed a simulation until a steady state was reached.After that, the following statistics were collected: steady state distribution of the opinion along the "East-West" scale, as defined by the boundary conditions, mean order parameter, and bimodality index.

C. Model parameterization with Twitter data
To parameterize the Bounded confidence XY model we used weekly distributions of the overall users' emotional intensity scores.For each week, the overall emotional intensity of each user was defined from the mean of the average sentiment scores on a continuous scale from 0 to 5, with 0 corresponding to a neutral average user's opinion and 5 reflecting an extremely emotional average opinion.This measure did not contain any information about political affiliation, so that each non-zero value could correspond to either pro-West or pro-East user's political attitude.This data was sampled with a bin size of 1 for all non-zero opinions and a resulting discrete distribution was normalized by the total number of users per week giving probabilities for each discrete value of overall emotional intensity (0 to 5).This distribution was then applied to the simulated system to define the length p of each opinion vector.In each simulation, values of p were assigned to agents at random, according to obtained discrete weekly distributions of overall emo-tional intensity, and kept constant throughout the simulation.The simulated system consisted of 14641 agents placed in nodes of 120 × 120 lattice.We performed at least 10 6 update cycles to determine the structure of the steady state.Each statistics was averaged over at least 5 independent runs.We computed the bimodality coefficient as β = (γ 2 + 1)/k, where γ is the skewness and k is the kurtosis of weekly distributions of average opinion scores in Twitter data or weekly distributions of cosines of orientations θ of opinion vectors in simulations.

A. Opinion Polarization in the Ukrainian
Twittersphere To validate the model assumptions, we used Twitter Streaming data from October 2013 to September 2014 provided by the Archive Team.We use Twitter data because it provides fine-grained, time-series and rich data on recent political opinion dynamics in Ukraine, otherwise not available.To determine the political affiliation of the Twitter users in our data, we used a political affiliation classification procedure based on keyword and sentiment analysis suggested and tested by Spaiser et al. [48] (see the electronic supplementary material for details).As a result, every Twitter user was assigned two scores, a "West" score and a "East" score, representing their political position in a pro-against-European (West)/proagainst-Russian (East) opinion space (see Fig. 2C,D) and an emotional intensity score, combining their sentiment analysis scores.
Our Twitter analyzes show that political polarization did indeed take place in the Ukrainian Twittersphere between October 2013 and September 2014.Fig. 2A shows a discontinuous increase in emotional users in February 2014, while the total number of users and the number of neutral ones increased steadily.Fig. 2B depicts a ratio of emotional/neutral opinions, where a jump from values of about 1.0 to about 1.4 is visible around February as well.We added to this figure the key political incidents in Ukraine during this year, so the discontinuous changes in the data can be related to actual political events.This shows that the biggest discontinuous change in February took place around the time when the Maidan protests escalated and 100 people died on a single day.These results inspired the inclusion of emotional intensity levels as a parameter in the computational model.Fig. 2C moreover shows the polarization in a continuous two-dimensional space defined by pro-against-European (West)/pro-against-Russian (East) scores.This figure shows that the polarization resulted in appearance of two main opinion clusters, those who are pro-East and against-the-West on the one side and those who are against East but who are also quite critical of the West on the other side (see the electronic supplementary material for details).This in fact reflects most current surveys that show the disappointment of many Western oriented Ukrainians with the pro-West Poroshenko government [49].
Our Twitter data analysis confirms that political affiliation follows the expected geographical pattern.People who are pro-East and against-West are more likely to be located in the Eastern and Southern parts of Ukraine, while Ukrainians with rather an against-East and (critical) pro-West attitude are to be found in the Western and Northern territories (see Fig. 2E,F).This analysis is a validation of our classification procedure, since the geographical distribution of the Twitter users with their respective political affiliation scores matches the actual geographical political camp distributions in Ukraine (see Fig. 1).

B. Validating the Bounded Confidence XY Model of Opinion Polarization with Twitter data
To quantify the opinion divide, we present here the bimodality index for the opinion spectrum (see Materials and Methods for the definition), as we found it to be most sensitive to the changes of the spectrum, therefore, the best integral characteristic of the observed behavior.The changes in the bimodality coefficient over 12 months from October 2013 are shown in Fig. 3A,B.In the Twit-ter data the bimodality keeps as low as 0.2 to 0.26 from the start of observation until week 18 (February 2014) but then demonstrates sudden increase to 0.35 to 0.40 within the next two or three weeks, after which it stays high, and the original value is never restored.This sudden increase of the bimodality reflects a formation of two distinct political camps and clearly shows that the opinion divide has suffered a significant deepening in this short period.Moreover, we see that the deepening was nonrecoverable in the short term.The computational model, parameterized with the Twitter emotional intensity spectrum for each respective week, captures this behavior well and shows a similar qualitative trend.In a simulation with α = 0.15π, the bimodality coefficient jumps from ca. 0.60 -0.65 to 0.8 -0.85 during the same period.The quantitative difference in the values is mostly due to the use of cosine function.We should note that, although the model is parameterized by the Twitter data, it is not bound to reproduce the distribution, as the vectors are allowed to change the orientation, and this behavior follows only from the specific anisotropic interactions between the agents.We repeated the simulations with a different interaction parameter α = 1.0, corresponding to agents without any resistance to opinion change and found no jump in the bimodality.Therefore, the opinion divide is conditioned by both the restriction of confidence and by conformity (noise) levels, thus confirming the ho- mophily and biased assimilation assumptions.Moreover, the drastic change in bimodality corresponds to the sudden increase of the emotional intensity, which we noted in the data in Fig. 2B.

C. Onset of Opinion Clustering and Formation of Territorial Domains
The increase in emotional intensity leads to important consequences in the spatial dimension.Fig. 3E shows the maximum opinion cluster size observed in simulations.While clusters rarely exceed 100 agents before the critical weeks 17-18, starting from week 19 we observe clusters of up to 5000 agents and the numbers rarely drop below 1000.That the behavior becomes expressly collective is consistent with the rise of emotional intensity and of the fraction of involved agents (those with non-zero valence), which increases the number of interactions within each individual's circle and thus the local aligning field.This is further confirmed by Fig. 3F,G showing the polar opinion histogram for the two critical time points, week 18 and 19 obtained from simulation analyzes.The distributions are visibly gravitating towards 0 or 180 degrees ("East" and "West") in both sets.The fraction of neutral opinions drops from week 18 to week 19 and the distribution of opinions in each subgroup becomes very narrow.
Simulation analysis moreover shows that the opinion divide induces also territorial splitting.Subfigures Fig. 3C,D show the in-plane opinion distribution.We plotted the opinions as predicted by the model just before the jump in the bimodality (week 18 -C) and immediately after that (week 19 -D).The change in the distribution between these points is dramatic: while the predicted data for week 18 show a merely uniform distribution of both "East" and "West" orientations, the picture for week 19 features two distinct clusters with predominant "West" orientation in the lower left corner and domination of the "East" orientation in the top right corner.These orientations correspond to vector directions in the preset boundary conditions.Each domain contains practically no opposing opinion, as they are squeezed out to the periphery and then to the opposing domain as the steady state develops.We can see small islands of mixed/neutral opinion in the middle of the simulation domain.The prediction of the territorial divide matches also well the geo-location data shown in Fig. 2E,F.We should stress however that the biased boundary conditions alone are not sufficient to produce any large domains even in the system with limited confidence (see Fig. 3C, see the electronic supplementary material for details), although they definitely facilitate this collective behavior.
The simulation allows us to analyze the steady states of the system and provides insights into the mechanisms of sudden onset of polarization, clustering, and territorial splitting (see the electronic supplementary material for details).We in particular examined varying levels of noise, restriction angles and vector lengths.High noise (low conformity) corresponds to a globally disordered behavior (without any prominent consensus or polarization) and the range of higher α allows only states with polar order (global consensus).Lower noise levels, α < 0.4π, on the other hand produce regions of prevalence of the bipolar states, thus structure the system in a polar or bipolar way.Polarized states are generally only possible at low noise (high conformity) and small restriction angles (strongly bounded confidence).The changing level of emotional intensity pushes the boundary between the polarized and non-polarized societies moreover outwards, thus extending the range of the polarized states, and brings the originally weakly polarized society to a highly polarized one.This splitting resembles in appearance a phase separation in dissimilar liquids (e.g. oil in water).
The important difference of our system from the liquid state systems is that the agents are not dissimilar from the beginning but the dissimilarity and effective repulsion between the opposite arises from strong social interactions that dictate cohesion between the like opinions.
Another important observation here is that the transition is driven primarily by the increase of emotional level while the other parameters (conformity, confidence) stay constant.We should stress that the source of and the original direction of the emotional agents were not crucial.The key properties of the model that determine the nature of the steady states (non-polar, polar or bipolar) are the high conformity and strongly bounded confidence.

IV. CONCLUSION
We have analyzed the opinion dynamics over a recent period of political unrest in Ukraine.Based on the Twitter data, we registered an onset of emotional intensity of tweets that corresponded to rising levels of involvement of the population in the political feud, fueled by the action of the government, collisions of the opposing groups, and foreign military activities.The escalating opinion divide around the time became apparent among others in the jump of the opinion bimodality index.We proposed an agent-based lattice model to study political polarization as a collective behavior including the spatial dimension of polarization.By parameterizing the model with Twitter data at distinct time points, we predicted the onset of collective behavior and territorial splitting of the opinion.We demonstrated that the tendency of territorial splitting is conditioned by the high conformity and homophily in the society and is driven by the growth in emotional intensity.Our analyzes demonstrate clearly the importance of emotional intensity for polarization, a factor that has been largely ignored thus far in classic theoretical and empirical literature on polarization.
Our analysis seem also to suggest a link between polarization and separatist trends.The polarization dynamics that we establish for February 2014 in the data and simulation increases in fact further around April and May 2014, when the self-declared Donetsk and Luhansk People's Republics were formed in the South-East of Ukraine.This seems to suggest that the opinion split may facilitate the separatist trends on its own.The observed phenomenon is not unique to Ukraine, and similar processes of deepening polarization leading to separatism are well known elsewhere (e.g.Northern Ireland).In most cases, however, the separatism is related to more obvious ethnic, racial, or religious differences between the communities, while in Ukraine the division is more subtle and roots in small cultural differences, which were artificially enhanced by external factors.And our results show how dangerous targeted agitation can be when it is backed by modern information warfare techniques [50,51] as it boils emotions making polarized world views increasingly irreconcilable.where ı is the imaginary unit and θ j is the direction of each vector j.This order parameter turns zero in the isotropic phase, when opinions of all agents are very different from each other, and assumes finite positive values in the ordered phase, reaching unity when global consensus settles in.
To characterise opinion polarization in our model we use the following bipolar order parameter When the two vectors are oriented perfectly collinearly, Q = 1.Note that a perfectly polarly ordered phase is characterized by ϕ = Q = 1, as the polar ordering implies the bipolar ordering.A bipolarly ordered phase requires only Q = 1 while the polar order parameter can take any value ϕ < 1.Therefore, requirements for the polar order are more restrictive.
For each weekly distribution of opinions, both for the Twitter data and in simulations, we computed bimodality Skewness is defined as the third standardised moment around the mean where µ 2 and µ 3 are the second and the third cumulants, respectively.Kurtosis is computed as the fourth central moment where µ 2 and µ 4 are the second and the fourth cumulants, respectively.The model phase diagrams, shown in Supplementary Figs.S2 A-D, demonstrate three different steady states of the system.The high noise (low conformity) generally corresponds to a globally disordered behavior (without any prominent consensus or polarization).The region of disordered behavior shrinks as the restriction angle α is increased (Supplementary Fig. S2 A).The lesser restriction leads to more interactions between the nearest neighbours and to the onset of order (consensus).At lower noise, below the transition line we observe either polar or bipolar structuring of the system (Supplementary Fig. S2 B).The range of higher α allows only states with global consensus, while at α < 0.4π we see the region of prevalence of the bipolar polarized states.In other words, the polarized states are only possible at low noise (high conformity) and small restriction angles (strongly bounded confidence).The change in level of emotional intensity pushes the boundary between the polarized and non-polarized societies outwards (Supplementary Fig. S2 B), thus extending the range of the polarized states, and brings the originally weakly polarized society to a highly polarized one.The most important observation here is that the transition happens just due to the increase of emotional intensity while the other parameters (conformity, confidence) stay constant.Supplementary Figures S2 C,D show phase diagrams for unparameterized systems at different simulation parameters.For a larger system, s = 240 constituting of 58081 agents, the area of bipolar ordering is slightly reduced as compared to the standard system size (s = 120) used in this study.The shrinking happens because the influence of biased boundary vectors is decreased due to larger system size.If the agents have larger interaction range, r = 3 (i.e. each vectors interacts with up to 48 nearest neighbors), the region of bipolar ordering expands to larger restriction angles and noise values because longer correlation range becomes possible and effect of the boundary bias is more pronounced at these conditions.Finally, if all boundary vectors are fixed in one direction (in this case to the East, θ = 0), the area of bipolar polarization shrinks significantly but does not disappear.At these conditions bipolar ordering also displays more sensitivity with respect to noise than to restriction angle.
Any analysis of Twitter data faces a number of well-known difficulties [S3].Some of them, e.g. the SPAM tweet problems, we have addressed already above.One potential problem is that the sample only includes public tweets from public Twitter accounts.This does not pose a problem in the context of our study though, since we are interested in the use of Twitter as an instrument of communication in the public sphere.Moreover, Twitter data is not representative, which again is rather unproblematic for our study because all political groups and their supporters are represented on Twittersphere, so the public debate on Twitter does overall mirror the general public debate and public opinions [S4, S5].Another potential issue is that the sample is based solely on the 1% of all public tweets, which for instance makes it difficult to use the data as panel data (though we've done this to probe opinion changes within individuals, see Supplementary Fig. S3, the number of observations is however drastically reduced).However, other Twitter data samples offered by Twitter (e.g.Gardenhose with 10% of all pubic tweets) have to be purchased, which makes them often unaffordable for research purposes.
One aspect of Twitter data "richness" is that it is supposedly geo-referenced.However, as already mentioned in the main manuscript quite a large proportion of Twitter users do in fact not provide any geographical information.Frequently, even if "geo enabled" was activated by the Twitter user (thus the value was set to "true"), the actual "geo" or "place" "coordinates" value would be "null" because the device that was used to post the tweet had no geo-referencing (e.g.GPS) activated.The data that the user provides through the profile "location" tag is more often available, however, here we have to rely on the accuracy and honesty of the Twitter users.Moreover, if the information provided through "location" was imprecise, e.g.just "Ukraine", we could not use this information for plotting.Did we however have serious and specific information from the user, e.g."Kiev", then we used that information to generate a longitude and a latitude coordinate value that we could then plot on a generated Ukraine map in Fig. 2E,F in the main manuscript.We deliberately ignored another potential geographical information, the "time zone", because it offers only imprecise geographical information.Overall, we could extract form the Twitter data of the last September week 2014 493 Twitter users for whom we had sufficiently precise geographical data.This data along with the calculated West and East scores were used to produce the Figures Fig. 2E,F in the main manuscript.
We used the sentiment analysis SentiStrength (http://sentistrength.wlv.ac.uk) approach to determine a sentiment score for each tweet.SentiStrength is a free Java-based automatic sentiment analysis tool, widely used in research, which is also available for the Russian language.We created a comprehensive dictionary for Ukrainian sentiment words (to be shared upon request) based on the SentiStrength sentiment scoring system and we reviewed the sentiment word dictionary that SentiStrength is using for the Russian language and complemented it with other sentiment words (among others offensive words that were missing in SentiStrength) to make it equivalent to the Ukrainian dictionary.The sentiment scores in SentiStrength and thus in our two sentiment words dictionaries range from -5 to +5 with 0 signifying a neutral word, negative values a negative sentiment and positive values a positive sentiment.The higher the absolute value the stronger the sentiment.For each tweet we calculated a sentiment score average based on the identified sentiment words in the tweet.We calculated a separate sentiment score for the East political camp related keywords and one for the West political camp related keywords.The emotional intensity score is averaging these two sentiment scores.
In the case of unequivocal keyword tweets, the tweet score would derive from these keywords.For instance, if a keyword contained the words "Putler" (scored -3) and the hashtag "stoprussianaggression" (scored -3), the tweet score would be the average of these two scores, thus -3.Whenever a tweet was scored zero because of neutral keywords, we added to the score the respective sentiment score.Thus if an East political camp related tweet had a zero score (e.g."Putin"), and the East political camp related sentiment score was -2 (for instance resulting from the sentiment word "zachvatil" (translated: grabbed)), then the tweet would get an East political affiliation score of -2.This is based on the assumption that users would express positive sentiments about terms associated with their own camp and/or negative sentiments towards terms associated with the other camp.Since most users would have posted several tweets, users were assigned a set of tweet scores, depending on the number of tweets and from these scores overall average scores, one East score, one West score, were calculated for each user, representing their political affiliation Automatic classification and sentiment analysis have certainly their limitations, e.g.automatic sentiment analysis often fail to spot irony and classifications do not account for instance for complex inner-fraction dynamics, that is political fractions within political fractions.However, manual classification is becoming increasingly impossible with the growing amount of data and/or limited capacities and resources and thus automatic classification is increasingly applied.It is however important to work on further developing and elaborating these tools and to supervise, critically reflect and where required correct the process of automatic analysis and its outcomes.

Supplementary Note. Additional Results
We present here some additional results that support our main conclusions in the manuscript.Supplementary Figure S5 shows the skewness and kurtosis of opinions in the Twitter data and computer simulation.These plots show again the discontinuity of political opinions in the Ukrainian Twittersphere, with jumps in February 2014.Supplementary Figure S6 provides moreover additional clustering results, complementing Fig. 3E in the main manuscript.

Figure 2 :
Figure 2: (A) Time series plot of number of tweets, in total, neutral and emotional.(B) Time series plot of emotional/neutral tweets ratio with key political events tags.(C) Pro-against-European (West)/pro-against-Russian (East) opinion space plot for the first week of October 2013.(D) Pro-against-European (West)/pro-against-Russian (East) opinion space plot for the second week of August 2014.The points in plots C and D are Twitter users based on their two scores, the orange dot is the average.(E) Twitter users (dots) colored according to their "East" affiliation score and plotted over the Ukraine map using Twitter geo, place or location information.(F) Twitter users (dots) colored according to their "West" affiliation score and plotted over the Ukraine map using Twitter geo, place or location information.No data was available for January 2014 (see Materials and Methods and Supplementary Note 2) therefore the data gaps in plots A and B between the weeks 13 and 17.

Figure 3 :
Figure 3: (A)Time series plot of coefficient of bimodality of Twitter users' opinion distribution.(B) Time series plot of coefficient of bimodality of vector orientations in simulations.(C) Simulation snapshot for week 18, February 2014.(D) Simulation snapshot for week 19, February 2014.Each square in plots C and D represents an individual agent; size of a square is proportional to emotional intensity; color of each square denotes cosine of an orientation angle for each spin, with -1 and 1 corresponding to orientation towards "West" and "East", respectively.(E) Time series plot of maximal cluster size in simulations.(F) Simulation cluster orientation diagram for week 18, February 2014.(G) Simulation cluster orientation diagram for week 19, February 2014.Orientation of clusters in plots F and G is shown in degrees; 180 and 0 degrees denote orientation towards "West" and "East", respectively; length of each bin reflects cluster probability.Simulation parameters in plots B-G are α = 0.15, η = 0.12, except where legend states otherwise.

Figure S2 :
Figure S2: Phase behavior of the Bounded Confidence XY model.(A) Phase diagrams based on polar ϕ and bipolar Q order parameters for the model system without and with parameterization by Twitter data.(B) Combined phase diagrams for the model system without and with parameterization by Twitter data showing regions of dominance of polar and bipolar order.(C) Phase diagrams based on polar ϕ and bipolar Q order parameters for non-parameterized model system at different simulation parameters (see legend).(D) Combined phase diagrams showing regions of dominance of polar and bipolar order for unparameterized model system at different simulation parameters (see legend).The red plus marker denotes simulation parameters α and η for the parameterized version of the model used throughout the paper.In plots C and D, s denotes size of a side of a square lattice; E stands for East and means that all boundary spins are fixed to the right (θ = 0), W − E stands for West -East and means that the boundary spins on the left and on top are fixed to the left (θ = π) and the boundary spins on the right and on the bottom are fixed to the right (θ = 0); r denotes the interaction range.

Figure S3 :
Figure S3: (A) Panel Twitter users (black dots) in the pro-against-European (West)/pro-against-Russian (East) opinion space, data from first week in October 2013.(B) Panel Twitter users (black dots) in the pro-against-European (West)/pro-against-Russian (East) opinion space, data from first week in September 2014.

Figure S4 :
Figure S4: (A) Average weekly number of tweets per user.(B) Time series plot of number of opinions, in total, pro-West and pro-East.

Figure S5 :
Figure S5: (A) Time series plot of absolute skewness for opinion distributions in Twitter data.(B) Time series plot of absolute skewness for opinion distributions in simulations.(C) Kurtosis of the distribution of opinions in Twitter data.(D) Kurtosis of the distribution of opinions in simulations.Simulation parameters in plots B and D are α = 0.15 and η = 0.12.

Figure S6 :
Figure S6: Cluster statistics for the Bounded Confidence XY model at α = 0.15 and η = 0.12.(A) Average number of domains.(B) Log-log plot of distribution of domain sizes.