FYI.

This story is over 5 years old.

Tech

When It Comes to Food, You Are Where You Tweet

Researchers used food-related tweets to predict user location, a state's obesity rate, and voting history.

You can tell a lot about a person by what they eat. If I told you that I scarfed an entire Hawaiian pizza by myself at 3 am on Wednesday morning, hypothetically speaking, you might infer that my lifestyle lies somewhere between "totally disgusting" and "totally awesome," and that I live in a trashcan.

Those assumptions aren't completely inaccurate, except for the trashcan thing (on most days). But when we talk about food online our language can reveal a whole lot more concrete information: how hefty people in your region are, your state's political leanings, and what city you live in, for starters. After all, food and language carry significant cultural meaning, since they're often specific to regions, cities, and even individuals.

Advertisement

In a paper accepted into the 2014 IEEE Big Data Conference, University of Arizona researchers compiled a set of roughly 3 million food-related tweets over a period of eight months. Treating those tweets as a set of training data, the researchers annotated them by their metadata (location, time stamp, etc.), and specific food-related content to build predictive models they could then query with tweets stripped of their metadata and any locational language.

A visualization of the researchers' method.

By filtering out language and data relating to the geographic origins of the tweet, the researchers hoped to control for trivial correlations and focus on the predictive power of food. The team also used a machine learning algorithm, referred to as LDA, to build its own sets of food topic categories for the purposes of testing.

The researchers then used their data to predict several state-level features by analyzing tweets that carried food-related content: whether a given state is above or below the national average obesity and diabetes rates, and whether it leans Democrat or Republican.

What we talk about when we talk about food often speaks to more than what's on our plates

Using the food-focused language in tweets alone—without hashtags or any kind of metadata—the researchers were able to predict these features with impressive accuracy, ranging from 60 to 70 percent. After including all the words in a tweet, including hashtags and possible location-related words, as well as LDA categories, the accuracy jumped to as high as 80 percent. Although, of course, that's kind of cheating.

Advertisement

This chart indicates the accuracy ratings of various approaches to predicting several state-level features. 

According to the results, the top indicator of an overweight state was frequent usage of the words "I," and "my," while more svelte states used "you" and "we" more often. Democrat-leaning states loved to tag tweets with "#vegan" and "#yum," while Republicans were more interested in tweeting about "my" "#lunch."

The researchers were also able to determine an individual user's location using tweets containing only food-related content. According to the study's results, a tweet could be pinpointed to the city of origin with 40 percent accuracy if it was first stripped of hashtags and non-food words. If hashtags were included and LDA categories were applied, the accuracy rose sharply to 86 percent.

What people in the 15 largest American cities talk about when they talk about food.

The kinds of words that defined how people living in different cities talk about and engage with food is revealing. Austin, Texas, for example, was characterized by frequent use of "we," "come," "taco," "#tacos," (think twice next time you're about to tweet "We come for taco #tacos," Austinians) and the LDA topic category "mixed drinks." New York City, on the other hand, is apparently obsessed with "#brunch" and breakfast foods of all kinds.

According to the researchers, these findings indicate, empirically, that food is a huge part of who we are as individuals and as a society; it tells us all about ourselves and each other, and what we talk about when we talk about food often speaks to more than what's on our plates. Also, someone can pinpoint where you live by keeping track of how you socialize what you're stuffing your face with.