Emotions in politics

Emotions are everywhere. Especially in politics.
Recently, The Oxford Dictionaries announced that its Word of the Year 2016 is post-truth.

‘relating to or denoting circumstances in which objective facts are less influential
in shaping public opinion than appeals to emotion and personal belief’


- 'Post-truth' according to The Oxford Dictionaries

The frequent use of a word such as 'post-truth' indicates that people seem to think that politics are increasingly prefering emotions to fact. Pathos to logos. But is this true? We investigated how emotions are showing in the Danish parliament and on Danish politicians' Twitter feeds. The Danish parliament dataset was extracted using web scraping from transcipted parliament meetings and the twitter dataset was generated using the twitter API and contains tweets from 149 Danish politicians.

Emotions over time

Let's get an overview of the emotional spectrum by looking at the weekly average of emotions on Danish politicians' Twitter and in the parliament:

The graphs seem to be quite well correlated. It should be noted that the method of calculating the sentiments was to add up positive and negative sentiment values of each word in a text. Averaging the blocks of text makes it more likely for longer text blocks to have extreme values (positive or negative), which is probably why the sentiment of the parliament is generally higher than on twitter.

How are politicians sentiment in the parliament compared to their twitter sentiment?

We sometimes experience that people behave different in real life compared to their online behaviour. Examining the sentiment of tweets from danish politicians and comparing it to the sentiment of when they are talking in the parliament meetings shows the average and standard deviation of each politicians sentiment both on twitter and in the meetings. A high average sentiment and low standard deviation sentiment implies a high sentiment in general while a high standard deviation implies a high level of expressivenes.

Average Sentiment

Standard Deviation Sentiment

The chart suggests that Henrik Sass Larsen has a very high sentiment on Twitter while having a more average sentiment in the parliament. Furthermore Pernille Rosenkrantz has the highest standard deviation on twitter, this implies that she is very expressive in both negative and positive tweets.


How are emotions showing on Danish politicians' Twitter feeds?

The sentiment averages of politicians own tweets (retweets not counted) was used as a basis for creating lists of top most positive tweets and top most negative tweets.
Top 3 positive tweets:

  • I dag er det DFs fødselsdag hurra hurra hurra Vi sikkert mange gaver får Som vi har ønsket os i år For 21 år er vel en gave værd #dkpol

    Morten Marinus
    • Morten Marinus
    • DF
    1.
  • "Messerschmidt har aldrig sat sig ind i, hvordan EU fungerer..." (citat Anna Rosbach i Berlingske). Ha-ha-ha-ha-ha-ha-ha-ha-ha-ha..! #dkpol

    Søren Espersen
    • Søren Espersen
    • DF
    • 2.
  • Hej @FradragNu - Det er mig der takker for super god inspiration til iværksætterpolitik hos @Spolitik - held og lykke med fradrag.nu #dkpol

    Thomas Jensen
    • Thomas Jensen
    • Socialdemokraterne
    • 3.
See all

DF seems to be the happiest party on Twitter, but...

Søren Espersen's tweet that is ranked as the second happiest in our records is a great example of a quirk when calculating sentiments using a list of labelled words.
When reading the tweet as a human, it is obvious that the tweet is sarcastic and not very positive. However, being limited to look at each word, our algorithm count the long string of Ha-ha-ha... as very positive.
Now, let's have a look at the top 3 negative tweets:

  • Fuck fuck fuck Andrew er ikke videre. Øv!!! En voksen mand m rock under vesten - og så kunne han synge. Fuck! #xfactordr

    Pia Olsen Dyhr
    • Pia Olsen Dyhr
    • SF
    1.
  • WTF? @sorenpind kobler skærpet straf for voldtægt og skærpet straf for falsk anklage #usagligt #sexisme #dkpol https://t.co/eNbeEtoH5x

    Pernille Skipper
    • Pernille Skipper
    • Enhedslisten
    • 2.
  • @ElisabethMJ @Kvindemuseet @finanslov øv, øv, øv, øv og sgu altså. Helt forkert. @rasmusnordqvist har du set det her?

    Uffe Elbæk
    • Uffe Elbæk
    • Alternativet
    • 3.
See all

The most negative tweets ranges from angry, to sad, to ... X-Factor.
One interesting observation is the distribution of positive/negative politicians based on their party. The top positive tweets mostly include right-wing politicians, while the top negative tweets only include left-wing politicians.

  • I dag er det DFs fødselsdag hurra hurra hurra Vi sikkert mange gaver får Som vi har ønsket os i år For 21 år er vel en gave værd #dkpol

    Morten Marinus
    • Morten Marinus
    • DF
  • "Messerschmidt har aldrig sat sig ind i, hvordan EU fungerer..." (citat Anna Rosbach i Berlingske). Ha-ha-ha-ha-ha-ha-ha-ha-ha-ha..! #dkpol

    Søren Espersen
    • Søren Espersen
    • DF
  • Hej @FradragNu - Det er mig der takker for super god inspiration til iværksætterpolitik hos @Spolitik - held og lykke med fradrag.nu #dkpol

    Thomas Jensen
    • Thomas Jensen
    • Socialdemokraterne
  • @KlausKblog Fantastisk! Super godt gået!! Jeg bliver glad i låget over folk som os.. haha :-)

    Laura Lindahl
    • Laura Lindahl
    • LA
  • Jeg var enig med HTS i denne del: "Danmark længe leve! Hurra, hurra, hurra!" #ftlive #dkpol

    Merete Riisager
    • Merete Riisager
    • LA
  • Fuck fuck fuck Andrew er ikke videre. Øv!!! En voksen mand m rock under vesten - og så kunne han synge. Fuck! #xfactordr

    Pia Olsen Dyhr
    • Pia Olsen Dyhr
    • SF
  • WTF? @sorenpind kobler skærpet straf for voldtægt og skærpet straf for falsk anklage #usagligt #sexisme #dkpol https://t.co/eNbeEtoH5x

    Pernille Skipper
    • Pernille Skipper
    • Enhedslisten
  • @ElisabethMJ @Kvindemuseet @finanslov øv, øv, øv, øv og sgu altså. Helt forkert. @rasmusnordqvist har du set det her?

    Uffe Elbæk
    • Uffe Elbæk
    • Alternativet
  • Frygtelige nyheder fra Paris- igen. Al den vold, terror og drab på uskyldige mennesker. Tragisk.

    Jonas Dahl
    • Jonas Dahl
    • SF
  • Voldtægt er aldrig din skyld. Offer skal ikke efterlades med skam og angst for ikke at blive taget alvorligt #dkpol https://t.co/9OgTSdqe08

    Trine Schøning Torp
    • Trine Schøning Torp
    • SF

How about the use of #hashtags on Twitter?

The use of hashtags is an effective way to create, emphasize, or send a message.
How do the use of hashtags differ across the political spectrum? Let's have a look at some stats.

The most #hashtagging politicians and party

Most frequently used hashtags by Danish politicians

Most hashtagging Danish politicians

Most hashtagging Danish politic party


Notice that #dkpol is vastly dominating the distribution of hashtags. Around one third of all tweets by Danish politicians include this hashtag. Several hashtags created by various news media seem to by popular. For example, the top 10 includes #fv15, #ftlive and #tv2valg as popular hashtags.

But how do the parties actually differ? We can use tfidf to seperate the hashtags of each party and gain knowledge of the unique keywords for each individual party.

What do parties say with their #hashtags?

Alternativet's hashtags (top tfidf as sizes)

Dansk Folkeparti's hashtags (top tfidf as sizes)

Enhedslisten's hashtags (top tfidf as sizes)

De Konservative's hashtags (top tfidf as sizes)

Liberal Alliance's hashtags (top tfidf as sizes)

Radikale Venstre's hashtags (top tfidf as sizes)

Socialdemokratiet's hashtags (top tfidf as sizes)

Socialistisk Folkeparti's hashtags (top tfidf as sizes)

Venstre's hashtags (top tfidf as sizes)

The wordsclouds does capture phrases commonly associated with the parties. Examples are Alternativet, which tends to use hashtags such as #venligrevolution, #elbil, and #nypolitiskkultur, and Dansk Folkeparti, which include hashtags such as #meredkmindreeu, #grænsekontrol, and #sønderjylland among its defining hashtags.


How are politicians connection if we look at what they say in parliament and how they retweet each other?


Politicians is heavy users of twitter and the retweet functionality is often used to share the tweets from other politicians. But how are these retweets connected? Do politician tend to retweet each other more within the same party? Can a party be detected by using the Louvain algorithm to detect communities?

When politicians talk in the parliament they often mention each other in different contexts whether they agree or disagree with each other. How are these politicians connected when it comes to mentioning each other? Are some politicians central for the parliament? do politicians within the same party mention each other more often than politicians from other parties?

Community

Party

Retweet network

Parliament meeting

The Louvain algorithm does seem to detect 5 different communities, some more distinct than others. This leads us to the previously asked question; do politicians from the same party tend to retween each other more often and therefore shows the parties as communities in the graph? Coloring the politician nodes with the color representing their party indicates that the algorithm quiet succesfully managed to find the parties as communities meaning that the politicians do tend to retweet more within their own party.
Another thing to notice is that both the in and out degree eigenvector centrality is dominant in Socialdemokratiet meaning they often retweet tweets from politicians that often retweet others and that they often get retweeted by politicians that retweet alot of other politicians. The fact that it appears for both the in and the out degree eigenvector centrality implies that the politicians in Socialdemokratiet retweet alot and mostly within their own party.

Switching to the parliament graph reveals a new much bigger graph with the three communities found by the Louvain algorithm represented by colors. The communities does not seem to be very distinct as they all cluster in one big group. Coloring the politician nodes with color based on their party does not indicate a connection between politicians from the same party. This means that politicians do not mention each other more often within the same party but rather mentions other politicians more stochastic.
Looking at the betweenness centrality shows that a few politicians seem to dominate the shortest paths, namely Per Clausen from Enhedslisten seem to have a high betweenness centrality.
Another interesting thing to notice is the out degree eigenvector centrality for Mogen Lykketoft from Socialdemokratiet. It is extremely high compared to other politicians meaning that he is mentioning alot of politician who also mention alot of other politicians.



What are the important terms in politics?

Let's have a look at the most important terms in Danish politics throughout the last years.

The most important words on Twitter (2009-2016)


Twitter TF-IDF 03-2009 - 06-2009

Twitter TF-IDF 06-2009 - 09-2009

Twitter TF-IDF 09-2009 - 12-2009

Twitter TF-IDF 12-2009 - 03-2010

Twitter TF-IDF 03-2010 - 06-2010

Twitter TF-IDF 06-2010 - 09-2010

Twitter TF-IDF 09-2010 - 12-2010

Twitter TF-IDF 12-2010 - 03-2011

Twitter TF-IDF 03-2011 - 06-2011

Twitter TF-IDF 06-2011 - 09-2011

Twitter TF-IDF 09-2011 - 12-2011

Twitter TF-IDF 12-2011 - 03-2012

Twitter TF-IDF 03-2012 - 06-2012

Twitter TF-IDF 06-2012 - 09-2012

Twitter TF-IDF 09-2012 - 12-2012

Twitter TF-IDF 12-2012 - 03-2013

Twitter TF-IDF 03-2013 - 06-2013

Twitter TF-IDF 06-2013 - 09-2013

Twitter TF-IDF 09-2013 - 12-2013

Twitter TF-IDF 12-2013 - 03-2014

Twitter TF-IDF 03-2014 - 06-2014

Twitter TF-IDF 06-2014 - 09-2014

Twitter TF-IDF 09-2014 - 12-2014

Twitter TF-IDF 12-2014 - 03-2015

Twitter TF-IDF 03-2015 - 06-2015

Twitter TF-IDF 06-2015 - 09-2015

Twitter TF-IDF 09-2015 - 12-2015

Twitter TF-IDF 12-2015 - 03-2016

Twitter TF-IDF 03-2016 - 06-2016

Twitter TF-IDF 06-2016 - 09-2016

Twitter TF-IDF 09-2016 - 12-2016

Twitter TF-IDF Most current


Notice that quite a lot of important events can be identified in the important terms from the tweets. Some examples would be:

  • - Conflicts & Wars (e.g. Libya, Ukraine)

  • - Elections (KV, FV, EU)

  • - Scandals (e.g. tax havens, information hiding, etc.)

How about in the parliament? (2010-2016)

Similarly, we can look at the most important terms from the meetings within the Danish parliament throughout the last years.

Folketinget TF-IDF 10-2010 - 01-2011

Folketinget TF-IDF 01-2011 - 04-2011

Folketinget TF-IDF 04-2011 - 07-2011

Folketinget TF-IDF 07-2011 - 10-2011

Folketinget TF-IDF 10-2011 - 01-2012

Folketinget TF-IDF 01-2012 - 04-2012

Folketinget TF-IDF 04-2012 - 07-2012

Folketinget TF-IDF 07-2012 - 10-2013

Folketinget TF-IDF 10-2012 - 01-2013

Folketinget TF-IDF 01-2013 - 04-2013

Folketinget TF-IDF 04-2013 - 07-2013

Folketinget TF-IDF 07-2013 - 10-2013

Folketinget TF-IDF 10-2013 - 01-2014

Folketinget TF-IDF 01-2014 - 04-2014

Folketinget TF-IDF 04-2014 - 07-2014

Folketinget TF-IDF 07-2014 - 10-2014

Folketinget TF-IDF 10-2014 - 01-2015

Folketinget TF-IDF 01-2015 - 04-2015

Folketinget TF-IDF 04-2015 - 07-2015

Folketinget TF-IDF 07-2015 - 10-2015

Folketinget TF-IDF 10-2015 - 01-2016

Folketinget TF-IDF 01-2016 - 04-2016

Folketinget TF-IDF 04-2016 - 07-2016

Folketinget TF-IDF 07-2016 - 10-2016

Folketinget TF-IDF 10-2016 - present time

The important terms extracted from the Danish parliament seem to confirm the notion that real politics is a boring business. Jokes aside, the wordclouds does seem to represent a less colorful corpus of words. This makes sense intuitively, as Twitter is (or was) limited to 140 characters, which forces its messenger to create a strong, clear, and to-the-point wording, while meetings in the parliament can go on for hours.

Looking at the most weighted terms (rare words) across all documents does seem to capture some of the colors that frequent terms has washed out:

Clustering by important terms

Usinger sklearn's linear kernel module, we can compute the pairwise cosine similarity between politicians and parties. After the similarities have been determined, we can cluster the politicians or parties, using our favourite clustering algorithm. We tried spectral clustering and KMeans that worked quite well for this particular task.

From the plots we can see that when we set the clustering method two extract two plots, the Danish parties are creating one cluster while the foreign parties (Faroe Islands and Greenland) are creating another.

For three clusters we see that Alternativet, Kristendemokraterne and Non-Party Members join in on a new cluster.