The psychological state of a person is characterised by cognitive and emotional variables which can be inferred by psychometric methods. Using the word lists from the Linguistic Inquiry and Word Count, designed to infer a range of psychological states from the word usage of a person, we studied temporal changes in the average expression of psychological traits in the general population. We sampled the contents of Twitter in the United Kingdom at hourly intervals for a period of four years, revealing a strong diurnal rhythm in most of the psychometric variables, and finding that two independent factors can explain 85% of the variance across their 24-h profiles. The first has peak expression time starting at 5am/6am, it correlates with measures of analytical thinking, with the language of drive (e.g power, and achievement), and personal concerns. It is anticorrelated with the language of negative affect and social concerns. The second factor has peak expression time starting at 3am/4am, it correlates with the language of existential concerns, and anticorrelates with expression of positive emotions. Overall, we see strong evidence that our language changes dramatically between night and day, reflecting changes in our concerns and underlying cognitive and emotional processes. These shifts occur at times associated with major changes in neural activity and hormonal levels.

Funding: European Research Council Advanced Grant 339365 "ThinkBIG" granted to NC supported NC and FD. The funder had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.

Data Availability: The raw data necessary for repeating this analysis are available, in the form of the hourly raw-count time series of the frequency for each of the words included in the LIWC and PANAS lists and total number of word occurrences for each hour of the time interval. https://doi.org/10.5061/dryad.f61v3tj .

Copyright: © 2018 Dzogang et al. This is an open access article distributed under the terms of the Creative Commons Attribution License , which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.

The temporal indicators we analyse reflect the changes that occurred in the contents of millions of anonymous tweets. We conduct a systematic analysis of their periodicity, and reveal the main factors behind their diurnal variation. Altogether, our results indicate two independent patterns of thinking expressed over the 24-h day. Categorical thinking is dominant in the early morning. During the weekdays, this time corresponds with the morning rush hour, marked with low mood. In contrast at the weekend this becomes a feel-good time. Existential thinking is dominant late in the night, during this time the positive emotions are low, death and religion are the main concerns in the population.

The specific content generated on the social media has been studied to observe temporal variations in the collective expression of our emotional processes [ 3 , 8 , 9 , 10 ]. These processes show a complex hierarchy of positively and negatively valenced emotions. Finer distinctions separate them further: the emotion of anger has been shown to follow a stable pattern in the 24-h day at different points of the week and year, while the emotion of sadness has been found to vary in response to these changing environmental conditions, with higher levels of interaction observed with the onset of sunlight exposure [ 3 ]. Positive and negative states have been found to remain independent in various settings [ 11 , 3 , 8 ] suggesting different mechanisms behind their expression. In a previous study we identified two distinct patterns of emotional variations within the circadian rhythm, with the positive emotions showing a bi-phasic behaviour, and the emotion of anger showing variations that inversely mirror the variations of plasma cortisol concentrations peaking early in the morning and slowly decreasing for the rest of the day [ 3 ].

Psychometric patterns in language have been repeatedly found in various settings. Measuring psychometric variables from the content of admission essays written by US students, previous works have related the writing style to academic performance, suggesting a bias towards categorical thinking in the ways academics define success [ 5 ]. Using a similar approach, poets who committed suicide have been found to differ in their writings from poets who died a different death [ 6 ]. Text-based learning models have also revealed consistent emotional constructs in the content of anonymous suicide notes [ 7 ]. The present study relies on a total of 73 psychometric variables, and seeks to identify the temporal mechanisms behind our emotional and cognitive activity. While the cognitive processes refer to the ways people think (e.g causal, categorical or dynamical thinking), the emotional processes refer to the ways people feel (e.g. positive or negative emotion).

Observing temporal variations in the expression of our internal state requires the investigation of large populations of individuals sampled at an adequate rate which has previously proven difficult [ 3 ]. Previous attempts have relied on subjective reporting with inherent problems of self-reporting and recall bias, they have also been limited in their size, or in the duration of the period of observation. In the present study, we leverage the measure of a range of psychometric variables sampled in an uncontrolled population of anonymous individuals to infer the average situation or state in which those persons are at different times of their daily routines. Twitter content was sampled hourly in a four years interval across the whole United Kingdom: we have monitored the usage of cognitive and emotional words from the psychometric word lists defined in the 2015 version of Linguistic Inquiry and Word Count (LIWC) [ 4 ]. We have also computed a number of temporal indicators relative to everyday life concerns as well as numerous standard linguistic properties describing the writing style amongst other properties. Our temporal indicators of cognitive and emotional activity, formed in a robust way, capture periodic variations in the collective psychology of the general population of UK Twitter users.

Our internal states are characterised by multiple dimensions of psychological processes, of which two -emotional and cognitive processing- are of major importance for the maintenance of good mental health. Their expression is both individual and situation dependent and results in observable states or behaviours [ 1 ], such as anger, hesitancy or sadness. In everyday life our internal status interacts with our current concerns, so one may turn to causal thinking to cope with work or become positively affected when attending to family matters. Emotional and cognitive processing is also dependent on the stage of the sleep/wake cycle, which modifies the activity of circuits including the brain stem alerting pathways including the midbrain raphe. Indeed, it is clear that circadian genes modify key circuits which impact on mood and reward circuitry [ 2 ]. In addition to neural circuits, circulating hormones such as cortisol contribute to optimal neural function and the maintenance of good mental health.

The label of a category has size proportional to the percentage of variance explained in the four years fluctuations of the indicator by the profile of diurnal variation.

Each temporal indicator is summarised within the 24-h cycle by a Diurnal Variation Profile (DVP), defined as the 24-bin series of time point averages across each word and each day in the period under study. The DVP is characterised as a single period of the periodic times series (with period 24-h) that minimizes the residual sum of square with the temporal indicator. In that sense the squared correlation between the DVP and the temporal indicator is interpreted as the percentage of the variance in the indicator that is explained by the DVP (see Fig 1 ). In this study the DVP was computed separately for the weekends and for the weekdays, it was then averaged, and standardised for convenience.

As a sanity check, we also computed indicators that account for the natural volume in each individual word, and we compared with our own indicators (see Results –Dynamics of the Diurnal Rhythm). Because the baseline volume of words grows exponentially with their rank frequency in a corpus of text, the two methods are not equivalent. Our standardisation strategy ensures that in this uncontrolled population finer structures in the indicators account for discrepancies in word usage [ 14 ], and do not only account for the fluctuations of the top most frequent words.

We address the first issue by standardising the time series of a word within the 24-h day so each single day receives zero mean and unit standard deviation before averaging the indicator. In this way each word contributes equally towards the score of a category. In particular if two words with different baseline volume show an increase of 100% at a specific time, our indicators can experience an increase of 100% at that time. This strategy also removes the effect of long trends in individual word volume (e.g it is known that baseline volume of mood words changes seasonally on Twitter [ 9 , 10 ]), and ensures that only variations that happened within the 24-h cycle are reflected in the temporal indicators. We acknowledge the standardisation procedure can amplify the second issue linked with the Zipf’s law. We addressed this by discarding the 50% least frequent words in each list, after observing that the 50% most frequent words accounted for over 98% of all occurrences in each of the 73 categories.

Our temporal indicators are obtained by averaging the signal of all individual words denoting a psychometric variable, yielding a time series of time point averages across a word list. Since the frequency of words in the natural language is determined by the Zipf’s law [ 13 ] two problems arise when averaging the signals. A simple sum of frequencies for all words in the list would only reflect changes in the top most frequent words, and the long tail of low-frequency words would be affected by a high estimation error.

The temporal indicators we use are formed by computing the frequency of individual words in a robust way, first improving each time point estimate by smoothing it with the corresponding estimates at seven days distance, preceding and following to ensure we do not introduce artifacts in hourly comparisons through the week while still keeping the hourly differences between corrected estimates. Then, the relative frequency is resolved for each word in every hourly sample, by expressing the frequency of a word in a sample over the total volume of the top 100K most frequent words.

From each word list we created a temporal indicator that indicates the hourly expression of the psychometric variable in the population. There are many ways to define such indicators, one way is to count in each hour the number of occurrences of any word in a category and resolve the fraction to the total word volume. The time series of that quantity, the relative frequency of a psychometric variable per hour, is used to investigate temporal changes in the population.

In this study, we use the categories from all levels, and we refer to them interchangeably as psychometric variables or psychometric categories. Altogether, they provide a wide range of measurements about our internal psychological states, be they cognitive, affective or relative to other clues such as the writing style [ 1 ].

We refer to a psychological process as any mental path leading to an observable mental state. Amongst the 73 psychometric variables, the distinction is made between those attributed to individual psychological processes, and those designating broader meta-processes. The cognitive processes (cogproc) are measured as a whole by one single psychometric variable indicating the expression of the meta-process. They are further declined into individual psychometric variables, each indicating a separate process (insight, cause, discrepancies, tentativeness, certainty, differentiation). Further levels of refinements are made, for example the affective processes (affect) include both the positive emotions (posemo) and the negative emotions (negemo), with the latter being declined into anxiety, sadness, and anger. Other refinements include core drives (power, achievement, affiliation, focus-risk, focus-reward), personal concerns (work, leisure, home, money, religion, death), social concerns (family, friends, female-referents, male-referents), time orientation (focus-present, focus-past, focus-future). The three levels of the complete hierarchy is provided in S1 Table —Processes and meta-processes defined in LIWC 2015.

They are composed of words and word stems used to measure specific aspects of our psychology. A total of 73 psychometric variables have been defined and associated with a word list. (see S1 Fig —Conditional probability for observing each psychometric variable). These lists were initially assembled and validated by groups of human judges, later iterations in their development relied on statistical methods to reshape them, assure their reliability, and assess their validity in various settings [ 4 ]. The psychometric variables attached to the word lists provide indication about the cognitive and emotional states reflected in a sample of text. They also provide general aspects of everyday life such as personal concerns, or the writing style used in each sample.

The words we use to communicate provide an indirect mean of observation to our internal psychological states. Inferring them based on observable samples of behaviour is studied in psychometrics: the word lists in the Linguistic Inquiry and Word Count are well established in this field [ 1 ].

The signal about mood could be skewed by the presence of large amounts of standardised greeting messages in specific seasons, which make use of mood related words, while not denoting the mood of the writer. These standard greeting messages were removed from the data as follows: we ignored any Twitter post containing the word happy, merry, good, lovely, nice, great, or wonderful followed by christmas, halloween, valentine, easter, new year, mothers’ day, fathers’ day, and their variants (e.g starting with a leading # or separated by a dash, a space or ending with ‘s when applicable) was not considered for analysis. We verified that posts matching this pattern were indeed concentrated in very specific days (the expected ones for each holiday).

Anonymising the data at time of collection implies that we cannot distinguish individuals or account for the likely changes in population that occur between night and day. This is required by our user privacy policy, also dominant chronotypes may emphasize some of the properties exposed in our analyses as we cannot separate the variation due to population changes or due to changes in the same individuals. In the uncontrolled population under analysis we expect each anonymous sample of text collected, following the same procedure across days and months, to be representative of the collective content generated in the United Kingdom. We cannot rule out the presence of data posted by bots accounts, but we control for this risk in various ways. First, we verified by hand a sample of data, estimating that tweets generated to promote links to news stories were less than 1.5% at each given hour of the day. Then we observe that in order to affect our results, bots would need to be geolocated in all or most of the 54 largest UK cities, remain active over the 4 years of this study, and present the same diurnal pattern in their content. We believe that the design of this study protects us from that risk.

Twitter contents from the 54 largest cities in the United Kingdom were sampled every hour using the Twitter search API, without specifying keywords or hashtags, and complying with Twitter’s Terms of Service ( https://twitter.com/en/tos ). For each tweet, we collected the anonymised textual content, a collection date and time, and information about the location of the tweet (within 10km of one of the 54 urban centres). We automatically removed messages containing standard holiday greetings as they contained mood-related words while not necessarily representing an expression of mood (see Materials and methods - Greeting messages). Due to issues in the collection we removed the year 2012 and the months of November and December 2014 from our analyses. As a result, we obtained 800M individual tweets and 7B word occurrences covering the time intervals between January 2010 and November 2014. Each tweet was tokenized using a tool designed specifically for Twitter text [ 12 ]. Hyperlinks, mentions and hashtags were discarded, along with punctuation and words containing only special characters (e.g. emoticons). A summary of the dataset is provided in Table 1 . The time series of the raw frequency of each word necessary to reproduce this study is publicly available ( https://doi.org/10.5061/dryad.f61v3tj ).

Results

In this section we present statistical results showing that the temporal indicators of the 73 psychometric variables are indeed periodic, most of them having 24-h as their dominant period. Then we consider their diurnal pattern of change, finding that 85% of the variance across them can be explained by two independent factors, studied in detail. The DVP of these two factors is robust across the different days of the week, we discuss how they correlate with emotions, then with cognitive states and changes in writing style.

Dominant cycles By Fourier analysis, we see that all the 73 time series have strong periodic structure, and all have a 24h component, which for 65 of them is also the dominant component. This step is performed by first standardising each individual word time-series across the four years, (instead of each single day as done later, see Materials and methods –Temporal Indicators), to keep longer term fluctuations in the signal. The 24-h Fourier component appears as the largest periodic oscillation with period under a year in 65 temporal indicators out of 73. The second largest dominant period corresponds to a weekly cycle, over-expressed in the working days (cognitive-processes, insight, comparatives), or in the weekends (family). A 12-h dominant cycle appears in both focus-future and in the positive emotions (posemo), with the latter discussed in [3]. The category affiliation shows an 8-h dominant cycle followed by a dominant weekly cycle, and the category perception a 4-month dominant cycle followed by a 24-h dominant cycle.

Stability across days of week We computed the DVP of the two latent factors for different days of the week, as a way to check if these factors are affected by the change in routine that are associated to different days. We find that the overall behaviour of the two factors is stable across the week, although some smaller differences can be seen between weekends and weekdays. (see Fig 6). To enable fine comparisons, we compute a bootstrap estimate of the 95% Confidence Interval (N = 100 samples) for the reported quantity, and we provide both the bootstrap mean and the 95% CI. In each case we report the variations of the factor obtained by standardising the temporal pattern in the 24-h interval. PPT PowerPoint slide

PowerPoint slide PNG larger image

larger image TIFF original image Download: Fig 6. Diurnal variations of the first leading factor (left) and second leading factor (right) by each day of week. The x-axis indicates the hour. https://doi.org/10.1371/journal.pone.0197002.g006 On the figure, F1 is seen to react adversely to an event occurring in the morning of the worked days. F2 does not show the same behaviour but stops being expressed progressively earlier in the morning. To give context to these observations we compare these patterns with weekly levels of fatigue [3]. On Fig 7, we notice exceptional levels during peak expression time of F1. The effect is degressive through the week, and fits with the progressive behaviour of F2 in the morning. In the weekend, fatigue does not peak in the morning, and the lower mood of the worked days occurring during the morning rush hour is replaced by a feel-good time (see Results –Emotional states) marked with relatively higher F1 and lower F2. PPT PowerPoint slide

PowerPoint slide PNG larger image

larger image TIFF original image Download: Fig 7. Comparison between variations of F1, F2, and weekly levels of fatigue. https://doi.org/10.1371/journal.pone.0197002.g007 Extracting separate factors for the weekend when the population is not engaged with the weekday work schedule, in contrast for the weekdays when they are, confirms the strong agreement between the two periods, with both the first leading factor (ρ = 0.95; P = 1.27e-12; N = 24) and the second leading factor (ρ = 0.97; P = 1.93e-15; N = 24) showing robust consistencies in response to the change of activity. We provide the detailed mappings for each day of week in S2 and S3 Figs.

Emotional states In this section we are interested in interpreting F1 and F2 by how they interact with emotional states. In the next section we interpret F1 in relation with the cognitive states and the writing style. A strong association between the circadian rhythm and emotions has been reported under various conditions in the literature [16]. In the context of the present study, F2 shows a pattern that anticorrelates with the positive emotions. F1 shows a pattern that anticorrelates with negative affect (see Fig 8). PPT PowerPoint slide

PowerPoint slide PNG larger image

larger image TIFF original image Download: Fig 8. Comparison between the variations of posemo, anger, sadness, and the two leading factors. The x-axis indicates the hour. https://doi.org/10.1371/journal.pone.0197002.g008 To detail these effects, we provide the profile of variations of the mood indicators analysed in [3] (posemo, anger, and sadness) and we compare with the variations of the two factors by each day of week (see S4 Fig. Days of week comparison between the variations of posemo, anger, sadness, and the two leading factors.). In each case we observe stable profiles of variations with smaller deviations occurring in the morning. The population wake up in the best mood on Sunday with high positive emotions and low negative emotions (anger, and sadness) expressed after 6am. In the couple of hours that follows, the working days are instead associated with relatively low mood characterized by low positive emotions and increased sadness. These differences occur during the morning rush hour marked with degressive levels of fatigue through the week (see Fig 7). As noted in [3], the profiles of anger remain more stable. In the context of the present study sadness anticorrelates with F1 and shows differences during the morning rush hour of the worked days when the population express exceptional levels of fatigue. This is also the case for the positive emotions that anticorrelate with F2, their morning onset interacting with peak expression of F1. These observations are only intended to aid with interpretation of F1 and F2, and not to suggest causation.