Secondary Logo

Journal Logo


Using Twitter to Measure Behavior Patterns

John, Cunningham A.

Author Information
doi: 10.1097/EDE.0b013e3182625e5d

The author’s name is John A. Cunningham.

Epidemiology. 23(6):940, November 2012.

To the Editor:

Twitter has recently been shown to identify patterns in behaviors and emotions in the general population (eg, changes in mood throughout the day).1 This may be useful because many psychosocial activities have temporal variation, and it is challenging to find means to capture these variations in a time-specific manner for a large number of people. More evidence is needed, however, to assess the extent to which patterns of word use on Twitter are valid reflections of actual patterns of behavior in the general population. To do this, it is necessary to identify behaviors with temporal variations in frequency that have been identified using other means of population-survey methods (eg, epidemiologic surveys) and then to determine the extent to which the variations in mentions of these behaviors on Twitter “map,” onto the patterns of those behaviors, as measured with these other population-survey methods.

A good choice for testing the validity of temporal frequency of word use on Twitter may be cigarette and alcohol consumption. Given the average number of cigarettes smoked by adult daily smokers, only minor variation in the frequency of smoking throughout the day and across the week might be expected.2 It could then be predicted that frequency of Twitter word use (such as case “cigarette” and “smoke”) would be fairly stable across the day and over the week. In contrast, there is a fairly large variation in alcohol consumption across the day (more in the evening than in the morning) and across the week (more over the weekend than during the week).3 Does frequency of words (such as “beer” and “wine”) mentioned on Twitter reflect these temporal variations of alcohol consumption?

I made use of an online resource (, which consists of a large searchable bank of Twitter messages.1 I entered two words for smoking (“cigarette” and “smoke”) and two words for drinking (“beer” and “wine”). As predicted from temporal patterns reported in epidemiologic surveys, words related to smoking had a fairly consistent pattern throughout the day and across the week, whereas words related to alcohol consumption displayed substantial temporal variation within the day and across the week (see Figure).

Temporal variation in frequency of alcohol and cigarette consumption words on Twitter.

Twitter seems to be a means to assess patterns of behavior in the general population. As a potential offshoot, Twitter might be useful in measuring changes in patterns of alcohol consumption or cigarette smoking that result from regulations to reduce the availability of these substances. For example, have changes in opening hours for pubs in the United Kingdom led to detectable changes in the patterns of words related to alcohol on Twitter? Do legal restrictions on public smoking (eg, in office buildings, restaurants, and bars) produce measurable changes in patterns of mention of smoking on Twitter? If so, changes in patterns of words related to a specific behavior on Twitter or other social media sites could become an inexpensive, real-time way to assess the impact of changes targeted at improving public health.

Cunningham A. John

Department of Social and Epidemiological Research

Centre for Addiction and Mental Health

Toronto, Ontario, Canada

Department of Psychology and Dalla Lana School of Public Health

University of Toronto Toronto, Ontario, Canada

[email protected]


Data for this manuscript were obtained from the website with permission of the author of the website (Scott Golder).


1. Golder SA, Macy MW. Diurnal and seasonal mood vary with work, sleep, and daylength across diverse cultures.Science. 2011;333:1878–1881.
2. Statistics Canada. Canadian Tobacco Use Monitoring Survey, CTUMS. 2008. Available at: Accessed 29 July, 2009.
3. Room R, Makela P, Benegal V, et al.. Times to drink: cross-cultural variations in drinking in the rhythm of the week. Int J Public Health. 2012;57:107–117.
© 2012 Lippincott Williams & Wilkins, Inc.