Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Salvino A. Salvaggio [1] [2] [3]

At a moment where many are preparing for the December 31st evening cocktail, the End of Year speech of the President of the Italian Republic is broadcast right on time at 8:30pm. A tradition which came to be with the constitutional establishment of the Italian Republic itself (or almost [4]), the year-end message has endured all trends and has survived the technological refoundation of the mediascape [5]. Since the beginning it also imposed itself as a television format [6] able to bring together millions of TV viewers [7] regardless of the fact that they are often engrossed in final preparations for the evening’s celebrations.

It is not a concern to question at this time the convenience or lack thereof of such an annual occurrence nor, much less, the reasons which favor or exhaust the lengthening of this republican ritual [8]. Advantage must simply be drawn from the fact that 67 years of presidential year-end well wishes form today a sufficiently rich documental corpus to become the object of data analysis.

For over a decade, the statistical analysis of written documents has become a common practice and a consolidated scientific instrument (Jockers, 2014; Gries, 2013; Baayen, 2008). Although data analysis has been fully incorporated in the field of literary studies, little has been undertaken to investigate the textual or verbal production of public administration with equal quantitative rigor. This work contributes to filling the gap by exploring all the Italian Presidents’ New Year speeches from 1949 to 2015 bringing the tools and methodologies of data science into the field of political studies.

#### 1. Style and elocution

First of all, we must note that not all the Presidents of the Italian Republic have addressed the Nation seven times for the year-end wishes. Luigi Einaudi remained in office for 6 years, Antonio Segni for 2 years, Giorgio Napolitano for 9 (a first mandate of 7 years and a second he resigned from after 2 years) and Sergio Mattarella has taken on the New Year’s Eve practice only once to date. Three types of data are of immediate help:
• If the total number of words spoken is affected by the number of years in office, the average number of words/speech provides a better indication on the more modest and the more loquacious Presidents.
• The average number of words/phrase helps to understand the linguistic style of each President.
• From the average number of words spoken per minute, it is possible to derive a valid idea of the rhythm and speed of elocution.

PresidentNew Year Speeches      Total words      Words by speech      Words by sentence      Words by minute
Luigi Einaudi6121020242116
Giovanni Gronchi7582183246139
Antonio Segni2179789849126
Giuseppe Saragat78471121032132
Giovanni Leone77333104829142
Sandro Pertini71470521011995
Francesco Cossiga714131201938115
Oscar Luigi Scalfaro724588351318110
Carlo Azeglio Ciampi71260518011899
Giorgio Napolitano920377226430122
Sergio Mattarella12117211717106

Two significant elements can then be drawn from the previous basic data:

• The mutations of the stylistic forms unique to each President
• The changes in elocution rhythms of each of them

1.1. Stylistic mutations
The stylistic mutations over the course of the history of the year-end speeches appear with great clarity. [9] First of all, a progressive shortening of the sentences, almost split in half, is evident: from the approximately 42 words/sentence between 1949-1968 to approximately 22 words in the seven year period of Presidents Ciampi and Scalfaro (with the exception of President Cossiga who used much longer sentences). Lately, President Napolitano reversed the trend, proposing a more sophisticated language founded on longer sentences than his predecessors (approximately 28 words/sentence on average). Finally, in his first year-end address, President Mattarella constructed his speech on very brief sentences (17-18 words on average), which are sharp and of great impact, with a more journalistic style rather than institutional (similar to Presidents Ciampi, Scalfaro and Pertini).

1.2. Elocutionary evolutions
The impact that the profound mutation of the media ecosystem has had in these last decades on the forms of oral and written expression in general could lead one to believe that a similar effect was impressed on the rhythm and speed of elocution of the Presidents. The progressive slipping of the dominating media (from newspapers to radio to TV to Internet to social media) as well as the changes endured by the various formats which tend to favor, more and more, forms of brief communication have spread in such a pervasive manner in every fold of society that it comes natural to speculate a similar transformation of the presidential elocution which reflects the passage of a sacred conception of the Presidency to a conception more in line with the zeitgeist. Actually, none of all this seems to apply to the presidential year-end addresses. In fact, instead of noticing an acceleration of the elocution, the contrary is observed: Presidents Gronchi, Segni, Saragat and Leone spoke in a much more rapid manner than Presidents Pertini, Cossiga, Scalfaro, Ciampi, Napolitano and Mattarella. [10] [11]

Perhaps it is worthwhile to also note a detail: although all of the Presidents were seated to deliver their year-end well wishes, not all of them were so in the same manner. For the most part of the addresses, the Presidents were seated at their desk; Presidents Pertini, Scalfaro and Mattarella at times used an armchair in a Quirinale sitting room, without a desk.[12] President Pertini in 1984 even sat next to a fireplace in a simple setting far from the formality and the golden palace adornments. In particular, in 2011 and 2012, President Napolitano sat in an informal way at the desk, sideways (and with his jacket unbuttoned in 2011). On these two occasions (2011 and 2012), the average of words spoken by minute increased from 110 to 120 [13], to indicate —but it is only a general indication whose orientation should be followed over the years— that mutations in the setting of the year-end speech could have an impact on the locution.

#### 2. Length

Although the seven year term of President Scalfaro is characterized by the most rambling year-end speeches of the whole history of the Italian Republic (with an all time record of 5,013 words spoken on December 31, 1997), a trend to the lengthening of the well-wishing message is undeniable, from an average of less than 500 words/speech before 1960 [14] to an average of more than 1,500 words after 1980 [15]. This increasing trend, however, shows a setback in 1999-2000 and marks a slight about turn in the last 15 years, with speeches that count, for the most part, between approximately 1,800 and 2,250 words.

#### 3. Frequency

With this type of public speech that TV broadcast makes available to all in a sort of formal and recurrent celebration (defined by President Saragat a “spiritual communion for the entire nation” in 1964), the choice and use of terms spoken by the Presidents are certainly not by chance. After all, since the early years, the year-end presidential addresses were the object of interpretation and analysis in fine detail on behalf of journalists, analysts and politicians, besides being followed by a very wide audience. It therefore is useful to highlight the words and, behind them, the themes used with the greatest frequency by the Presidents in attempting to outline a map of historically relevant topics or of personal interest to each speaker.

For the totality of year-end well wishes delivered by all the Presidents, it is not surprising to see that Italy represents the main and dominant theme [16], together with the final balance of the year and with suggestions, proposals, wishes for the new year. Peace and young people also occupy a prominent position in the presidential well wishes, but also politics, Europe, freedom and employment are topics that many Presidents have taken on, on December 31.

The study of the absolute frequency of words also provides clear indications on the overall landscape of the presidential well wishes. These appear as an expression of unity for the country, actual or hoped for, of gathering around shared patriotic symbols, and of celebration if not of construction of the national narration [17]. But not all Presidents insist in the same way on the same themes. Beyond the points of convergence, the lexical ecosystem of each President varies greatly in respect to the overall ‘average’ illustrating specific and multifaceted thematic geographies. The wordclouds highlight well the personal worries and the current trends which hold in a differentiated way the attention of this or that President.

Presidente L. EinaudiPresidente G. GronchiPresidente A. Segni
Presidente G. SaragatPresidente G. LeonePresidente S. Pertini
Presidente F. CossigaPresidente O. L. ScalfaroPresidente C. A. Ciampi
Presidente G. NapolitanoPresidente S. Mattarella

#### 4. Words association

The identification of structures of association (words which are often used together), in pairs (bi-grams) or in longer structures (tri-grams or n-grams), is a pillar in the processing and analysis of contents in natural language.[18]

Besides the obvious expressions and clichés typical of year-end speeches (such as, for example, ‘happy year’, ‘new year’, ‘this year’) and the references to the nation (‘Italian people’, ‘national unity’, ‘common good’, ‘constitutional charter’), spotting some unexpected expressions among the most cited may arouse surprise. Without a quantitative analysis of the language, it is difficult, for example, to realize how much these messages are self-referential with a strong recurrence of expressions such as ‘president republic’ [19], ‘head of state’, ‘I would like to say’ (vorrei dire), or how much ‘armed forces’ and ‘law enforcement’ are found in the well wishes. Additionally, the analysis of the n-grams removes every doubt on the themes of central importance for Italy in these almost seventy years of contemporary history. ‘European union’, ‘united nations’, ‘international community’ and ‘middle east’ recall the inclusion of Italy in the network of international relationships but also of the geo-political problems on a large scale. In the same way, expressions like ‘social justice’, ‘social economic’, ‘public debt’ or ‘organized crime’ allude to internal problems which have marked the recent history of the country. Finally, we can reasonably ask if the presence of ‘john paul’ and ‘paul ii’ among the most used bigrams do not suggest proximity —perhaps even more spiritual than geographical— between the Quirinale and the Vatican. After all, in the period of the 67 years analysed here, the trigram ‘help from god’ appears more times than ‘jobs’…

Purely for example, here is a partial and selective list of trigrams [20] stated at least 10 times.

FrequencyTriGram
45forze dell ordine
44capo dello stato
43il popolo italiano
36del nostro paese
36per la pace
25presidente della repubblica
24tutti gli italiani
21senso di responsabilità
19la libertà e
16il capo dello
14il mio pensiero
14le forze politiche
13contro il terrorismo
13economico e sociale
13giovanni paolo ii
13presidente del consiglio
12della nostra società
12il bene comune
11aiuto di dio
11pace nel mondo
11per la giustizia
10dell unione europea
10della persona umana
10delle nazioni unite
10posti di lavoro

#### 5. Themes

As already seen, the historical period, the major events, national or international, the set of most acute problems, the plights faced by the government institutions or by the population, the particular interests of each President have all a considerable impact on the choice of terminology adopted in the year-end well wishes speeches. In order to illustrate this selection let’s focus on examples relative to seven specific themes [21]:
• unemployment
• work and workers
• young people
• culture
• terrorism and terror
• reforms
• homeland [22]
Presented as graphs (titled Frequency of theme in each speech), the how and how much Presidents evoke a specific theme in the chain of the 67 year-end addresses is better perceived. Each graph photographs a topic and indicates the number of times that such theme is cited, overall, in each particular message. For example, the first graph pertaining to unemployment shows that the term was used six times in the year-end message of 1984 and 5 times in 1979, 1981, 1983 (President Sandro Pertini) or 4 times in 1992 (President Scalfaro).

This, however, provides only half of the analysis. The significance of a theme is not measured only by the overall absolute frequency of the relevant term in the single speeches but also by the relative frequency of the term in the message compared to the average use of the same term in the Italian language in general in the same historical period or year.[23] And that comparison is given in the second graph (entitled Relative frequencies of theme).

5.1. Unemployment

5.2. Work and workers

5.3. Young people

5.4. Culture

5.5. Terrorism and terror

5.6. Reforms

5.7. Homeland

It should be stressed that in each of these seven examples, the difference of relative frequency of use of the theme (lemma) between the Italian language in general (in those years) and the presidential year-end speeches is not fortuitous. The p-value of independence t-test [24] is always lower than 0.001.

From this type of analysis it is possible to verify, for example, that the theme of terrorism occupies a significant position of relevance for President Pertini, surely because his seven year term was, from this point of view, a difficult and tragic period for Italy, just as the issues of unemployment and young people were central to him. But it is also noticeable that, overall, for Italian Presidents, terrorism is written in the national historical memory as a phenomenon associated as much —if not more— to the late 1970s and early 80s as to the episodes of the last 10-15 years, from 2001 on. President Napolitano seems instead to be preoccupied not only by the theme of employment but also and above all by the question of the State reformation whereas he refers to the homeland only 4 times in 9 years; a theme that, instead, was special to Presidents Cossiga and Scalfaro. The theme of culture has mainly attracted the attention of Presidents Cossiga and Scalfaro. The statistical analysis should be further fine-tuned though to understand if they meant culture in the anthropological or artistic sense.

Once the algorithm is established, this type of analysis has the advantage of being extendable to any topic, offering a historical reading rooted in quantified data and not only in the inspiration of the researcher. The comparison between the “traditional” socio-political analysis and the statistical reading of the data on themes such as mafia, north-south inequalities, migratory flows, innovation, to name just a few, would surely be instructive.

#### 6. Sentiment analysis

The statistical analysis of sentiment [23] was developed on the basis of a combination of quantitative methodologies aiming to the measurement, quantification and classification of opinions and sentiments expressed in documents (textual corpus) through words which have a positive, negative or neutral semantic connotation. For example, in function of the lexical composition of the text, the sentence “Last quarter the European economy has benefitted from the favorable price of oil” would be classified as positive, when the phrase “In the same period the labor market has continued to suffer, penalizing particularly young people.” would be considered negative. In the recent years, the development of the discipline has experienced a strong acceleration fuelled by the desire to better understand the evolution of various types of content published by hundreds of millions of social media users (regardless of the difficulties given by the automatic tracking of sentiments in brief texts; Thelwall, 2010) and by the uncountable websites that offer users the possibility to publish review of products and services (Galitsky, 2009; Cataldi and al., 2013).

Normally used for scientific purposes [26] but also to improve marketing efficiency and expand business opportunities [27], sentiment analysis applied to historical, administrative or institutional documents still remains embryonic, above all in the case of documents written in the Italian language. [28] Consequently, inquiring whether the “truth” of the Presidential year-end speeches in Italy lies as much in the analysis of the data behind them as in the more traditional political analysis can only stimulate an innovative line of research and trigger considerations rooted in the extension of data sciences to the study of governments and institutions.
The first step in carrying out the sentiment analysis of the Presidential messages consists of reducing the lexical complexity through the lemmatization of the text, that is the substitution of each term used with its lemma of reference. For example, the last sentence of the first year-end address by President Einaudi in 1949, from “such I am sure is the common vote and such is my personal wish which is directed heartfelt and with affection at this hour to each Italian in and out of the boundaries of the country” becomes “such to be sure to be the common vote and such to be my personal wish which to direct heartfelt and with affection at the hour to each Italian in and out of the boundary of the country”. This makes easier the management of the dictionaries (words lists) that, through various simplifications, do not need to comprise the plurals, conjugated or derived forms but can be limited to citing only the infinitives or simple forms. For a basic sentiment analysis, once the speeches are lemmatized, a single positive value (+1) is associated to each term (lemma) if the term expresses a positive sentiment, opinion, attitude, concept; a single negative value (-1) if the lemma translates a negative sentiment, opinion, attitude, concept and a neutral value (0) for neutral terms (Vryniotis, 2013).[29] After having summed up the values of the single words grouped by sentence, each sentence of each presidential speech can be characterized by 3 absolute values: the sum of the “positive sentiments” (expressed by means of a positive integer), the sum of the “negative sentiments” (expressed by means of a negative integer), the overall sum of the sentiments expressed in that sentence (translated into a positive or negative integer according to the dominant sentiments).

The distribution of the values of the overall sums of sentiment shows that the year-end messages prevalently transmit positive concepts, opinions and sentiments. Since 1949 to present day, the sentences of the speeches are in fact positioned on the positive segment of the axis, with an average sentiment value of +3.7 and a median value of +3.

However, for greater accuracy, these whole values (positive sum, negative sum and overall sum) are weighed by comparing them to the total number of words in the sentence. In this way 3 percentage values are obtained (positive and negative sentiments, and overall percentage). In combining the values of the single sentences per message and, later, combining the messages per president, granularity is somewhat lost but a clearer vision of the whole picture is acquired (particularly if a polynomial function is used to smooth the coarseness of the single values).

For example, President Mattarella’s year-end speech appears to be mainly positive even though there are distinctly negative statements.[30]

The sentiment analysis —which perhaps should be called opinion mining in this case— can also help in making visible underlying structures in the construction of the speeches.

The following two graphs illustrate President Napolitano’s year-end addresses in 2007 and 2011. A resemblance of the narrative structure is observed: after the beginning well wishes (which can be translated with a high positive sentiment index), the President evokes negative facts, thoughts, opinions, situations (this significantly decreases the overall index value) to then mark a high, expressing again clearly positive sentiments and opinions which slowly “dull” to the final wishes. In other words: after taking off at top speed, then suddenly the bad news arrives which is immediately counterbalanced, first by a few but strong very positive opinions, then by a long series of still positive expressions, up to the conclusion of the message which fosters a pronounced hope for the year to come.

The long term analysis of the aggregated data per speech can benefit from this approach as well. Overall, the level of positive sentiment expressed in the year-end well wishes by all the Presidents does not vary much. Although some significant oscillations are observed year over year (with a maximum range of variation over the years between +28.5% in 2003 and +16.8% in 1981), the total trend remains stable —relative stability likely due, at least in part, to the characteristic of this particular communication exercise which tends to highlight the positive wishes and greetings repeated over and over during the speech.
On the other hand, the proportion of negative sentiment grows over the course of the years, but with oscillations that seem [31] to follow the evolutions of the economic and social crisis. In fact, it is possible to observe a rapid decline in the sentiments expressed between 1959 and 1980-1981 (practically a doubling of the negative lemmas), followed by a decrease in pessimism from 1981 to 2000, and again a progressive darkening of the skies from 2001-2002 on.

The expression of the sentiments considered for each single president shows some variability, with President Pertini who, up to today, ranks at the extremes both for the highest percentage of negative sentiments (lemmas) and for the lowest percentage of those positive. Beyond the differences in Presidents’ personality, the historical period surely influenced the volume of the negative sentiments expressed by Presidents Leone and Pertini. For this same reason, it would be useful to closely look at the next year-end addresses to understand if the negative sentiments expressed by President Mattarella confirms a trend which seems to inaugurate with President Napolitano or if it is only an instance given the fact that up to now President Mattarella has only had one occasion to deliver his year-end wishes to the nation.

#### 7. Conclusion

This work provides unique insights into the institution’s textual production and its variation over time in three manners:
• Descriptive statistics were used to quantify the way(s) each Italian President speaks to the Nation. Amongst others, it allowed differentiating elocutionary styles: crisper (202 words/speech) or verbose (3,513 words/speech), direct (17 words/sentence) or convoluted (49 words/sentence), slow (95 words/minute) or fast (142 words/minute), as well as variations to means. When applied to the time series, the descriptive analysis shows the mutations of the elocutionary styles over time and the fact that they are not always in line with the zeitgeist.
• Natural language processing methods highlighted the frequency and associations of single or groups of words. This was useful to extract the features of the New Year speeches overall but also the main interests of each President (with the oldest President in the history of the Italian Republic being the most worried about the future of the young generation). Quantified examples are given for 7 themes: unemployment, work/job, youth, culture, terrorism, reform, and homeland. Absolute and relative frequencies of these themes were computed and compared to the average frequency of the same themes in the language overall for the same period. Supported by meaningful independence t-tests and confidence intervals, this approach showed the comparative evolution of the recurrence of the 7 topics. But it also showed it can be generalized to any theme.
• After having built a “sentiment dictionary”, quantitative sentiment analysis (opinion mining) has been applied to quantify the expression of ideas, opinions, and statements as positive or negative based on the wording. Relevant differences between Presidents emerge with, at the 2 extremes, President Pertini (18% positive sentiments against 9% negative) and President Gronchi (27% positive sentiments against 4.5% negative). Also, historical trends become more visible: towards more pessimism in the 1980s followed by a slightly stronger optimism in the 1990s and again more negative sentiments from 2000 onward. Sentiment analysis also made obvious that some Presidents built up their narratives following recurrent “sentiment/opinion patterns”. The most evident case is President Napolitano that alternates good and bad news in such a specific manner that it becomes a pattern signature structuring some of his speeches.

Although little has been done to date to incorporate data science in the field of textual analysis of political content, this work shows the early benefits of such an approach. Textual and verbal production of public administrations can be investigated with quantitative rigor opening new lines of research. Quantitative methods such as descriptive statistics, natural language processing, and sentiment analysis (opinion mining) prove to be highly valuable tools capable of bringing a strong contribution to enrich and enhance political sciences.

References

Baayen, R.H., (2008). Analyzing Linguistic Data, Cambridge University Press.

Baccianella, S., Esuli, A. and Sebastiani, F. (2010). “Sentiwordnet 3.0: An enhanced lexical resource for sentiment analysis and opinion mining”, in Calzolari, N. and al., editor, Proceedings of LREC, 2200–2204. http://is.gd/VLTKqB

Basile, V. and Nissim, M. (14 June 2013). “Sentiment analysis on Italian tweets”, Proceedings of the 4th Workshop on Computational Approaches to Subjectivity, Sentiment and Social Media Analysis, 100–107. http://is.gd/io82rB

Casotto, P. (2012). Sentiment Analysis for the Italian Language, Tesi di Dottorato, Dipartimento di matematica e Informatica, Universita’ degli Studi di Udine.

Cataldi, M., Ballatore, A., Tiddi, I., Aufaure, M.-A. (22 June 2013). “Good location, terrible food: detecting feature sentiment in user-generated reviews”, Social Network Analysis and Mining, 3 (4): 1149–1163. http://is.gd/Tlp0Fc

Charpentier, A. (22 February 2016). “Clusters of Texts”, Freakonometrics. http://is.gd/32mB13

Davidov, D., Tsur, O, and Rappoport, A. (2010). “Enhanced sentiment learning using twitter hashtags and smileys”, Proceedings of the 23rd International Conference on Computational Linguistics, COLING ’10, 241–249, Stroudsburg, PA, USA.

Galitsky, B. and McKenna, E.W. (12 November 2009). “Sentiment Extraction from Consumer Reviews for Providing Product Recommendations”, Patent US–20090282019-A1. http://is.gd/ioVBsb

Gonzales-Ibanez, R., Muresan, S. and Wacholder, N. (June 2011). “Identifying sarcasm in twitter: A closer look”, Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, 581–586, Portland, OR, USA.

Gries, S.Th. (2013). Statistics for Linguistics with R, Second Edition, De Gruyter Mouton, Berlin.

Jockers, M.L., (2014). Text Analysis with R for Students of Literature, Springer.

Kennette, L.N., Wurm, L.H. and Van Havermaet, L.R. (2010). “Change detection: The effects of linguistic focus, hierarchical word level and proficiency”, The Mental Lexicon, 5(1), 47–86.

Kulkarni V., Rfou R., Perozzi B. and Skiena S. (2015). “Statistically Significant Detection of Linguistic Change”, Proceedings of the 24th International Conference on World Wide Web, 2015.

Lebeau, J. (20 January 2016). “State of the Union Speeches and Data”, More or Less Numbers. http://is.gd/NrJIRS

Liu, B. (2012). Sentiment Analysis and Opinion Mining, Synthesis Lectures on Human Language Technologies, Morgan & Claypool Publishers.

Lapowsky, I. (13 January 2016). “The True Message of the State of the Union Is in the Data”, WIRED. http://is.gd/7ULEdC

Mani, I. (2010). The Imagined Moment. Time, Narrative, and Computation, University of Nebraska Press.

Mejova, Y. (16 November 2009). Sentiment Analysis: An Overview. http://is.gd/C1U9OJ

Taboada, M., Brooke, J., Tofiloski, M., Voll, K. and Stede, M. (June 2011). “Lexicon-based methods for sentiment analysis”, Comput. Linguist., 37(2):267–307.

Thelwall, M., Buckley, K., Paltoglou, G., Cai, D., Kappas, A, (2010). “Sentiment strength detection in short informal text”, Journal of the American Society for Information Science and Technology, 61 (12): 2544–2558. http://is.gd/yRnRCq

Vryniotis, V. (23 September 2013). “The importance of Neutral Class in Sentiment Analysis”, Machine Learning Blog & Software Development News. http://is.gd/FidS0k

Notes

[1] This document is the result of an analysis carried out by the author and reflects only and exclusively the opinions of the author. Therefore, this document does not involve in any way, neither directly nor indirectly, none of the employers, past or present, of the author. The author confirms that he has no conflict of interest, and has never worked, neither in a remunerated capacity nor gratuitously, for the President of the Italian Republic, and has never been appointed in any role or capacity by the Quirinale. Notwithstanding, the author informs the readers that he was honored with the title of Commander by the President of the Italian Republic (Decree August 1 2007).

[2] eMail: salvino [dot] salvaggio [at] gmail [dot] com

[3] The Author thanks Paolo Barbesino, Paolo Gasparini, Gaetano Palumbo for the comments to the previous versions.

[4] The first year-end message was delivered by President Luigi Einaudi on December 31, 1948. Enrico de Nicola – elected interim President on June 28, 1946, then again June 26, 1947 after his resignation, and again President of the Italian Republic from January 1, 1948 – did not deliver any year-end wishes to the nation during his two years at the Quirinale.

[5] Printed paper, radio and film distribution of the Istituto Luce in the early years, live television from 1954 on.

[6] In fact, since his first appearance on TV in 1954, the program often opens with a wide view which captures a room in the Quirinale palace to then progressively zoom in on the framing of the bust and face of the President speaking to the nation looking directly into the camera.

[7] Record held by President Giorgio Napolitano watched by approximately 13 million viewers on December 31, 2014.

[8] A much formalized ritual, with few surprises or formal variations but also significant, as shown by the clustering text which is unable to isolate clear or specific groups (Charpentier, 2016).

[9] Highlighted by change point detection to identify not only one or more potential changes but also the moment in which they occur (Kulkarni and al, 2015; Kennette and al, 2010).

[10] The variation to the average is statistically significant and cannot therefore be attributed to chance (t-test).

[11] It would be useful —but unfortunately the information is not available— to know the average speed of elocution of the Italian population in general, year by year, from 1949 on to compare to the data of the presidential speeches. Also, data on duration of President Einaudi’s speeches are not available.

[12] It is not therefore clear whether President Scalfaro was at the Quirinale for the message on December 31 1997 or not.

[13] p-value of t-test is approximately 0.00016.

[14] Precisely 481.8 words.

[15] With the significant exception of 1991, year in which President Cossiga went on TV to deliver his wishes saying that substantially he would not be saying anything else, all in just 419 words in less than 4 minutes. It must be noted that, from a statistical point of view, specifically the messages by Presidents Pertini and Scalfaro are the main contributors to general trend (regression).

[16] The terms “italy”, “italians” are pronounced almost 700 times in 67 messages.

[17] With words like italy, italians, young people, population, country, life, liberty, citizens, democracy, trust, responsibility.

[18] Natural Language Processing (NPL).

[19] Which in the statistical analysis stands for ‘president of the republic’.

[20] Obtained with AntCon 3.4.3 software.

[21] The themes where chosen without representativeness pretention.

[22] The following regex terms or expressions were used in the research of the occurrences: ‘unemployment|underemployment’, ‘work’, ‘culture’, ‘terror’, ‘reform’, ‘bhomeland|patriotism|patriot|patriots’, ‘byoung people|youth|youthful|b’

[23] This second analysis is made possible by Google Books which provides researchers with the frequency of all the words used in millions of books, year by year, language by language, from approximately 1500 to 2009. It is necessary to underline that the terminological quantification of the semantic linguistic corpus built by Google Books does not included texts published in mass media (newspapers, Internet) which might modify the frequency data adding a more pronounced component of modernity.

[24] Welch Method.

[25] Usually called sentiment analysis or opinion mining. See Mejova, 2009 for an overall description.

[26] For example to add quantitative depth to the literal analysis, or in a political setting to better understand the evolutions of the orientation of the electorate.

[28] The easy availability of numerous English dictionaries of words associated to values of various sentiments and opinions has dynamized the research on English language contents (Baccianella et al., 2010; Gonzales-Ibanes and al., 2011; Liu, 2012). The same is taking place for Spanish and, in lesser degree, for other languages. In Italian, unfortunately, the availability of such instruments still suffers significant shortcomings and the laudable efforts of isolated researchers are not enough to bridge the double gap of, on one side, lists of words with the corresponding quantification of the positive or negative connotation and, on the other, of classifications of the same words per type of sentiment or opinion. Having a base dictionary available which signals the positive (+1) or negative (-1) value of an adjective is the first essential step for this approach. But also knowing if the same adjective belongs to a specific category of sentiment -for example anger, joy, sadness, fear, surprise, trust, etc.- makes it possible to enrich the analysis. In Italian, see for example the software sentiment-Italian-lang by Giuseppe Ragusa – https://github.com/gragusa?tab=repositories, Casotto, P. (2012), Basile and Nissim (2013).

[29] For greater precision, the lemmas can be quantified on a real scale that includes the intermediate values between 0 and 1, 0 and -1.

[30] In this type of graph, the order of sequence of the phrases in the speech act as a temporal axis (x-axis)- this approach is usually defined as novelistic time (Mani, 2010).

[31] This should be verified in detail.

 var vglnk = {key: '949efb41171ac6ec1bf7f206d57e90b8'}; (function(d, t) { var s = d.createElement(t); s.type = 'text/javascript'; s.async = true; // s.defer = true; // s.src = '//cdn.viglink.com/api/vglnk.js'; s.src = 'https://www.r-bloggers.com/wp-content/uploads/2020/08/vglnk.js'; var r = d.getElementsByTagName(t)[0]; r.parentNode.insertBefore(s, r); }(document, 'script')); Related ShareTweet To leave a comment for the author, please follow the link and comment on their blog: RSS Feed - SaS in #R#. R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job. Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. 
 
 
 function init() { var vidDefer = document.getElementsByTagName('iframe'); for (var i=0; i<vidDefer.length; i++) { if(vidDefer[i].getAttribute('data-src')) { vidDefer[i].setAttribute('src',vidDefer[i].getAttribute('data-src')); } } } window.onload = init; R bloggers Facebook page Most viewed posts (weekly) Introduction to Machine Learning with TensorFlow PCA vs Autoencoders for Dimensionality Reduction 5 Ways to Subset a Data Frame in R How to write the first for loop in R Introduction to Deep Learning Date Formats in R How to Remove Outliers in R Sponsors // https://support.cloudflare.com/hc/en-us/articles/200169436-How-can-I-have-Rocket-Loader-ignore-my-script-s-in-Automatic-Mode- // this must be placed higher. Otherwise it doesn't work. // data-cfasync="false" is for making sure cloudflares' rocketcache doesn't interfeare with this // in this case it only works because it was used at the original script in the text widget function createCookie(name,value,days) { var expires = ""; if (days) { var date = new Date(); date.setTime(date.getTime() + (days*24*60*60*1000)); expires = "; expires=" + date.toUTCString(); } document.cookie = name + "=" + value + expires + "; path=/"; } function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } function eraseCookie(name) { createCookie(name,"",-1); } // no longer use async because of google // async async function readTextFile(file) { // Helps people browse between pages without the need to keep downloading the same // ads txt page everytime. This way, it allows them to use their browser's cache. var random_number = readCookie("ad_random_number_cookie"); if(random_number == null) { var random_number = Math.floor(Math.random()*100*(new Date().getTime()/10000000000)); createCookie("ad_random_number_cookie",random_number,1) } file += '?t='+random_number; var rawFile = new XMLHttpRequest(); rawFile.onreadystatechange = function () { if(rawFile.readyState === 4) { if(rawFile.status === 200 || rawFile.status == 0) { // var allText = rawFile.responseText; // document.write(allText); document.write(rawFile.responseText); } } } rawFile.open("GET", file, false); rawFile.send(null); } // readTextFile('https://raw.githubusercontent.com/Raynos/file-store/master/temp.txt'); readTextFile("https://www.r-bloggers.com/wp-content/uploads/text-widget_anti-cache.txt"); Recent Posts Using Java functions from JAR file in R using rJava September 2021 ISC Call for Proposals – Now Open! Crash Course in R Model Deployment with Docker and friends Introduction to Deep Learning A Simple Two-Stage Stochastic Linear Programming using R RObservations #13: Simulating FSAs in lieu of real postal code data. Running R code for all combinations of some parameters with lapply karate error: JAVA_HOME cannot be determined from the Registry Competition to win free training closes today Solving Einstein’s Puzzle with Constraint Programming Advancements in Symbolic Data Analysis Using bootstrapped sampling to assess variability in score predictions An RStudio Table Contest for 2021 Advances in Difference-in-Differences in Econometrics Optimal disclosure risk assessment Jobs for R-usersJunior Data Scientist / Quantitative economistSenior Quantitative AnalystR programmerData Scientist – CGIAR Excellence in Agronomy (Ref No: DDG-R4D/DS/1/CG/EA/06/20)Data Analytics Auditor, Future of Audit Lead @ London or Newcastle python-bloggers.com (python/data-science news)Python Musings #7: Simulating FSAs in lieu of real postal code data.Binomial Distribution and Binomial Test in Python3 Ways To Perform Quick Exploratory Data Analysis in PythonUsing the data algebra for Statistics and Data Sciencecalmcode.io > video tutorials for open source toolsApache Kafka in Python: How to Stream Data With Producers and ConsumersClassification using linear regression Full list of contributing R-bloggers Archives Archives Select Month October 2021  (3) September 2021  (184) August 2021  (145) July 2021  (167) June 2021  (195) May 2021  (196) April 2021  (183) March 2021  (215) February 2021  (218) January 2021  (242) December 2020  (284) November 2020  (256) October 2020  (268) September 2020  (242) August 2020  (218) July 2020  (259) June 2020  (227) May 2020  (326) April 2020  (327) March 2020  (279) February 2020  (261) January 2020  (253) December 2019  (244) November 2019  (219) October 2019  (233) September 2019  (233) August 2019  (273) July 2019  (260) June 2019  (245) May 2019  (277) April 2019  (293) March 2019  (308) February 2019  (262) January 2019  (287) December 2018  (257) November 2018  (289) October 2018  (308) September 2018  (291) August 2018  (270) July 2018  (333) June 2018  (298) May 2018  (321) April 2018  (301) March 2018  (291) February 2018  (241) January 2018  (330) December 2017  (261) November 2017  (270) October 2017  (290) September 2017  (294) August 2017  (340) July 2017  (283) June 2017  (317) May 2017  (349) April 2017  (324) March 2017  (365) February 2017  (317) January 2017  (367) December 2016  (347) November 2016  (294) October 2016  (306) September 2016  (254) August 2016  (287) July 2016  (327) June 2016  (263) May 2016  (292) April 2016  (260) March 2016  (302) February 2016  (268) January 2016  (337) December 2015  (304) November 2015  (234) October 2015  (259) September 2015  (238) August 2015  (264) July 2015  (243) June 2015  (213) May 2015  (235) April 2015  (211) March 2015  (259) February 2015  (212) January 2015  (245) December 2014  (236) November 2014  (221) October 2014  (218) September 2014  (259) August 2014  (217) July 2014  (235) June 2014  (241) May 2014  (243) April 2014  (260) March 2014  (289) February 2014  (269) January 2014  (263) December 2013  (264) November 2013  (241) October 2013  (234) September 2013  (215) August 2013  (223) July 2013  (254) June 2013  (272) May 2013  (260) April 2013  (279) March 2013  (277) February 2013  (294) January 2013  (343) December 2012  (308) November 2012  (277) October 2012  (308) September 2012  (270) August 2012  (263) July 2012  (247) June 2012  (298) May 2012  (287) April 2012  (295) March 2012  (304) February 2012  (264) January 2012  (280) December 2011  (251) November 2011  (261) October 2011  (281) September 2011  (187) August 2011  (258) July 2011  (219) June 2011  (225) May 2011  (239) April 2011  (268) March 2011  (249) February 2011  (205) January 2011  (209) December 2010  (188) November 2010  (172) October 2010  (219) September 2010  (185) August 2010  (203) July 2010  (175) June 2010  (167) May 2010  (164) April 2010  (152) March 2010  (165) February 2010  (135) January 2010  (121) December 2009  (126) November 2009  (66) October 2009  (87) September 2009  (65) August 2009  (56) July 2009  (64) June 2009  (54) May 2009  (35) April 2009  (38) March 2009  (40) February 2009  (33) January 2009  (42) December 2008  (16) November 2008  (14) October 2008  (10) September 2008  (8) August 2008  (11) July 2008  (7) June 2008  (8) May 2008  (8) April 2008  (4) March 2008  (5) February 2008  (6) January 2008  (10) December 2007  (3) November 2007  (5) October 2007  (9) September 2007  (7) August 2007  (21) July 2007  (9) June 2007  (3) May 2007  (3) April 2007  (1) March 2007  (5) February 2007  (4) November 2006  (1) October 2006  (2) August 2006  (3) July 2006  (1) June 2006  (1) May 2006  (3) April 2006  (1) March 2006  (1) February 2006  (5) January 2006  (1) October 2005  (1) September 2005  (3) May 2005  (1) /* <![CDATA[ */ (function() { var dropdown = document.getElementById( "archives-dropdown-3" ); function onSelectChange() { if ( dropdown.options[ dropdown.selectedIndex ].value !== '' ) { document.location.href = this.options[ this.selectedIndex ].value; } } dropdown.onchange = onSelectChange; })(); /* ]]> */ Other sites SAS blogs Jobs for R-users 
 
 Copyright © 2021 | MH Corporate basic by MH Themes 
 [{"@context":"https:\/\/schema.org","@graph":[{"@type":"Organization","@id":"https:\/\/www.r-bloggers.com#Organization","name":"R-bloggers","url":"https:\/\/www.r-bloggers.com","sameAs":[],"logo":{"@type":"ImageObject","url":"http:\/\/www.r-bloggers.com\/wp-content\/uploads\/2021\/05\/R_blogger_logo1_large.png","width":"1285","height":"369"},"contactPoint":{"@type":"ContactPoint","contactType":"technical support","telephone":"","url":"https:\/\/www.r-bloggers.com\/contact-us\/"}},{"@type":"WebSite","@id":"https:\/\/www.r-bloggers.com#website","headline":"R-bloggers","name":"R-bloggers","description":"R news and tutorials contributed by hundreds of R bloggers","url":"https:\/\/www.r-bloggers.com","potentialAction":{"@type":"SearchAction","target":"https:\/\/www.r-bloggers.com\/?s={search_term_string}","query-input":"required name=search_term_string"},"publisher":{"@id":"https:\/\/www.r-bloggers.com#Organization"}},{"@context":"https:\/\/schema.org","@type":"WebPage","@id":"https:\/\/www.r-bloggers.com\/2016\/05\/happy-new-year-mr-president-data-and-sentiment-analysis-of-presidential-new-year-speeches\/#webpage","name":"Happy New Year, Mr. President. Data and Sentiment Analysis of Presidential New Year Speeches","url":"https:\/\/www.r-bloggers.com\/2016\/05\/happy-new-year-mr-president-data-and-sentiment-analysis-of-presidential-new-year-speeches\/","lastReviewed":"2016-05-31T10:53:52-06:00","inLanguage":"en-US","description":"At a moment where many are preparing for the December 31st evening cocktail, the End of Year speech of the President of the Italian Republic is broadcast right on time at 8:30pm. A tradition which came to be with the constitutional establishment of the Italian Republic itself (or almost ), the year-end message has endured all trends and has survived the technological refoundation of the mediascape . Since the beginning it also imposed itself as a television format able to bring together millions of TV viewers regardless of the fact that they are often engrossed in final preparations for the evening&rsquo;s celebrations.It is not a concern to question at this time the convenience or lack thereof of such an annual occurrence nor, much less, the reasons which favor or exhaust the lengthening of this republican ritual . Advantage must simply be drawn from the fact that 67 years of presidential year-end well wishes form today a sufficiently rich documental corpus to become the object of data analysis. For over a decade, the statistical analysis of written documents has become a common practice and a consolidated scientific instrument (Jockers, 2014; Gries, 2013; Baayen, 2008). Although data analysis has been fully incorporated in the field of literary studies, little has been undertaken to investigate the textual or verbal production of public administration with equal quantitative rigor. This work contributes to filling the gap by exploring all the Italian Presidents' New Year speeches from 1949 to 2015 bringing the tools and methodologies of data science into the field of political studies. Two significant elements can then be drawn from the previous basic data: 1.2. Elocutionary evolutionsThe impact that the profound mutation of the media ecosystem has had in these last decades on the forms of oral and written expression in general could lead one to believe that a similar effect was impressed on the rhythm and speed of elocution of the Presidents. The progressive slipping of the dominating media (from newspapers to radio to TV to Internet to social media) as well as the changes endured by the various formats which tend to favor, more and more, forms of brief communication have spread in such a pervasive manner in every fold of society that it comes natural to speculate a similar transformation of the presidential elocution which reflects the passage of a sacred conception of the Presidency to a conception more in line with the zeitgeist. Actually, none of all this seems to apply to the presidential year-end addresses. In fact, instead of noticing an acceleration of the elocution, the contrary is observed: Presidents Gronchi, Segni, Saragat and Leone spoke in a much more rapid manner than Presidents Pertini, Cossiga, Scalfaro, Ciampi, Napolitano and Mattarella. Perhaps it is worthwhile to also note a detail: although all of the Presidents were seated to deliver their year-end well wishes, not all of them were so in the same manner. For the most part of the addresses, the Presidents were seated at their desk; Presidents Pertini, Scalfaro and Mattarella at times used an armchair in a Quirinale sitting room, without a desk. President Pertini in 1984 even sat next to a fireplace in a simple setting far from the formality and the golden palace adornments. In particular, in 2011 and 2012, President Napolitano sat in an informal way at the desk, sideways (and with his jacket unbuttoned in 2011). On these two occasions (2011 and 2012), the average of words spoken by minute increased from 110 to 120 , to indicate &mdash;but it is only a general indication whose orientation should be followed over the years&mdash; that mutations in the setting of the year-end speech could have an impact on the locution. The study of the absolute frequency of words also provides clear indications on the overall landscape of the presidential well wishes. These appear as an expression of unity for the country, actual or hoped for, of gathering around shared patriotic symbols, and of celebration if not of construction of the national narration . But not all Presidents insist in the same way on the same themes. Beyond the points of convergence, the lexical ecosystem of each President varies greatly in respect to the overall &lsquo;average&rsquo; illustrating specific and multifaceted thematic geographies. The wordclouds highlight well the personal worries and the current trends which hold in a differentiated way the attention of this or that President. Besides the obvious expressions and clich&eacute;s typical of year-end speeches (such as, for example, &lsquo;happy year&rsquo;, &lsquo;new year&rsquo;, &lsquo;this year&rsquo;) and the references to the nation (&lsquo;Italian people&rsquo;, &lsquo;national unity&rsquo;, &lsquo;common good&rsquo;, &lsquo;constitutional charter&rsquo;), spotting some unexpected expressions among the most cited may arouse surprise. Without a quantitative analysis of the language, it is difficult, for example, to realize how much these messages are self-referential with a strong recurrence of expressions such as &lsquo;president republic&rsquo; , &lsquo;head of state&rsquo;, &lsquo;I would like to say&rsquo; (vorrei dire), or how much &lsquo;armed forces&rsquo; and &lsquo;law enforcement&rsquo; are found in the well wishes. Additionally, the analysis of the n-grams removes every doubt on the themes of central importance for Italy in these almost seventy years of contemporary history. &lsquo;European union&rsquo;, &lsquo;united nations&rsquo;, &lsquo;international community&rsquo; and &lsquo;middle east&rsquo; recall the inclusion of Italy in the network of international relationships but also of the geo-political problems on a large scale. In the same way, expressions like &lsquo;social justice&rsquo;, &lsquo;social economic&rsquo;, &lsquo;public debt&rsquo; or &lsquo;organized crime&rsquo; allude to internal problems which have marked the recent history of the country. Finally, we can reasonably ask if the presence of &lsquo;john paul&rsquo; and &lsquo;paul ii&rsquo; among the most used bigrams do not suggest proximity &mdash;perhaps even more spiritual than geographical&mdash; between the Quirinale and the Vatican. After all, in the period of the 67 years analysed here, the trigram &lsquo;help from god&rsquo; appears more times than &lsquo;jobs&rsquo;&hellip;Purely for example, here is a partial and selective list of trigrams stated at least 10 times. 5.2. Work and workers 5.3. Young people 5.4. Culture 5.5. Terrorism and terror 5.6. Reforms 5.7. Homeland It should be stressed that in each of these seven examples, the difference of relative frequency of use of the theme (lemma) between the Italian language in general (in those years) and the presidential year-end speeches is not fortuitous. The p-value of independence t-test is always lower than 0.001.From this type of analysis it is possible to verify, for example, that the theme of terrorism occupies a significant position of relevance for President Pertini, surely because his seven year term was, from this point of view, a difficult and tragic period for Italy, just as the issues of unemployment and young people were central to him. But it is also noticeable that, overall, for Italian Presidents, terrorism is written in the national historical memory as a phenomenon associated as much &mdash;if not more&mdash; to the late 1970s and early 80s as to the episodes of the last 10-15 years, from 2001 on. President Napolitano seems instead to be preoccupied not only by the theme of employment but also and above all by the question of the State reformation whereas he refers to the homeland only 4 times in 9 years; a theme that, instead, was special to Presidents Cossiga and Scalfaro. The theme of culture has mainly attracted the attention of Presidents Cossiga and Scalfaro. The statistical analysis should be further fine-tuned though to understand if they meant culture in the anthropological or artistic sense.Once the algorithm is established, this type of analysis has the advantage of being extendable to any topic, offering a historical reading rooted in quantified data and not only in the inspiration of the researcher. The comparison between the &ldquo;traditional&rdquo; socio-political analysis and the statistical reading of the data on themes such as mafia, north-south inequalities, migratory flows, innovation, to name just a few, would surely be instructive. However, for greater accuracy, these whole values (positive sum, negative sum and overall sum) are weighed by comparing them to the total number of words in the sentence. In this way 3 percentage values are obtained (positive and negative sentiments, and overall percentage). In combining the values of the single sentences per message and, later, combining the messages per president, granularity is somewhat lost but a clearer vision of the whole picture is acquired (particularly if a polynomial function is used to smooth the coarseness of the single values).For example, President Mattarella's year-end speech appears to be mainly positive even though there are distinctly negative statements. The sentiment analysis &mdash;which perhaps should be called opinion mining in this case&mdash; can also help in making visible underlying structures in the construction of the speeches.The following two graphs illustrate President Napolitano's year-end addresses in 2007 and 2011. A resemblance of the narrative structure is observed: after the beginning well wishes (which can be translated with a high positive sentiment index), the President evokes negative facts, thoughts, opinions, situations (this significantly decreases the overall index value) to then mark a high, expressing again clearly positive sentiments and opinions which slowly &ldquo;dull&rdquo; to the final wishes. In other words: after taking off at top speed, then suddenly the bad news arrives which is immediately counterbalanced, first by a few but strong very positive opinions, then by a long series of still positive expressions, up to the conclusion of the message which fosters a pronounced hope for the year to come. The long term analysis of the aggregated data per speech can benefit from this approach as well. Overall, the level of positive sentiment expressed in the year-end well wishes by all the Presidents does not vary much. Although some significant oscillations are observed year over year (with a maximum range of variation over the years between +28.5% in 2003 and +16.8% in 1981), the total trend remains stable &mdash;relative stability likely due, at least in part, to the characteristic of this particular communication exercise which tends to highlight the positive wishes and greetings repeated over and over during the speech. On the other hand, the proportion of negative sentiment grows over the course of the years, but with oscillations that seem to follow the evolutions of the economic and social crisis. In fact, it is possible to observe a rapid decline in the sentiments expressed between 1959 and 1980-1981 (practically a doubling of the negative lemmas), followed by a decrease in pessimism from 1981 to 2000, and again a progressive darkening of the skies from 2001-2002 on. The expression of the sentiments considered for each single president shows some variability, with President Pertini who, up to today, ranks at the extremes both for the highest percentage of negative sentiments (lemmas) and for the lowest percentage of those positive. Beyond the differences in Presidents&rsquo; personality, the historical period surely influenced the volume of the negative sentiments expressed by Presidents Leone and Pertini. For this same reason, it would be useful to closely look at the next year-end addresses to understand if the negative sentiments expressed by President Mattarella confirms a trend which seems to inaugurate with President Napolitano or if it is only an instance given the fact that up to now President Mattarella has only had one occasion to deliver his year-end wishes to the nation.","reviewedBy":{"@type":"Organization","name":"R-bloggers","url":"https:\/\/www.r-bloggers.com","logo":{"@type":"ImageObject","url":"http:\/\/www.r-bloggers.com\/wp-content\/uploads\/2021\/05\/R_blogger_logo1_large.png","width":"1285","height":"369"}},"primaryImageOfPage":{"@id":"https:\/\/www.r-bloggers.com\/2016\/05\/happy-new-year-mr-president-data-and-sentiment-analysis-of-presidential-new-year-speeches\/#primaryimage"},"mainContentOfPage":[[{"@context":"https:\/\/schema.org","@type":"SiteNavigationElement","@id":"https:\/\/www.r-bloggers.com\/#top nav","name":"Home","url":"https:\/\/www.r-bloggers.com"},{"@context":"https:\/\/schema.org","@type":"SiteNavigationElement","@id":"https:\/\/www.r-bloggers.com\/#top nav","name":"About","url":"http:\/\/www.r-bloggers.com\/about\/"},{"@context":"https:\/\/schema.org","@type":"SiteNavigationElement","@id":"https:\/\/www.r-bloggers.com\/#top nav","name":"RSS","url":"https:\/\/feeds.feedburner.com\/RBloggers"},{"@context":"https:\/\/schema.org","@type":"SiteNavigationElement","@id":"https:\/\/www.r-bloggers.com\/#top nav","name":"add your blog!","url":"http:\/\/www.r-bloggers.com\/add-your-blog\/"},{"@context":"https:\/\/schema.org","@type":"SiteNavigationElement","@id":"https:\/\/www.r-bloggers.com\/#top nav","name":"Learn R","url":"https:\/\/www.r-bloggers.com\/how-to-learn-r-2\/"},{"@context":"https:\/\/schema.org","@type":"SiteNavigationElement","@id":"https:\/\/www.r-bloggers.com\/#top nav","name":"R jobs","url":"https:\/\/www.r-users.com\/"},{"@context":"https:\/\/schema.org","@type":"SiteNavigationElement","@id":"https:\/\/www.r-bloggers.com\/#top nav","name":"Submit a new job (it's free)","url":"https:\/\/www.r-users.com\/submit-job\/"},{"@context":"https:\/\/schema.org","@type":"SiteNavigationElement","@id":"https:\/\/www.r-bloggers.com\/#top nav","name":"Browse latest jobs (also free)","url":"https:\/\/www.r-users.com\/"},{"@context":"https:\/\/schema.org","@type":"SiteNavigationElement","@id":"https:\/\/www.r-bloggers.com\/#top nav","name":"Contact us","url":"http:\/\/www.r-bloggers.com\/contact-us\/"}]],"isPartOf":{"@id":"https:\/\/www.r-bloggers.com#website"},"breadcrumb":{"@id":"https:\/\/www.r-bloggers.com\/2016\/05\/happy-new-year-mr-president-data-and-sentiment-analysis-of-presidential-new-year-speeches\/#breadcrumb"}},{"@type":"BreadcrumbList","@id":"https:\/\/www.r-bloggers.com\/2016\/05\/happy-new-year-mr-president-data-and-sentiment-analysis-of-presidential-new-year-speeches\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"https:\/\/www.r-bloggers.com","name":"R-bloggers"}},{"@type":"ListItem","position":2,"item":{"@id":"https:\/\/www.r-bloggers.com\/category\/r-bloggers\/","name":"R bloggers"}},{"@type":"ListItem","position":3,"item":{"@id":"https:\/\/www.r-bloggers.com\/2016\/05\/happy-new-year-mr-president-data-and-sentiment-analysis-of-presidential-new-year-speeches\/","name":"Happy New Year, Mr. President. Data and Sentiment Analysis of Presidential New Year Speeches"}}]},{"@type":"Article","@id":"https:\/\/www.r-bloggers.com\/2016\/05\/happy-new-year-mr-president-data-and-sentiment-analysis-of-presidential-new-year-speeches\/#Article","url":"https:\/\/www.r-bloggers.com\/2016\/05\/happy-new-year-mr-president-data-and-sentiment-analysis-of-presidential-new-year-speeches\/","inLanguage":"en-US","mainEntityOfPage":"https:\/\/www.r-bloggers.com\/2016\/05\/happy-new-year-mr-president-data-and-sentiment-analysis-of-presidential-new-year-speeches\/#webpage","headline":"Happy New Year, Mr. President. Data and Sentiment Analysis of Presidential New Year Speeches","description":"At a moment where many are preparing for the December 31st evening cocktail, the End of Year speech of the President of the Italian Republic is broadcast right on time at 8:30pm. A tradition which came to be with the constitutional establishment of the Italian Republic itself (or almost ), the year-end message has endured all trends and has survived the technological refoundation of the mediascape . Since the beginning it also imposed itself as a television format able to bring together millions of TV viewers regardless of the fact that they are often engrossed in final preparations for the evening&rsquo;s celebrations.It is not a concern to question at this time the convenience or lack thereof of such an annual occurrence nor, much less, the reasons which favor or exhaust the lengthening of this republican ritual . Advantage must simply be drawn from the fact that 67 years of presidential year-end well wishes form today a sufficiently rich documental corpus to become the object of data analysis. For over a decade, the statistical analysis of written documents has become a common practice and a consolidated scientific instrument (Jockers, 2014; Gries, 2013; Baayen, 2008). Although data analysis has been fully incorporated in the field of literary studies, little has been undertaken to investigate the textual or verbal production of public administration with equal quantitative rigor. This work contributes to filling the gap by exploring all the Italian Presidents' New Year speeches from 1949 to 2015 bringing the tools and methodologies of data science into the field of political studies. Two significant elements can then be drawn from the previous basic data: 1.2. Elocutionary evolutionsThe impact that the profound mutation of the media ecosystem has had in these last decades on the forms of oral and written expression in general could lead one to believe that a similar effect was impressed on the rhythm and speed of elocution of the Presidents. The progressive slipping of the dominating media (from newspapers to radio to TV to Internet to social media) as well as the changes endured by the various formats which tend to favor, more and more, forms of brief communication have spread in such a pervasive manner in every fold of society that it comes natural to speculate a similar transformation of the presidential elocution which reflects the passage of a sacred conception of the Presidency to a conception more in line with the zeitgeist. Actually, none of all this seems to apply to the presidential year-end addresses. In fact, instead of noticing an acceleration of the elocution, the contrary is observed: Presidents Gronchi, Segni, Saragat and Leone spoke in a much more rapid manner than Presidents Pertini, Cossiga, Scalfaro, Ciampi, Napolitano and Mattarella. Perhaps it is worthwhile to also note a detail: although all of the Presidents were seated to deliver their year-end well wishes, not all of them were so in the same manner. For the most part of the addresses, the Presidents were seated at their desk; Presidents Pertini, Scalfaro and Mattarella at times used an armchair in a Quirinale sitting room, without a desk. President Pertini in 1984 even sat next to a fireplace in a simple setting far from the formality and the golden palace adornments. In particular, in 2011 and 2012, President Napolitano sat in an informal way at the desk, sideways (and with his jacket unbuttoned in 2011). On these two occasions (2011 and 2012), the average of words spoken by minute increased from 110 to 120 , to indicate &mdash;but it is only a general indication whose orientation should be followed over the years&mdash; that mutations in the setting of the year-end speech could have an impact on the locution. The study of the absolute frequency of words also provides clear indications on the overall landscape of the presidential well wishes. These appear as an expression of unity for the country, actual or hoped for, of gathering around shared patriotic symbols, and of celebration if not of construction of the national narration . But not all Presidents insist in the same way on the same themes. Beyond the points of convergence, the lexical ecosystem of each President varies greatly in respect to the overall &lsquo;average&rsquo; illustrating specific and multifaceted thematic geographies. The wordclouds highlight well the personal worries and the current trends which hold in a differentiated way the attention of this or that President. Besides the obvious expressions and clich&eacute;s typical of year-end speeches (such as, for example, &lsquo;happy year&rsquo;, &lsquo;new year&rsquo;, &lsquo;this year&rsquo;) and the references to the nation (&lsquo;Italian people&rsquo;, &lsquo;national unity&rsquo;, &lsquo;common good&rsquo;, &lsquo;constitutional charter&rsquo;), spotting some unexpected expressions among the most cited may arouse surprise. Without a quantitative analysis of the language, it is difficult, for example, to realize how much these messages are self-referential with a strong recurrence of expressions such as &lsquo;president republic&rsquo; , &lsquo;head of state&rsquo;, &lsquo;I would like to say&rsquo; (vorrei dire), or how much &lsquo;armed forces&rsquo; and &lsquo;law enforcement&rsquo; are found in the well wishes. Additionally, the analysis of the n-grams removes every doubt on the themes of central importance for Italy in these almost seventy years of contemporary history. &lsquo;European union&rsquo;, &lsquo;united nations&rsquo;, &lsquo;international community&rsquo; and &lsquo;middle east&rsquo; recall the inclusion of Italy in the network of international relationships but also of the geo-political problems on a large scale. In the same way, expressions like &lsquo;social justice&rsquo;, &lsquo;social economic&rsquo;, &lsquo;public debt&rsquo; or &lsquo;organized crime&rsquo; allude to internal problems which have marked the recent history of the country. Finally, we can reasonably ask if the presence of &lsquo;john paul&rsquo; and &lsquo;paul ii&rsquo; among the most used bigrams do not suggest proximity &mdash;perhaps even more spiritual than geographical&mdash; between the Quirinale and the Vatican. After all, in the period of the 67 years analysed here, the trigram &lsquo;help from god&rsquo; appears more times than &lsquo;jobs&rsquo;&hellip;Purely for example, here is a partial and selective list of trigrams stated at least 10 times. 5.2. Work and workers 5.3. Young people 5.4. Culture 5.5. Terrorism and terror 5.6. Reforms 5.7. Homeland It should be stressed that in each of these seven examples, the difference of relative frequency of use of the theme (lemma) between the Italian language in general (in those years) and the presidential year-end speeches is not fortuitous. The p-value of independence t-test is always lower than 0.001.From this type of analysis it is possible to verify, for example, that the theme of terrorism occupies a significant position of relevance for President Pertini, surely because his seven year term was, from this point of view, a difficult and tragic period for Italy, just as the issues of unemployment and young people were central to him. But it is also noticeable that, overall, for Italian Presidents, terrorism is written in the national historical memory as a phenomenon associated as much &mdash;if not more&mdash; to the late 1970s and early 80s as to the episodes of the last 10-15 years, from 2001 on. President Napolitano seems instead to be preoccupied not only by the theme of employment but also and above all by the question of the State reformation whereas he refers to the homeland only 4 times in 9 years; a theme that, instead, was special to Presidents Cossiga and Scalfaro. The theme of culture has mainly attracted the attention of Presidents Cossiga and Scalfaro. The statistical analysis should be further fine-tuned though to understand if they meant culture in the anthropological or artistic sense.Once the algorithm is established, this type of analysis has the advantage of being extendable to any topic, offering a historical reading rooted in quantified data and not only in the inspiration of the researcher. The comparison between the &ldquo;traditional&rdquo; socio-political analysis and the statistical reading of the data on themes such as mafia, north-south inequalities, migratory flows, innovation, to name just a few, would surely be instructive. However, for greater accuracy, these whole values (positive sum, negative sum and overall sum) are weighed by comparing them to the total number of words in the sentence. In this way 3 percentage values are obtained (positive and negative sentiments, and overall percentage). In combining the values of the single sentences per message and, later, combining the messages per president, granularity is somewhat lost but a clearer vision of the whole picture is acquired (particularly if a polynomial function is used to smooth the coarseness of the single values).For example, President Mattarella's year-end speech appears to be mainly positive even though there are distinctly negative statements. The sentiment analysis &mdash;which perhaps should be called opinion mining in this case&mdash; can also help in making visible underlying structures in the construction of the speeches.The following two graphs illustrate President Napolitano's year-end addresses in 2007 and 2011. A resemblance of the narrative structure is observed: after the beginning well wishes (which can be translated with a high positive sentiment index), the President evokes negative facts, thoughts, opinions, situations (this significantly decreases the overall index value) to then mark a high, expressing again clearly positive sentiments and opinions which slowly &ldquo;dull&rdquo; to the final wishes. In other words: after taking off at top speed, then suddenly the bad news arrives which is immediately counterbalanced, first by a few but strong very positive opinions, then by a long series of still positive expressions, up to the conclusion of the message which fosters a pronounced hope for the year to come. The long term analysis of the aggregated data per speech can benefit from this approach as well. Overall, the level of positive sentiment expressed in the year-end well wishes by all the Presidents does not vary much. Although some significant oscillations are observed year over year (with a maximum range of variation over the years between +28.5% in 2003 and +16.8% in 1981), the total trend remains stable &mdash;relative stability likely due, at least in part, to the characteristic of this particular communication exercise which tends to highlight the positive wishes and greetings repeated over and over during the speech. On the other hand, the proportion of negative sentiment grows over the course of the years, but with oscillations that seem to follow the evolutions of the economic and social crisis. In fact, it is possible to observe a rapid decline in the sentiments expressed between 1959 and 1980-1981 (practically a doubling of the negative lemmas), followed by a decrease in pessimism from 1981 to 2000, and again a progressive darkening of the skies from 2001-2002 on. The expression of the sentiments considered for each single president shows some variability, with President Pertini who, up to today, ranks at the extremes both for the highest percentage of negative sentiments (lemmas) and for the lowest percentage of those positive. Beyond the differences in Presidents&rsquo; personality, the historical period surely influenced the volume of the negative sentiments expressed by Presidents Leone and Pertini. For this same reason, it would be useful to closely look at the next year-end addresses to understand if the negative sentiments expressed by President Mattarella confirms a trend which seems to inaugurate with President Napolitano or if it is only an instance given the fact that up to now President Mattarella has only had one occasion to deliver his year-end wishes to the nation.","articleBody":"Salvino A. Salvaggio At a moment where many are preparing for the December 31st evening cocktail, the End of Year speech of the President of the Italian Republic is broadcast right on time at 8:30pm. A tradition which came to be with the constitutional establishment of the Italian Republic itself (or almost ), the year-end message has endured all trends and has survived the technological refoundation of the mediascape . Since the beginning it also imposed itself as a television format able to bring together millions of TV viewers regardless of the fact that they are often engrossed in final preparations for the evening&rsquo;s celebrations.It is not a concern to question at this time the convenience or lack thereof of such an annual occurrence nor, much less, the reasons which favor or exhaust the lengthening of this republican ritual . Advantage must simply be drawn from the fact that 67 years of presidential year-end well wishes form today a sufficiently rich documental corpus to become the object of data analysis. For over a decade, the statistical analysis of written documents has become a common practice and a consolidated scientific instrument (Jockers, 2014; Gries, 2013; Baayen, 2008). Although data analysis has been fully incorporated in the field of literary studies, little has been undertaken to investigate the textual or verbal production of public administration with equal quantitative rigor. This work contributes to filling the gap by exploring all the Italian Presidents' New Year speeches from 1949 to 2015 bringing the tools and methodologies of data science into the field of political studies.1. Style and elocutionFirst of all, we must note that not all the Presidents of the Italian Republic have addressed the Nation seven times for the year-end wishes. Luigi Einaudi remained in office for 6 years, Antonio Segni for 2 years, Giorgio Napolitano for 9 (a first mandate of 7 years and a second he resigned from after 2 years) and Sergio Mattarella has taken on the New Year&rsquo;s Eve practice only once to date. Three types of data are of immediate help:If the total number of words spoken is affected by the number of years in office, the average number of words\/speech provides a better indication on the more modest and the more loquacious Presidents. The average number of words\/phrase helps to understand the linguistic style of each President. From the average number of words spoken per minute, it is possible to derive a valid idea of the rhythm and speed of elocution.PresidentNew Year Speeches&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Total words&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Words by speech&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Words by sentence&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Words by minuteLuigi Einaudi6121020242116Giovanni Gronchi7582183246139Antonio Segni2179789849126Giuseppe Saragat78471121032132Giovanni Leone77333104829142Sandro Pertini71470521011995Francesco Cossiga714131201938115Oscar Luigi Scalfaro724588351318110Carlo Azeglio Ciampi71260518011899Giorgio Napolitano920377226430122Sergio Mattarella12117211717106Two significant elements can then be drawn from the previous basic data:The mutations of the stylistic forms unique to each PresidentThe changes in elocution rhythms of each of them1.1. Stylistic mutationsThe stylistic mutations over the course of the history of the year-end speeches appear with great clarity. First of all, a progressive shortening of the sentences, almost split in half, is evident: from the approximately 42 words\/sentence between 1949-1968 to approximately 22 words in the seven year period of Presidents Ciampi and Scalfaro (with the exception of President Cossiga who used much longer sentences). Lately, President Napolitano reversed the trend, proposing a more sophisticated language founded on longer sentences than his predecessors (approximately 28 words\/sentence on average). Finally, in his first year-end address, President Mattarella constructed his speech on very brief sentences (17-18 words on average), which are sharp and of great impact, with a more journalistic style rather than institutional (similar to Presidents Ciampi, Scalfaro and Pertini).1.2. Elocutionary evolutionsThe impact that the profound mutation of the media ecosystem has had in these last decades on the forms of oral and written expression in general could lead one to believe that a similar effect was impressed on the rhythm and speed of elocution of the Presidents. The progressive slipping of the dominating media (from newspapers to radio to TV to Internet to social media) as well as the changes endured by the various formats which tend to favor, more and more, forms of brief communication have spread in such a pervasive manner in every fold of society that it comes natural to speculate a similar transformation of the presidential elocution which reflects the passage of a sacred conception of the Presidency to a conception more in line with the zeitgeist. Actually, none of all this seems to apply to the presidential year-end addresses. In fact, instead of noticing an acceleration of the elocution, the contrary is observed: Presidents Gronchi, Segni, Saragat and Leone spoke in a much more rapid manner than Presidents Pertini, Cossiga, Scalfaro, Ciampi, Napolitano and Mattarella. Perhaps it is worthwhile to also note a detail: although all of the Presidents were seated to deliver their year-end well wishes, not all of them were so in the same manner. For the most part of the addresses, the Presidents were seated at their desk; Presidents Pertini, Scalfaro and Mattarella at times used an armchair in a Quirinale sitting room, without a desk. President Pertini in 1984 even sat next to a fireplace in a simple setting far from the formality and the golden palace adornments. In particular, in 2011 and 2012, President Napolitano sat in an informal way at the desk, sideways (and with his jacket unbuttoned in 2011). On these two occasions (2011 and 2012), the average of words spoken by minute increased from 110 to 120 , to indicate &mdash;but it is only a general indication whose orientation should be followed over the years&mdash; that mutations in the setting of the year-end speech could have an impact on the locution.2. LengthAlthough the seven year term of President Scalfaro is characterized by the most rambling year-end speeches of the whole history of the Italian Republic (with an all time record of 5,013 words spoken on December 31, 1997), a trend to the lengthening of the well-wishing message is undeniable, from an average of less than 500 words\/speech before 1960 to an average of more than 1,500 words after 1980 . This increasing trend, however, shows a setback in 1999-2000 and marks a slight about turn in the last 15 years, with speeches that count, for the most part, between approximately 1,800 and 2,250 words. 3. FrequencyWith this type of public speech that TV broadcast makes available to all in a sort of formal and recurrent celebration (defined by President Saragat a &ldquo;spiritual communion for the entire nation&rdquo; in 1964), the choice and use of terms spoken by the Presidents are certainly not by chance. After all, since the early years, the year-end presidential addresses were the object of interpretation and analysis in fine detail on behalf of journalists, analysts and politicians, besides being followed by a very wide audience. It therefore is useful to highlight the words and, behind them, the themes used with the greatest frequency by the Presidents in attempting to outline a map of historically relevant topics or of personal interest to each speaker.For the totality of year-end well wishes delivered by all the Presidents, it is not surprising to see that Italy represents the main and dominant theme , together with the final balance of the year and with suggestions, proposals, wishes for the new year. Peace and young people also occupy a prominent position in the presidential well wishes, but also politics, Europe, freedom and employment are topics that many Presidents have taken on, on December 31.The study of the absolute frequency of words also provides clear indications on the overall landscape of the presidential well wishes. These appear as an expression of unity for the country, actual or hoped for, of gathering around shared patriotic symbols, and of celebration if not of construction of the national narration . But not all Presidents insist in the same way on the same themes. Beyond the points of convergence, the lexical ecosystem of each President varies greatly in respect to the overall &lsquo;average&rsquo; illustrating specific and multifaceted thematic geographies. The wordclouds highlight well the personal worries and the current trends which hold in a differentiated way the attention of this or that President.Presidente L. EinaudiPresidente G. GronchiPresidente A. SegniPresidente G. SaragatPresidente G. LeonePresidente S. PertiniPresidente F. CossigaPresidente O. L. ScalfaroPresidente C. A. CiampiPresidente G. NapolitanoPresidente S. Mattarella4. Words associationThe identification of structures of association (words which are often used together), in pairs (bi-grams) or in longer structures (tri-grams or n-grams), is a pillar in the processing and analysis of contents in natural language.Besides the obvious expressions and clich&eacute;s typical of year-end speeches (such as, for example, &lsquo;happy year&rsquo;, &lsquo;new year&rsquo;, &lsquo;this year&rsquo;) and the references to the nation (&lsquo;Italian people&rsquo;, &lsquo;national unity&rsquo;, &lsquo;common good&rsquo;, &lsquo;constitutional charter&rsquo;), spotting some unexpected expressions among the most cited may arouse surprise. Without a quantitative analysis of the language, it is difficult, for example, to realize how much these messages are self-referential with a strong recurrence of expressions such as &lsquo;president republic&rsquo; , &lsquo;head of state&rsquo;, &lsquo;I would like to say&rsquo; (vorrei dire), or how much &lsquo;armed forces&rsquo; and &lsquo;law enforcement&rsquo; are found in the well wishes. Additionally, the analysis of the n-grams removes every doubt on the themes of central importance for Italy in these almost seventy years of contemporary history. &lsquo;European union&rsquo;, &lsquo;united nations&rsquo;, &lsquo;international community&rsquo; and &lsquo;middle east&rsquo; recall the inclusion of Italy in the network of international relationships but also of the geo-political problems on a large scale. In the same way, expressions like &lsquo;social justice&rsquo;, &lsquo;social economic&rsquo;, &lsquo;public debt&rsquo; or &lsquo;organized crime&rsquo; allude to internal problems which have marked the recent history of the country. Finally, we can reasonably ask if the presence of &lsquo;john paul&rsquo; and &lsquo;paul ii&rsquo; among the most used bigrams do not suggest proximity &mdash;perhaps even more spiritual than geographical&mdash; between the Quirinale and the Vatican. After all, in the period of the 67 years analysed here, the trigram &lsquo;help from god&rsquo; appears more times than &lsquo;jobs&rsquo;&hellip;Purely for example, here is a partial and selective list of trigrams stated at least 10 times.FrequencyTriGram45forze dell ordine44capo dello stato43il popolo italiano36del nostro paese36per la pace25presidente della repubblica24tutti gli italiani24tutti i cittadini21senso di responsabilit&agrave;19la libert&agrave; e16il capo dello14il mio pensiero14le forze politiche13contro il terrorismo13economico e sociale13giovanni paolo ii13presidente del consiglio12della nostra societ&agrave;12il bene comune11aiuto di dio11pace nel mondo11per la giustizia10dell unione europea10della persona umana10delle nazioni unite10posti di lavoro 5. ThemesAs already seen, the historical period, the major events, national or international, the set of most acute problems, the plights faced by the government institutions or by the population, the particular interests of each President have all a considerable impact on the choice of terminology adopted in the year-end well wishes speeches. In order to illustrate this selection let&rsquo;s focus on examples relative to seven specific themes :unemploymentwork and workersyoung peoplecultureterrorism and terrorreformshomeland Presented as graphs (titled Frequency of theme in each speech), the how and how much Presidents evoke a specific theme in the chain of the 67 year-end addresses is better perceived. Each graph photographs a topic and indicates the number of times that such theme is cited, overall, in each particular message. For example, the first graph pertaining to unemployment shows that the term was used six times in the year-end message of 1984 and 5 times in 1979, 1981, 1983 (President Sandro Pertini) or 4 times in 1992 (President Scalfaro).This, however, provides only half of the analysis. The significance of a theme is not measured only by the overall absolute frequency of the relevant term in the single speeches but also by the relative frequency of the term in the message compared to the average use of the same term in the Italian language in general in the same historical period or year. And that comparison is given in the second graph (entitled Relative frequencies of theme).5.1. Unemployment5.2. Work and workers5.3. Young people5.4. Culture5.5. Terrorism and terror5.6. Reforms5.7. HomelandIt should be stressed that in each of these seven examples, the difference of relative frequency of use of the theme (lemma) between the Italian language in general (in those years) and the presidential year-end speeches is not fortuitous. The p-value of independence t-test is always lower than 0.001.From this type of analysis it is possible to verify, for example, that the theme of terrorism occupies a significant position of relevance for President Pertini, surely because his seven year term was, from this point of view, a difficult and tragic period for Italy, just as the issues of unemployment and young people were central to him. But it is also noticeable that, overall, for Italian Presidents, terrorism is written in the national historical memory as a phenomenon associated as much &mdash;if not more&mdash; to the late 1970s and early 80s as to the episodes of the last 10-15 years, from 2001 on. President Napolitano seems instead to be preoccupied not only by the theme of employment but also and above all by the question of the State reformation whereas he refers to the homeland only 4 times in 9 years; a theme that, instead, was special to Presidents Cossiga and Scalfaro. The theme of culture has mainly attracted the attention of Presidents Cossiga and Scalfaro. The statistical analysis should be further fine-tuned though to understand if they meant culture in the anthropological or artistic sense.Once the algorithm is established, this type of analysis has the advantage of being extendable to any topic, offering a historical reading rooted in quantified data and not only in the inspiration of the researcher. The comparison between the &ldquo;traditional&rdquo; socio-political analysis and the statistical reading of the data on themes such as mafia, north-south inequalities, migratory flows, innovation, to name just a few, would surely be instructive.6. Sentiment analysisThe statistical analysis of sentiment was developed on the basis of a combination of quantitative methodologies aiming to the measurement, quantification and classification of opinions and sentiments expressed in documents (textual corpus) through words which have a positive, negative or neutral semantic connotation. For example, in function of the lexical composition of the text, the sentence &ldquo;Last quarter the European economy has benefitted from the favorable price of oil&rdquo; would be classified as positive, when the phrase &ldquo;In the same period the labor market has continued to suffer, penalizing particularly young people.&rdquo; would be considered negative. In the recent years, the development of the discipline has experienced a strong acceleration fuelled by the desire to better understand the evolution of various types of content published by hundreds of millions of social media users (regardless of the difficulties given by the automatic tracking of sentiments in brief texts; Thelwall, 2010) and by the uncountable websites that offer users the possibility to publish review of products and services (Galitsky, 2009; Cataldi and al., 2013).Normally used for scientific purposes but also to improve marketing efficiency and expand business opportunities , sentiment analysis applied to historical, administrative or institutional documents still remains embryonic, above all in the case of documents written in the Italian language. Consequently, inquiring whether the &ldquo;truth&rdquo; of the Presidential year-end speeches in Italy lies as much in the analysis of the data behind them as in the more traditional political analysis can only stimulate an innovative line of research and trigger considerations rooted in the extension of data sciences to the study of governments and institutions.The first step in carrying out the sentiment analysis of the Presidential messages consists of reducing the lexical complexity through the lemmatization of the text, that is the substitution of each term used with its lemma of reference. For example, the last sentence of the first year-end address by President Einaudi in 1949, from &ldquo;such I am sure is the common vote and such is my personal wish which is directed heartfelt and with affection at this hour to each Italian in and out of the boundaries of the country&rdquo; becomes &ldquo;such to be sure to be the common vote and such to be my personal wish which to direct heartfelt and with affection at the hour to each Italian in and out of the boundary of the country&rdquo;. This makes easier the management of the dictionaries (words lists) that, through various simplifications, do not need to comprise the plurals, conjugated or derived forms but can be limited to citing only the infinitives or simple forms. For a basic sentiment analysis, once the speeches are lemmatized, a single positive value (+1) is associated to each term (lemma) if the term expresses a positive sentiment, opinion, attitude, concept; a single negative value (-1) if the lemma translates a negative sentiment, opinion, attitude, concept and a neutral value (0) for neutral terms (Vryniotis, 2013). After having summed up the values of the single words grouped by sentence, each sentence of each presidential speech can be characterized by 3 absolute values: the sum of the &ldquo;positive sentiments&rdquo; (expressed by means of a positive integer), the sum of the &ldquo;negative sentiments&rdquo; (expressed by means of a negative integer), the overall sum of the sentiments expressed in that sentence (translated into a positive or negative integer according to the dominant sentiments). The distribution of the values of the overall sums of sentiment shows that the year-end messages prevalently transmit positive concepts, opinions and sentiments. Since 1949 to present day, the sentences of the speeches are in fact positioned on the positive segment of the axis, with an average sentiment value of +3.7 and a median value of +3.However, for greater accuracy, these whole values (positive sum, negative sum and overall sum) are weighed by comparing them to the total number of words in the sentence. In this way 3 percentage values are obtained (positive and negative sentiments, and overall percentage). In combining the values of the single sentences per message and, later, combining the messages per president, granularity is somewhat lost but a clearer vision of the whole picture is acquired (particularly if a polynomial function is used to smooth the coarseness of the single values).For example, President Mattarella's year-end speech appears to be mainly positive even though there are distinctly negative statements.The sentiment analysis &mdash;which perhaps should be called opinion mining in this case&mdash; can also help in making visible underlying structures in the construction of the speeches.The following two graphs illustrate President Napolitano's year-end addresses in 2007 and 2011. A resemblance of the narrative structure is observed: after the beginning well wishes (which can be translated with a high positive sentiment index), the President evokes negative facts, thoughts, opinions, situations (this significantly decreases the overall index value) to then mark a high, expressing again clearly positive sentiments and opinions which slowly &ldquo;dull&rdquo; to the final wishes. In other words: after taking off at top speed, then suddenly the bad news arrives which is immediately counterbalanced, first by a few but strong very positive opinions, then by a long series of still positive expressions, up to the conclusion of the message which fosters a pronounced hope for the year to come.The long term analysis of the aggregated data per speech can benefit from this approach as well. Overall, the level of positive sentiment expressed in the year-end well wishes by all the Presidents does not vary much. Although some significant oscillations are observed year over year (with a maximum range of variation over the years between +28.5% in 2003 and +16.8% in 1981), the total trend remains stable &mdash;relative stability likely due, at least in part, to the characteristic of this particular communication exercise which tends to highlight the positive wishes and greetings repeated over and over during the speech. On the other hand, the proportion of negative sentiment grows over the course of the years, but with oscillations that seem to follow the evolutions of the economic and social crisis. In fact, it is possible to observe a rapid decline in the sentiments expressed between 1959 and 1980-1981 (practically a doubling of the negative lemmas), followed by a decrease in pessimism from 1981 to 2000, and again a progressive darkening of the skies from 2001-2002 on.The expression of the sentiments considered for each single president shows some variability, with President Pertini who, up to today, ranks at the extremes both for the highest percentage of negative sentiments (lemmas) and for the lowest percentage of those positive. Beyond the differences in Presidents&rsquo; personality, the historical period surely influenced the volume of the negative sentiments expressed by Presidents Leone and Pertini. For this same reason, it would be useful to closely look at the next year-end addresses to understand if the negative sentiments expressed by President Mattarella confirms a trend which seems to inaugurate with President Napolitano or if it is only an instance given the fact that up to now President Mattarella has only had one occasion to deliver his year-end wishes to the nation.7. ConclusionThis work provides unique insights into the institution&rsquo;s textual production and its variation over time in three manners:Descriptive statistics were used to quantify the way(s) each Italian President speaks to the Nation. Amongst others, it allowed differentiating elocutionary styles: crisper (202 words\/speech) or verbose (3,513 words\/speech), direct (17 words\/sentence) or convoluted (49 words\/sentence), slow (95 words\/minute) or fast (142 words\/minute), as well as variations to means. When applied to the time series, the descriptive analysis shows the mutations of the elocutionary styles over time and the fact that they are not always in line with the zeitgeist.Natural language processing methods highlighted the frequency and associations of single or groups of words. This was useful to extract the features of the New Year speeches overall but also the main interests of each President (with the oldest President in the history of the Italian Republic being the most worried about the future of the young generation). Quantified examples are given for 7 themes: unemployment, work\/job, youth, culture, terrorism, reform, and homeland. Absolute and relative frequencies of these themes were computed and compared to the average frequency of the same themes in the language overall for the same period. Supported by meaningful independence t-tests and confidence intervals, this approach showed the comparative evolution of the recurrence of the 7 topics. But it also showed it can be generalized to any theme.After having built a &ldquo;sentiment dictionary&rdquo;, quantitative sentiment analysis (opinion mining) has been applied to quantify the expression of ideas, opinions, and statements as positive or negative based on the wording. Relevant differences between Presidents emerge with, at the 2 extremes, President Pertini (18% positive sentiments against 9% negative) and President Gronchi (27% positive sentiments against 4.5% negative). Also, historical trends become more visible: towards more pessimism in the 1980s followed by a slightly stronger optimism in the 1990s and again more negative sentiments from 2000 onward. Sentiment analysis also made obvious that some Presidents built up their narratives following recurrent &ldquo;sentiment\/opinion patterns&rdquo;. The most evident case is President Napolitano that alternates good and bad news in such a specific manner that it becomes a pattern signature structuring some of his speeches.Although little has been done to date to incorporate data science in the field of textual analysis of political content, this work shows the early benefits of such an approach. Textual and verbal production of public administrations can be investigated with quantitative rigor opening new lines of research. Quantitative methods such as descriptive statistics, natural language processing, and sentiment analysis (opinion mining) prove to be highly valuable tools capable of bringing a strong contribution to enrich and enhance political sciences.&nbsp;ReferencesBaayen, R.H., (2008). Analyzing Linguistic Data, Cambridge University Press.Baccianella, S., Esuli, A. and Sebastiani, F. (2010). &ldquo;Sentiwordnet 3.0: An enhanced lexical resource for sentiment analysis and opinion mining&rdquo;, in Calzolari, N. and al., editor, Proceedings of LREC, 2200&ndash;2204. http:\/\/is.gd\/VLTKqBBasile, V. and Nissim, M. (14 June 2013). &ldquo;Sentiment analysis on Italian tweets&rdquo;, Proceedings of the 4th Workshop on Computational Approaches to Subjectivity, Sentiment and Social Media Analysis, 100&ndash;107. http:\/\/is.gd\/io82rBCasotto, P. (2012). Sentiment Analysis for the Italian Language, Tesi di Dottorato, Dipartimento di matematica e Informatica, Universita&rsquo; degli Studi di Udine.Cataldi, M., Ballatore, A., Tiddi, I., Aufaure, M.-A. (22 June 2013). &ldquo;Good location, terrible food: detecting feature sentiment in user-generated reviews&rdquo;, Social Network Analysis and Mining, 3 (4): 1149&ndash;1163. http:\/\/is.gd\/Tlp0FcCharpentier, A. (22 February 2016). &ldquo;Clusters of Texts&rdquo;, Freakonometrics. http:\/\/is.gd\/32mB13Davidov, D., Tsur, O, and Rappoport, A. (2010). &ldquo;Enhanced sentiment learning using twitter hashtags and smileys&rdquo;, Proceedings of the 23rd International Conference on Computational Linguistics, COLING &rsquo;10, 241&ndash;249, Stroudsburg, PA, USA.Galitsky, B. and McKenna, E.W. (12 November 2009). &ldquo;Sentiment Extraction from Consumer Reviews for Providing Product Recommendations&rdquo;, Patent US&ndash;20090282019-A1. http:\/\/is.gd\/ioVBsbGonzales-Ibanez, R., Muresan, S. and Wacholder, N. (June 2011). &ldquo;Identifying sarcasm in twitter: A closer look&rdquo;, Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, 581&ndash;586, Portland, OR, USA.Gries, S.Th. (2013). Statistics for Linguistics with R, Second Edition, De Gruyter Mouton, Berlin.Jockers, M.L., (2014). Text Analysis with R for Students of Literature, Springer.Kennette, L.N., Wurm, L.H. and Van Havermaet, L.R. (2010). &ldquo;Change detection: The effects of linguistic focus, hierarchical word level and proficiency&rdquo;, The Mental Lexicon, 5(1), 47&ndash;86.Kulkarni V., Rfou R., Perozzi B. and Skiena S. (2015). &ldquo;Statistically Significant Detection of Linguistic Change&rdquo;, Proceedings of the 24th International Conference on World Wide Web, 2015.Lebeau, J. (20 January 2016). &ldquo;State of the Union Speeches and Data&rdquo;, More or Less Numbers. http:\/\/is.gd\/NrJIRSLiu, B. (2012). Sentiment Analysis and Opinion Mining, Synthesis Lectures on Human Language Technologies, Morgan & Claypool Publishers.Lapowsky, I. (13 January 2016). &ldquo;The True Message of the State of the Union Is in the Data&rdquo;, WIRED. http:\/\/is.gd\/7ULEdCMani, I. (2010). The Imagined Moment. Time, Narrative, and Computation, University of Nebraska Press.Mejova, Y. (16 November 2009). Sentiment Analysis: An Overview. http:\/\/is.gd\/C1U9OJTaboada, M., Brooke, J., Tofiloski, M., Voll, K. and Stede, M. (June 2011). &ldquo;Lexicon-based methods for sentiment analysis&rdquo;, Comput. Linguist., 37(2):267&ndash;307.Thelwall, M., Buckley, K., Paltoglou, G., Cai, D., Kappas, A, (2010). &ldquo;Sentiment strength detection in short informal text&rdquo;, Journal of the American Society for Information Science and Technology, 61 (12): 2544&ndash;2558. http:\/\/is.gd\/yRnRCqVryniotis, V. (23 September 2013). &ldquo;The importance of Neutral Class in Sentiment Analysis&rdquo;, Machine Learning Blog & Software Development News. http:\/\/is.gd\/FidS0k&nbsp;Notes This document is the result of an analysis carried out by the author and reflects only and exclusively the opinions of the author. Therefore, this document does not involve in any way, neither directly nor indirectly, none of the employers, past or present, of the author. The author confirms that he has no conflict of interest, and has never worked, neither in a remunerated capacity nor gratuitously, for the President of the Italian Republic, and has never been appointed in any role or capacity by the Quirinale. Notwithstanding, the author informs the readers that he was honored with the title of Commander by the President of the Italian Republic (Decree August 1 2007). eMail: salvino salvaggio gmail com The Author thanks Paolo Barbesino, Paolo Gasparini, Gaetano Palumbo for the comments to the previous versions. The first year-end message was delivered by President Luigi Einaudi on December 31, 1948. Enrico de Nicola - elected interim President on June 28, 1946, then again June 26, 1947 after his resignation, and again President of the Italian Republic from January 1, 1948 - did not deliver any year-end wishes to the nation during his two years at the Quirinale. Printed paper, radio and film distribution of the Istituto Luce in the early years, live television from 1954 on. In fact, since his first appearance on TV in 1954, the program often opens with a wide view which captures a room in the Quirinale palace to then progressively zoom in on the framing of the bust and face of the President speaking to the nation looking directly into the camera. Record held by President Giorgio Napolitano watched by approximately 13 million viewers on December 31, 2014. A much formalized ritual, with few surprises or formal variations but also significant, as shown by the clustering text which is unable to isolate clear or specific groups (Charpentier, 2016). Highlighted by change point detection to identify not only one or more potential changes but also the moment in which they occur (Kulkarni and al, 2015; Kennette and al, 2010). The variation to the average is statistically significant and cannot therefore be attributed to chance (t-test). It would be useful &mdash;but unfortunately the information is not available&mdash; to know the average speed of elocution of the Italian population in general, year by year, from 1949 on to compare to the data of the presidential speeches. Also, data on duration of President Einaudi's speeches are not available. It is not therefore clear whether President Scalfaro was at the Quirinale for the message on December 31 1997 or not. p-value of t-test is approximately 0.00016. Precisely 481.8 words. With the significant exception of 1991, year in which President Cossiga went on TV to deliver his wishes saying that substantially he would not be saying anything else, all in just 419 words in less than 4 minutes. It must be noted that, from a statistical point of view, specifically the messages by Presidents Pertini and Scalfaro are the main contributors to general trend (regression). The terms &ldquo;italy&rdquo;, &ldquo;italians&rdquo; are pronounced almost 700 times in 67 messages. With words like italy, italians, young people, population, country, life, liberty, citizens, democracy, trust, responsibility. Natural Language Processing (NPL). Which in the statistical analysis stands for &lsquo;president of the republic&rsquo;. Obtained with AntCon 3.4.3 software. The themes where chosen without representativeness pretention. The following regex terms or expressions were used in the research of the occurrences: &lsquo;unemployment|underemployment&rsquo;, &lsquo;work&rsquo;, &lsquo;culture&rsquo;, &lsquo;terror&rsquo;, &lsquo;reform&rsquo;, &lsquo;bhomeland|patriotism|patriot|patriots&rsquo;, &lsquo;byoung people|youth|youthful|b&rsquo; This second analysis is made possible by Google Books which provides researchers with the frequency of all the words used in millions of books, year by year, language by language, from approximately 1500 to 2009. It is necessary to underline that the terminological quantification of the semantic linguistic corpus built by Google Books does not included texts published in mass media (newspapers, Internet) which might modify the frequency data adding a more pronounced component of modernity. Welch Method. Usually called sentiment analysis or opinion mining. See Mejova, 2009 for an overall description. For example to add quantitative depth to the literal analysis, or in a political setting to better understand the evolutions of the orientation of the electorate. To evaluate the level of adhesion to advertisements or specific brands. The easy availability of numerous English dictionaries of words associated to values of various sentiments and opinions has dynamized the research on English language contents (Baccianella et al., 2010; Gonzales-Ibanes and al., 2011; Liu, 2012). The same is taking place for Spanish and, in lesser degree, for other languages. In Italian, unfortunately, the availability of such instruments still suffers significant shortcomings and the laudable efforts of isolated researchers are not enough to bridge the double gap of, on one side, lists of words with the corresponding quantification of the positive or negative connotation and, on the other, of classifications of the same words per type of sentiment or opinion. Having a base dictionary available which signals the positive (+1) or negative (-1) value of an adjective is the first essential step for this approach. But also knowing if the same adjective belongs to a specific category of sentiment -for example anger, joy, sadness, fear, surprise, trust, etc.- makes it possible to enrich the analysis. In Italian, see for example the software sentiment-Italian-lang by Giuseppe Ragusa - https:\/\/github.com\/gragusa?tabrepositories, Casotto, P. (2012), Basile and Nissim (2013). For greater precision, the lemmas can be quantified on a real scale that includes the intermediate values between 0 and 1, 0 and -1. In this type of graph, the order of sequence of the phrases in the speech act as a temporal axis (x-axis)- this approach is usually defined as novelistic time (Mani, 2010). This should be verified in detail.","keywords":"","datePublished":"2016-05-31T10:53:52-06:00","dateModified":"2016-05-31T10:53:52-06:00","author":{"@type":"Person","name":"Salvino A. Salvaggio","description":"","url":"https:\/\/www.r-bloggers.com\/author\/salvino-a-salvaggio\/","sameAs":["http:\/\/www.salvaggio.net\/index.php"],"image":{"@type":"ImageObject","url":"https:\/\/secure.gravatar.com\/avatar\/0a79fd8e88d11697452df5da11fb8313?s=96&d=mm&r=g","height":96,"width":96}},"editor":{"@type":"Person","name":"Salvino A. Salvaggio","description":"","url":"https:\/\/www.r-bloggers.com\/author\/salvino-a-salvaggio\/","sameAs":["http:\/\/www.salvaggio.net\/index.php"],"image":{"@type":"ImageObject","url":"https:\/\/secure.gravatar.com\/avatar\/0a79fd8e88d11697452df5da11fb8313?s=96&d=mm&r=g","height":96,"width":96}},"publisher":{"@id":"https:\/\/www.r-bloggers.com#Organization"},"image":{"0":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/presidenti.jpg","width":0,"height":0,"@id":"https:\/\/www.r-bloggers.com\/2016\/05\/happy-new-year-mr-president-data-and-sentiment-analysis-of-presidential-new-year-speeches\/#primaryimage"},"1":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/stat_descr_2_en-1.png","width":0,"height":0},"2":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/mutamenti_stilistici_en-1.png","width":0,"height":0},"3":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/evoluzioni_elocutorie_1_en-1.png","width":0,"height":0},"4":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/evoluzioni_elocutorie_2_en-1.png","width":0,"height":0},"5":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/tricolore.jpg","width":0,"height":0},"6":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/stat_descr_3_en-1.png","width":0,"height":0},"7":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/freqterm_all_en-1.png","width":0,"height":0},"19":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/token_graph_en-1.png","width":0,"height":0},"20":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/quirinale.jpg","width":0,"height":0},"21":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/disoccupazione_en-1.png","width":0,"height":0},"22":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/disoccupazione_2_en-1.png","width":0,"height":0},"23":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/lavoro_en-1.png","width":0,"height":0},"24":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/lavoro_2_en-1.png","width":0,"height":0},"25":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/giovani_en-1.png","width":0,"height":0},"26":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/giovani_2_en-1.png","width":0,"height":0},"27":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/cultura_en-1.png","width":0,"height":0},"28":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/cultura_2_en-1.png","width":0,"height":0},"29":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/terrorismo_en-1.png","width":0,"height":0},"30":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/terrorismo_2_en-1.png","width":0,"height":0},"31":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/riforme_en-1.png","width":0,"height":0},"32":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/riforme_2_en-1.png","width":0,"height":0},"33":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/patria_en-1.png","width":0,"height":0},"34":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/patria_2_en-1.png","width":0,"height":0},"35":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/distribuzione_sentimenti_en-1.png","width":0,"height":0},"36":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/sentiment_mattarella_en-1.png","width":0,"height":0},"37":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/sentiment_napolitano2007_en-1.png","width":0,"height":0},"38":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/sentiment_napolitano2011_en-1.png","width":0,"height":0},"39":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/pos_sentiments_over_time_en-1.png","width":0,"height":0},"40":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/neg_sentiments_over_time_en-1.png","width":0,"height":0},"41":{"@type":"ImageObject","url":"http:\/\/www.salvaggio.net\/publications\/R-blog\/files\/sentiments_by_president_1_en-1.png","width":0,"height":0}},"isPartOf":{"@id":"https:\/\/www.r-bloggers.com\/2016\/05\/happy-new-year-mr-president-data-and-sentiment-analysis-of-presidential-new-year-speeches\/#webpage"}}]}] var snp_f = []; var snp_hostname = new RegExp(location.host); var snp_http = new RegExp("^(http|https)://", "i"); var snp_cookie_prefix = ''; var snp_separate_cookies = false; var snp_ajax_url = 'https://www.r-bloggers.com/wp-admin/admin-ajax.php'; var snp_ajax_nonce = 'b073c4a61d'; var snp_ignore_cookies = false; var snp_enable_analytics_events = true; var snp_enable_mobile = false; var snp_use_in_all = false; var snp_excluded_urls = []; Never miss an update! Subscribe to R-bloggers to receive e-mails with the latest R posts. (You will not see this message again.) Click here to close (This popup will not appear again) .snp-pop-109583 .snp-theme6 { max-width: 700px;} .snp-pop-109583 .snp-theme6 h1 {font-size: 17px;} .snp-pop-109583 .snp-theme6 { color: #a0a4a9;} .snp-pop-109583 .snp-theme6 .snp-field ::-webkit-input-placeholder { color: #a0a4a9;} .snp-pop-109583 .snp-theme6 .snp-field :-moz-placeholder { color: #a0a4a9;} .snp-pop-109583 .snp-theme6 .snp-field :-ms-input-placeholder { color: #a0a4a9;} .snp-pop-109583 .snp-theme6 .snp-field input { border: 1px solid #a0a4a9;} .snp-pop-109583 .snp-theme6 .snp-field { color: #000000;} .snp-pop-109583 .snp-theme6 { background: #f2f2f2;} jQuery(document).ready(function() { }); var CaptchaCallback = function() { jQuery('.g-recaptcha').each(function(index, el) { grecaptcha.render(el, { 'sitekey' : '' }); }); }; /* <![CDATA[ */!function(e,n){var r={"selectors":{"block":"pre","inline":"code"},"options":{"indent":4,"ampersandCleanup":true,"linehover":true,"rawcodeDbclick":false,"textOverflow":"scroll","linenumbers":false,"theme":"enlighter","language":"r","retainCssClasses":false,"collapse":false,"toolbarOuter":"","toolbarTop":"{BTN_RAW}{BTN_COPY}{BTN_WINDOW}{BTN_WEBSITE}","toolbarBottom":""},"resources":["https:\/\/www.r-bloggers.com\/wp-content\/plugins\/enlighter\/cache\/enlighterjs.min.css?4WJrVky+dDEQ83W","https:\/\/www.r-bloggers.com\/wp-content\/plugins\/enlighter\/resources\/enlighterjs\/enlighterjs.min.js"]},o=document.getElementsByTagName("head")[0],t=n&&(n.error||n.log)||function(){};e.EnlighterJSINIT=function(){!function(e,n){var r=0,l=null;function c(o){l=o,++r==e.length&&(!0,n(l))}e.forEach(function(e){switch(e.match(/\.([a-z]+)(?:[#?].*)?$/)[1]){case"js":var n=document.createElement("script");n.onload=function(){c(null)},n.onerror=c,n.src=e,n.async=!0,o.appendChild(n);break;case"css":var r=document.createElement("link");r.onload=function(){c(null)},r.onerror=c,r.rel="stylesheet",r.type="text/css",r.href=e,r.media="all",o.appendChild(r);break;default:t("Error: invalid file extension",e)}})}(r.resources,function(e){e?t("Error: failed to dynamically load EnlighterJS resources!",e):"undefined"!=typeof EnlighterJS?EnlighterJS.init(r.selectors.block,r.selectors.inline,r.options):t("Error: EnlighterJS resources not loaded yet!")})},(document.querySelector(r.selectors.block)||document.querySelector(r.selectors.inline))&&e.EnlighterJSINIT()}(window,console); /* ]]> */ window.FPConfig= { delay: 0, ignoreKeywords: ["\/wp-admin","\/wp-login.php","\/cart","add-to-cart","logout","#","?",".png",".jpeg",".jpg",".gif",".svg"], maxRPS: 3, hoverDelay: 50 }; _stq = window._stq || []; _stq.push([ 'view', {v:'ext',j:'1:7.3.3',blog:'11524731',post:'122663',tz:'-6',srv:'www.r-bloggers.com'} ]); _stq.push([ 'clickTrackerInit', '11524731', '122663' ]); jQuery(document).ready(function ($) { for (let i = 0; i < document.forms.length; ++i) { let form = document.forms[i]; if ($(form).attr("method") != "get") {$(form).append('<input type="hidden" name="LHfQMdbo_Al" value="8I4awxr7kvVDt" />'); } if ($(form).attr("method") != "get") {$(form).append('<input type="hidden" name="zxVu-DITS" value="Nce7adstg1[H]" />'); } if ($(form).attr("method") != "get") {$(form).append('<input type="hidden" name="fFcgQ_OCSUuEzl" value="DRK3bIW0w8L" />'); } } $(document).on('submit', 'form', function () { if ($(this).attr("method") != "get") { $(this).append('<input type="hidden" name="LHfQMdbo_Al" value="8I4awxr7kvVDt" />'); } if ($(this).attr("method") != "get") { $(this).append('<input type="hidden" name="zxVu-DITS" value="Nce7adstg1[H]" />'); } if ($(this).attr("method") != "get") { \$(this).append('<input type="hidden" name="fFcgQ_OCSUuEzl" value="DRK3bIW0w8L" />'); } return true; }); jQuery.ajaxSetup({ beforeSend: function (e, data) { if (data.type !== 'POST') return; if (typeof data.data === 'object' && data.data !== null) { data.data.append("LHfQMdbo_Al", "8I4awxr7kvVDt"); data.data.append("zxVu-DITS", "Nce7adstg1[H]"); data.data.append("fFcgQ_OCSUuEzl", "DRK3bIW0w8L"); } else { data.data = data.data + '&LHfQMdbo_Al=8I4awxr7kvVDt&zxVu-DITS=Nce7adstg1[H]&fFcgQ_OCSUuEzl=DRK3bIW0w8L'; } } }); });