Inspiration

Americans are the unhappiest they've been in years (according to the World Happiness Report). Addressing this problem requires data analysis and action.

Mapping happiness will make the world happier. Here's why: companies and governments act based on the information they have, so access to our maps would incentivize the promotion of happiness in the same way demographic and economic maps prompt companies to launch targeted marketing campaigns and governments to pursue economic equality.

What it does

For each place on the map, we take a sample of recent tweets and news from the location and determine how positive or negative people are at the moment. We use this information to generate a happiness index and color the map accordingly.

How is this different from a general "happiness score"? It's kind of like weather and climate — traditional happiness scores are the long-term climate of a place, whereas our approach measures the emotional weather in real time, allowing companies and governments to see how their policies and programs affect an area over time.

How I built it

  1. Get the tweets and news (Twitter API and NewsAPI)
  2. Calculate the happiness index of the media (Google Cloud NLP Sentiment Analysis)
  3. Map the data (Leaflet.js, MapBox)
  4. Render maps in a website. (Django, JS)
  5. Provide supplemental information on a given place with economic data and facial emotions from local images (Quandl, Microsoft Cognitive Services API, Bing Images)

Challenges I ran into

Every technology except for JavaScript was new to us, so learning (and debugging!) was a struggle.

Accomplishments that I'm proud of

  • Running sentiment analysis and facial emotion detection
  • Making a reasonably good-looking UI

What I learned

In addition to learning about the frameworks and languages we used, we started learning about the applications of this technology:

  • For airlines, monitoring happiness levels close to airports could encourage first-time flyers to travel by showing that they are not as unhappy as they might expect
  • For governments, a happiness heat map could help effect targeted policy change that helps the people who need it most, addressing economic and social inequality from an emotional perspective.
  • For companies using targeted advertisement, this data is needed to generate marketing campaigns based on the emotions of a place.

The happiness heat map is potentially a software with commercial application that could be modified to the use cases of different companies. In addition, we can make the data public through a general demo site, where the public and governments can see how a place is doing and what areas might need policy changes.

What's next for Senti-Index

  • Fully automate choropleth map generation
  • Map emotions other than happiness
  • Consider business applications

Built With

Share this project:

Updates

posted an update

For the Microsoft Challenge, I used the Bing Image Search API to get the top images of residents in places around the world and fed them right back into the Face Detection API to identify their happiness levels. These two Cognitive Services were used in conjunction with each other to analyze facial sentiment.

Log in or sign up for Devpost to join the conversation.