Spatio-Temporal Sentiment Hotspot Detection Using Geotagged Photos

Yi Zhu, Shawn Newsam

Abstract

We perform spatio-temporal analysis of public sentiment using geotagged photo collections. We develop a deep learning-based classifier that predicts the emotion conveyed by an image. This allows us to associate sentiment with place. We perform spatial hotspot detection and show that different emotions have distinct spatial distributions that match expectations. We also perform temporal analysis using the capture time of the photos. Our spatio-temporal hotspot detection correctly identifies emerging concentrations of specific emotions and year-by-year analyses of select locations show there are strong temporal correlations between the predicted emotions and known events.

Introduction

While urban planning increasingly relies on "smart city" data like traffic flow and air quality, the "affective" layer—how citizens actually feel in different urban spaces—remains difficult to quantify. Traditional sentiment mapping often relies on text-based data from platforms like Twitter. However, visual data is more ubiquitous and often captures more subtle emotional nuances. This research presents a framework for automatically detecting where and when specific emotions cluster in a physical environment by analyzing millions of geotagged photos.

Methodology

The researchers developed a multi-stage pipeline to extract geographic sentiment insights from raw image data:

  1. Emotion Classification: A VGG-16 Convolutional Neural Network (ConvNet) was fine-tuned on the Emotion6 dataset to recognize six basic emotions: anger, disgust, fear, joy, sadness, and surprise.
  2. Spatial Quantization: San Francisco was divided into a 1000x1000 grid. For each cell, an "emotion ratio" was calculated based on the percentage of photos labeled with a specific sentiment.
  3. Hotspot Detection: The Getis-Ord Gi* statistic was applied to identify statistically significant clusters of high or low emotion ratios.
  4. Temporal Trend Analysis: Using the Mann-Kendall test and emerging hotspot tools, the team analyzed how these clusters evolved over a decade, identifying "new," "intensifying," or "persistent" hotspots.

Data Overview

The study utilized two primary datasets:

  • Emotion6: A benchmark dataset of 1,980 images used for training the classifier.
  • Flickr San Francisco Dataset: A collection of approximately 1.9 million geotagged photos taken between 2006 and 2015. After quality filtering, 1,753,903 images were used for analysis.

Key Insights

Analysis revealed that sentiment has a distinct spatial "signature." Emotions are not distributed randomly; they cluster in ways that correlate with land use and socio-economic events.

Spatial and temporal sentiment hotspots in San Francisco: (a) disgust hotspots in the Mission District, (b) joy hotspots at major landmarks, and (c) emerging temporal trends including Pier 70.
  • Landmark Joy: "Joy" hotspots naturally clustered around recreational areas like the Botanical Garden and AT&T Park. Notably, the joy ratio at AT&T Park correlated strongly with the SF Giants' performance, peaking during championship seasons.
  • Socio-Economic Indicators: In the Mission District, a steady increase in "disgust" sentiment was observed starting in 2008, mirroring the rise in median home prices and reflecting the local friction associated with rapid gentrification.
  • Economic Recovery: Intensifying hotspots in tourist hubs like Fisherman's Wharf during the late 2000s likely reflect post-recession recovery and the rise of smartphone photography.

The fine-tuned VGG-16 classifier achieved an accuracy of 61.95%, significantly outperforming random chance (16.67%). This performance is considered robust given the subjective nature of visual emotion.

Yearly distribution of geotagged photos in the San Francisco dataset, illustrating the peak in 2011 and subsequent decline in Flickr activity.

Temporal analysis successfully identified emerging urban trends. For instance, Pier 70 was detected as a "new hotspot" for joy in 2015, following its 2014 renovation into a major event space. Additionally, the data highlights a shift in social media usage; Flickr activity in San Francisco peaked in 2011 before declining as users migrated to mobile-first platforms like Instagram.

Discussion and Future Directions

Several challenges remain in interpreting social media data. Photographer intent is complex; a photo of a dirty street may be intended as documentation rather than a direct expression of the photographer's emotion. Furthermore, geotagged data is often noisy and spatially biased toward tourist centers. Future research will focus on incorporating more recent datasets from diverse platforms and refining classifiers to better handle the subtleties of visual sentiment.

Summary updated

Abstract

We perform spatio-temporal analysis of public sentiment using geotagged photo collections. We develop a deep learning-based classifier that predicts the emotion conveyed by an image. This allows us to associate sentiment with place. We perform spatial hotspot detection and show that different emotions have distinct spatial distributions that match expectations. We also perform temporal analysis using the capture time of the photos. Our spatio-temporal hotspot detection correctly identifies emerging concentrations of specific emotions and year-by-year analyses of select locations show there are strong temporal correlations between the predicted emotions and known events.
BibTeX
@misc{zhu2016spatio,
  author = {Yi Zhu and Shawn Newsam},
  title = {{Spatio-Temporal Sentiment Hotspot Detection Using Geotagged Photos}},
  year = {2016},
  eprint = {1609.06772},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1609.06772},
}
Figure