Discovering the happiest mode of transportation

Activities and trips detected by the Daynamica smartphone application can be easily be annotated by users, allowing researchers to collect data about the emotions associated with those. The following screenshot shows an example survey for collecting companionship and emotion data associated with a completed activity.

A recent paper published in the journal Transport Findings and co-authored by Dr. Yingling Fan and Dr. Julian Wolfson used Daynamica to study trip-associated emotions for individuals in the Minneapolis-St. Paul metro area.

Here’s the abstract:

Understanding trip happiness—a measurement of people’s emotional well-being during trips—is an essential aspect of people-oriented transportation planning. We use data collected via smartphones from 350 residents in the Minneapolis-St. Paul region to examine trip- and person-level factors associated with trip happiness. Trip mode, purpose, duration, distance, companionship, activities during the trip, and temporal characteristics of the trip are significantly associated with trip happiness. Mode and companionship are the strongest predictors of trip happiness. Among personal factors, age is the strongest predictor, followed by general happiness of the person. Race, gender, and neighborhood have modest effects on trip happiness.

From Understanding Trip Happiness using Smartphone-Based Data: The Effects of Trip- and Person-Level Characteristics

Daynamica and mobile health

It seems like almost everyone is interested in mobile health (or, to be hipper, mHealth) these days. There are a ton of devices out there that can measure physical activity, heart rate, and a number of other physiological parameters. For the most part, these devices provide only a partial picture of human activity during the day. Daily habits and behavior patterns have a substantial impact on health, but until recently, our ability to uncover links between lifestyle and health outcomes has been limited by the inherent difficulty of accurately measuring individual human activity and behavior patterns. 

For example, a mountain of research has shown that high levels of air pollution are associated with increased mortality. However, these findings are based primarily on pollution levels measured at fixed measuring stations; much less is known about how individual exposures vary over time, and hence how they impact health. Since the Daynamica app captures both movement patterns (i.e., location) and activity types (indoor/outdoor), it could be used either in conjunction with fixed or personal air pollution monitors to obtain much more precise, personalized measures of air pollution exposure. Indeed, Daynamica data could be paired with data from a wide variety of medical devices such as continuous glucose monitors or cardiac monitoring devices.

Another potential use of Daynamica is for developing and optimizing behavioral interventions. There is currently great interest in developing interventions that encourage behavior changes to improve health. But these interventions have mostly had only a modest degree of success. One key barrier to increasing the success of these interventions is that it is difficult to obtain accurate information on compliance, particularly since the behavior changes involved tend to be over-reported due to social desirability bias. Daynamica provides a platform for obtaining objective information about intervention compliance so that the reasons for intervention success or failure can be understood. The Daynamica app can also be used to deliver “just-in-time” interventions that adapt to each user’s past and current locations and activities. For instance, an intervention to decrease sedentary behavior could potentially be much more effective if it delivered reminders to users to increase their activity level at times when, based on past data, they have typically been sedentary.

The Daynamica app and data collection platform is already being used in several ongoing projects (and producing some interesting results), but the possibilities extend far beyond our existing partnerships. If you would like to know more about what Daynamica can do for your organization or research group, see our Services page or get in touch.

Understanding and visualizing travel emotions


One of the most challenging tasks for those interested in understanding human activity and behavior is the tracking of individual emotions over time. In several recent projects, we have used our Daynamica smartphone app to ask users to tell us about their emotional state during each of the daily trips and activities that was detected by the app. Following established protocols, we asked users to rate their level of two positive (Happy, Meaningful) and four negative (Sad, Pain, Tired, Stressed) emotions on a scale from 1 (lowest intensity) to 7 (highest intensity). This post gives a quick overview of the resulting data, and shows some ways of visualizing them.

The Data

A sample of the data for one individual is shown below. Note that the reported emotion levels are associated with given trips or activities (e.g., Home, Eat Out, Car, Walk) which are of varying duration. But while we do not have regularly-measured emotion data, we can aggregate across multiple days of data to (or groups of individuals) to gain insight about emotional states over time.

Trip.Activity Start End Happy Meaningful Sad Tired Stressed Pain
Home 2016-10-26 15:48:00 2016-10-27 08:11:00 7 7 1 3 1 1
Home 2016-10-29 07:44:00 2016-10-29 11:22:00 5 3 1 4 5 2
Home 2016-10-29 11:28:00 2016-10-29 15:45:00 5 4 3 1 1 2
Car 2016-10-29 15:45:00 2016-10-29 16:38:00 7 7 1 4 1 3
Eat Out 2016-10-29 16:38:00 2016-10-29 19:00:00 7 6 1 1 1 1
Home 2016-10-29 19:35:00 2016-10-30 08:47:00 7 4 1 1 1 1
In Vehicle 2016-10-30 08:47:00 2016-10-30 08:57:00 7 7 1 1 1 3
Walk 2016-10-30 08:57:00 2016-10-30 08:58:00 7 7 1 1 1 3
Other 2016-10-30 08:58:00 2016-10-30 11:02:00 7 7 1 1 1 5
Walk 2016-10-30 11:02:00 2016-10-30 11:06:00 7 7 1 1 1 1

Individual emotion plots

First, we start by visualizing data for a single individual, aggregated over the time that they were asked to provide data (for this study, approximately two weeks). Since emotions are recorded at irregularly spaced intervals, we start by “filling in” emotional states for every hour. There are many ways one could do this, but we assumed that the emotions associated with a given trip or activity were constant during the time interval covered by that trip or activity.

Next, we aggregate across days by taking the average emotion level at every hour. However, reporting the simple average is somewhat problematic because different people have different “baseline” levels of each emotion. Hence, we scale each emotion to have mean zero and unit standard deviation.

Our data, then, can be shown as follows. More intense colors correspond to higher levels of the corresponding emotion:


But we can do more! By switching to polar coordinates, we can depict the same data with concentric circles showing the various emotions and angle displaying hour of the day, similar to a 24-hour analog watch or clock face.


Yet another circular representation puts each emotion on a wedge of a single circle:



One of the benefits of visualizing emotional “trajectories” in this way is the ability to compare different groups of individuals. Below, we compare those who average more than 30 hours at work per week to those averaging less than 10. It is apparent that those working more are more tired, in less pain, and have fewer happy and meaningful moments. Interestingly, and perhaps somewhat counter-intuitively, stress levels are not markedly different between the groups.



Smartphone-derived human activity data can provide interesting insights into well-being and decision-making processes. The data are multi-dimensional and complex; this post only scratches the surface of what is possible. There are also a lot of open analysis questions: for instance, how do we statistically compare “emotion-time” patterns visualized in this post, to assess whether two individuals or groups of individuals are significantly different?

Code and Data

The analyses and plots presented in this post were done using R, with a heavy reliance on the dplyr, tidyr, lubridate and ggplot2 packages. While the data are not publicly available, we are currently in the process of compiling our code into an online repository that we plan to make publicly available at a later date.