Empowering health geography research with location-based social media data: innovative food word expansion and energy density prediction via word embedding and machine learning

Jue Wang, Gyoorie Kim, Kevin Chen–Chuan ChangInternational Journal of Health Geographics 2023 · DOI

Abstract

The exponential growth of location-based social media (LBSM) data has ushered in novel prospects for investigating the urban food environment in health geography research. However, previous studies have primarily relied on word dictionaries with a limited number of food words and employed common-sense categorizations to determine the healthiness of those words. To enhance the analysis of the urban food environment using LBSM data, it is crucial to develop a more comprehensive list of food-related words. This study addresses the research gap by introducing a novel methodology for expanding the food-related word dictionary and predicting energy densities. Seed words are generated from official and crowdsourced food composition databases, and new food words are discovered by clustering food words within the word embedding space using the Gaussian mixture model. Machine learning models are employed to predict the energy density classifications of these food words based on their feature vectors. The approach successfully expands the food-related word dictionary and accurately predicts food energy density (reaching 91.62%). This method makes a valuable contribution to building a more comprehensive list of food words that can be used in geography and public health studies by mining geotagged social media data.

Introduction

Health geographers increasingly utilize location-based social media (LBSM) data, such as Yelp reviews or tweets, to analyze "food environments"—the social and physical contexts influencing dietary habits. Traditionally, these analyses have relied on static, "common-sense" dictionaries that categorize items like "vegetables" as healthy and "fries" as unhealthy.

However, this traditional approach suffers from two critical limitations: a lack of nutritional precision and a failure to capture the multicultural diversity of modern urban diets. A standard list often misses specific cultural dishes or brand-name items that dominate local landscapes. This research proposes a data-driven framework to bridge the gap between social media discourse and public health metrics by automatically discovering new food words and classifying their health impact through energy density prediction.

Methods and Data

The researchers developed a multi-stage pipeline to expand food dictionaries and predict nutritional value. The process began with Seed Word Generation, pulling data from the United States Department of Agriculture (USDA) and the crowdsourced Open Food Facts (OFF) database. These words were then mapped into a 300-dimensional vector space using Google’s pre-trained Word2Vec model, which groups semantically similar items (e.g., "burger" and "fries") together.

Methodological workflow for generating seed words and expanding the food dictionary from USDA and Open Food Facts databases.

To expand the dictionary, a Gaussian Mixture Model (GMM) identified 36 distinct clusters within the embedding space. By adjusting similarity and probability thresholds, the system could "fish" for new food-related words near the centroids of these clusters. Finally, ten machine learning models were evaluated to classify words into two categories: Low Energy Density (L-ED, <1.5 kcal/g) and High Energy Density (H-ED, ≥1.5 kcal/g).

Key Results and Insights

The study demonstrated that the way food is discussed in social media correlates strongly with its physical properties. The Support Vector Machine (SVM) model emerged as the top performer, achieving 91.62% accuracy in predicting energy density classifications.

A critical finding was the trade-off between dictionary quantity and quality. As shown in the performance analysis, lowering the probability threshold allowed for the discovery of over 32,000 words, but accuracy dropped to 71%. The researchers identified a "sweet spot" (Scenario E) that yielded approximately 12,000 new words while maintaining 94% accuracy.

Performance metrics across different expansion scenarios, illustrating the trade-off between the number of new words discovered and classification accuracy.

Overall, the final dictionary grew from 3,761 seed words to 14,152 food words. When applied to a real-world dataset of Yelp reviews in Toronto, the expanded dictionary identified 7% to 8% more food words across city districts compared to the original list. This improvement was particularly significant in multicultural, high-density areas, proving the value of including crowdsourced data like Open Food Facts to capture "long-tail" and international food items.

Conclusion

This study provides a robust methodology for mining geotagged social media data to enhance public health research. While the current model is primarily rooted in North American contexts, it sets the stage for future work using localized social media corpora to capture informal slang and diverse languages. Moving beyond energy density, future iterations could predict specific nutrients like sodium or sugar, offering a more holistic view of urban food environments.

Summary updated

Abstract

Abstract Background The exponential growth of location-based social media (LBSM) data has ushered in novel prospects for investigating the urban food environment in health geography research. However, previous studies have primarily relied on word dictionaries with a limited number of food words and employed common-sense categorizations to determine the healthiness of those words. To enhance the analysis of the urban food environment using LBSM data, it is crucial to develop a more comprehensive list of food-related words. Within the context, this study delves into the exploration of expanding food-related words along with their associated energy densities. Methods This study addresses the aforementioned research gap by introducing a novel methodology for expanding the food-related word dictionary and predicting energy densities. Seed words are generated from official and crowdsourced food composition databases, and new food words are discovered by clustering food words within the word embedding space using the Gaussian mixture model. Machine learning models are employed to predict the energy density classifications of these food words based on their feature vectors. To ensure a thorough exploration of the prediction problem, ten widely used machine learning models are evaluated. Results The approach successfully expands the food-related word dictionary and accurately predicts food energy density (reaching 91.62%.). Through a comparison of the newly expanded dictionary with the initial seed words and an analysis of Yelp reviews in the city of Toronto, we observe significant improvements in identifying food words and gaining a deeper understanding of the food environment. Conclusions This study proposes a novel method to expand food-related vocabulary and predict the food energy density based on machine learning and word embedding. This method makes a valuable contribution to building a more comprehensive list of food words that can be used in geography and public health studies by mining geotagged social media data.
BibTeX
@article{wang2023empowering,
  author = {Jue Wang and Gyoorie Kim and Kevin Chen–Chuan Chang},
  title = {{Empowering health geography research with location-based social media data: innovative food word expansion and energy density prediction via word embedding and machine learning}},
  journal = {International Journal of Health Geographics},
  year = {2023},
  doi = {10.1186/s12942-023-00344-5},
}
Figure