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”:
The frequency of these terms appearing for this group was low, however:
Next, the dietitians:
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.
Finally, the random sample from the general population:
However these rarely appeared in this sample:
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.
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.