Can we quantify something as fluid and personal as taste? And if so, can we see differences in how international cuisines utilize ingredients?

In order to answer these two questions, I downloaded close to 4000 recipes from a well known cooking website, and analyzed the occurrence of ingredients per recipe.

The first thing we can look at is the number of times an ingredient is used in different recipes.

This demonstrates a fascinating type of distribution, the so called Pareto distribution that is found in many different real life situations. 20% of recipes contain 80% of the ingredients in the list. This amounts to about 68 ingredients. Another fascinating phenomenon, is that as we move down in the rank of ingredients (i.e. less common ingredients) we see that they are used about as often.

Lets quantify how many ingredients each recipe contains:

Here we see that the median number of ingredients is 8, irrespective of cuisine! This might seem surprising at first, but pick your favorite food, and count what it contains (including salt, oil and all the things you add). Willing to wager its: 8 (give or take 1).

Lets move on from the similarities in the number of ingredients in cuisines, to how they are combined. Can we see any meaningful patterns on the similarity of recipes in each cuisine?

By performing some “mathemagic” called hierachical clustering we can see that the Italian, French and American cuisines are most similar, while the Greek cuisine is a bit more distant to this triad, and finally the Mexican being the most dissimilar. This makes sense on a historical level, with French gastronomy being the most influential cuisine of the global palate, and the American cuisine being great at what American culture is: integration and assimilation.

So how do different nations flavor their food? To analyze this, i created a list of ingredients that I consider to be “flavorings”. I decided to include counter-intuitively things such as mayonnaise and feta cheese, simply because they are used as additions to food, and never as main ingredients. While including things like cheese and mayonnaise, I removed salt, pepper and butter, simply because they were found everywhere, and did not really provide any additional information.

What we see here is an extension of the similarity figure. We see just by eye, that the flavors of the American, Italian and French cuisine are indeed more similar, while the Greek and Mexican styles are indeed quite different. And I can anecdotally attest that my Greek mother does indeed put lemon on just about everything.

Lets now look at how unique the choice of flavors and protein is in each cuisine. Here we see a Venn diagram showing the overlap of different cuisines usage of flavors with chicken.

First of all, the keen observer might note that difference in the number of recipes will make it so that the more represented cuisines will have most of the unique ingredients. To avoid this bias I took a sample of 100 recipes 1000 times, and took the average.

Lets looks at beans, because we all have to eat less meat:

In the center of the Venn diagram are the “universal flavors” for each ingredient. And as we look radially outwards, we can see how each specific ingredient is used by different combinations of cuisines.

Finally, can we create a genealogical tree of how different ingredients are co-occurring in different recipes? Put it in a different way, if we only had 3 ingredients, and 2 recipes consisting of the tasty combination of: salt-pepper, and pepper-butter, we would conclude that pepper is the most universally used ingredient, and that salt and butter can be combined due to their co-occurrence with pepper. Doing this for all 4000 recipes and flavors gives us this:

Here we can see how different flavoring ingredients are combined, and is also interestingly enough giving us novel statistical predictions of ingredients that are not occurring together.

In conclusion, if we treat ingredients like discrete words, we can study the similarities and differences of international cuisines. We see that despite the fact that everyone uses about 8 ingredients, the triad of French, Italian and American cooking are more similar in their ingredient usage, and the Greek and Mexican are more unique in their ingredient usage.

Now I am hungry. Dinner time!