What We Did

We want to preempt sadness and depression before a person reaches a state in which they are conscious of their state. Research supports the connection between "sad" people listening to music, and furthermore that "happy" people do not listen to sad music (J. M. Van den Tol and Jane Edwards, 2011). Our metric for sad music is a combination of valence and arousal (Karl and Bulaj, 2016). These two dimensions classify songs into 4 areas: happy, sad, calm, angry. From Spotify's API, we gather the most recent 50 songs of each user, and averaged their valence and energy (equivalent of arousal). If they were in the bottom of both, then we classify them as a sad user.

For a sad user, we wanted to be careful in our communication and offer them agency. If they want to change their mood, they click a button for recommendations, and we recommend their taste in music but with a slightly higher valence and energy. Research shows that listening to sad music is not an effective strategy (Carlson et al. 2015), so we recommend happy songs.


Website: http://moodify.ml


Suicide is the 10th leading cause of death overall in the United States, the second leading cause of death among ages 10-34, the fourth leading cause of death among ages 35-54. On average, there are 129 suicides a day. While 47,173 people died from suicide in 2017, there were an estimated 1.4 million suicide attempts. The numbers are huge, but suicide is hard to predict, and is difficult to identify, monitor, and intervene. We identify the key points of reducing suicide rates as easily access prediction method and the closely connection between prediction and intervention.


Our inspiration was using data drive ways to track mental health that don't require the standardand somtimes discomforting medical questionnaire.

Interventions involved

1) Involving family members or close relationships to monitor the patient and refer the patient to higher levels of care if necessary 2) Communicating a commitment to help 3) Developing a safety plan to plan for the patient to help oneself or reach out for help

What it does

By analysis user's Spotify history data, based on valence and energy values of songs, our website can identify user's current mood, possible mental health condition, giving options and suggestions on potential improvements.

How we built it

We built in react. We got a users valence and energy using their last various set number of songs emotional values and based on these values. Let the user know if they are in a negative mood or not. And we also recommend them playlists personally tailored to their recommendations with slight raises in valence.

Challenges we ran into

Challengers we ran into is coding in react, understanding how to represent emotional sentiment in songs, and hosting on a web server.

Accomplishments that we're proud of

Working as a team to finish making an app for mental health.

What we learned

Through this process, we learned more about mental health problems and their causes, treatment methods, such as music therapy and the relationship between emotion state and music.

What's next for Spotify Mood Detector

We hope to access more data to learn more about the correlations and causations between music and mental states by doing large scale sampling on mentally ill population.

Built With

Share this project: