What to eat according to twitter

This week Dr. Coupland joked that he eats anything he sees recommended on twitter. It occurred to me that I could look at foods talked about on twitter by collecting tweets and matching each word against the list of foods in the USDA Nutrient Database. Challenge accepted!

First, I scraped each food (discarding specifics after commas) from the database, which provided 975 foods. Then, I downloaded the last 3200 tweets (or until the start of 2013) from the following groups and performed the word matching (all done with Python scripts):

  • 29 (including myself) health related scientists/professionals (40,772 tweets) who I follow on twitter.
  • 221 dietitians (216,021 tweets) whose twitter names were scraped from their blog listings on the Nutrition Blog Network.
  • 33 “paleo” bloggers (52,591 tweets) whose twitter names were collected after visiting blogs from this website.
  • A sampling of twitter’s public stream of tweets containing ‘a’ (to get as random a sample as possible) on Dec. 17 that yielded 124,650 tweets.

Here we have a wordcloud of the “scientists/professionals”:

sci_cloud

 

The frequency of these terms appearing for this group was low, however:

Rice Coffee Sugar Milk Tea Fat Fish Salt Chicken Juice
17 15 10 7 7 5 4 4 3 3

Next, the dietitians:

RDcloud

Pumpkin Chicken Kale Quinoa Salad Chocolate Sugar Snack Cream Coffee
176 135 116 114 110 105 72 69 65 60

Next, “paleo” bloggers:

Ironically, pumpkin could not even be a “paleo” food. I confirmed in the tweets that this doesn’t just appear because of Thanksgiving, either.

Paleocloud

Frequencies:

Pumpkin Chocolate Bacon Pie Beef Chicken Garlic Cranberry Carrot Pork
201 174 122 53 45 45 34 32 31 29

Finally, the random sample from the general population:

generalCloud

However these rarely appeared in this sample:

Tea Pizza Chocolate Coffee Milk chicken Fat Salt Shake Turkey
6 5 3 3 3 2 2 2 2 2

 

Next, I tried running the top 10 foods form each group through the Nutritionix database, took the first result for each, and got the nutrient data. Then I took a weighted average of this for a very unscientific glimpse of what an “average food” looks like that each group talks about.

graph1

 

graph2

 

graph3

 

graph4

 

 

 

Obviously, we can’t tell by the appearance of these words if they were praising or criticizing the food, or just mentioning new research. But it might provide a picture of what foods you will be exposed to depending on what type of people you follow on twitter. There are many limitations to this (e.g. I only had 975 foods to match against) so don’t take it too seriously.