maandag 28 juli 2014

Comparing Asian Cuisines using food pairs

One of the great things of Rachel Laudan's Cuisine and Empire (the New York Review of Book has a very good synopsis/review) is that she offers hypothesis on the history of food that can be tested. Most writers look at cuisines as black boxes, almost magical entities that come and go without underlying logic. Laudan positions them on a continuum of a few dietary philosophies. Why eat what or not? what makes health? what makes good food? There are local influences at work of course but much she explains by what degree competing philosophies left their mark. Two of my favourite episodes from the book are those in which Laudan describes how the various culinary philosophies (Confucian-Taoist in China, Buddhist in India, Islamic coming in from the Middle East, with earlier sacrificial systems remaining present at the background) met and mingled on the Asian continent. Would it be possible to look at major Asian cuisines as they are today (Chinese, Vietnamese, Thai, Korean, Japanese, Indian) and compare and cluster them for their similarity? And would that confirm the clusters of shared influence Laudan's theory predict? If have not a clue.

The above graph takes as input four Chinese and four Indian cookbooks and compares each of them with all others. The result is  a cluster of Indian cookbooks matched with each other (to the right, high similarity), four Chinese cookbooks clustered in the middle and the Chinese/Indian books have least similarity. Having established that cookbooks of the same type of cuisines will be more like each other than others (read: having established that comparing foodpairs is perhaps a way to compare cuisines), we have turned them into one big file representing a cuisine. There are six cuisines present here, derived from 24 cookbooks.

These 'cuisine' files were all compared with each other and this resulted in the following:

The horizontal line gives similarity (a 27% similarity between Vietnamese and Chinese food pairs) and the horizontal lines gives the total number of unique foodpairs present (7005 for Vietnamese/Japanese). All cuisines compare least with Indian cooking and that is how theory would predict it (India undergoing most influence from the Middle East) and Chinese and Vietnamese are most alike as I would have predicted it, without any theory to back that up. All the others are roughly equal.

It remains a big question if cookbooks can stand for anything but clumsy representations of the real thing for English-speaking markets. But what are you to do.

zondag 27 juli 2014

All Cooking is Fusion Cooking


Ingredients: Allspice, corn, tomatillo, chiles, tomato, chocolate, peanut, thyme, cumin, onion, garlic, raisin, cinnamon

Areas of domestication:

South Mexican and Central America:
Allspice, tomatillo, chilli
South America (Peru, Ecuador, Bolivia, Chile):
Tomato, chocolate
Brazil, Paraguay:
The Mediterranean:
Thyme, cumin
Northwest India, Afghanistan, Tadjikistan, Uzbekistan:
Onion, garlic, raisin
India, Bangladesh, Myramar:

There is no cuisine in the old world that has not completely absorbed several food crops from the new world. Potatoes, sweet potatoes, cassava, chilli peppers, peanuts and tomatoes, to name just a few, are now staple foodstuffs across the world but they are originally all from the Americas. The national cuisines of the Americas themselves are dominated by old world flavours and ingredients like onion, garlic, coriander, black pepper, rice, wheat, beef, pork and chicken. The European discovery of America and the 'Columbian exchange' that followed, the term was coined by Alfred W. Crosby in 1972, is an ongoing process of biological levelling. Isolated Amazonian tribes are still succumbing to what are to us harmless childhood diseases, plants and animals are still finding ways to become invasive elsewhere, the craze for quinoa shows that there are still Andean crops to be integrated in the global food market.

In her book Cuisine and Empire (2013) Rachel Laudan writes about the bedazzlement that overcame the Mexican poet Octavio Paz when he travelled to India in 1962. He could not make-up what had happened, how it could be that such different countries had such a similar cuisine. Was the Mexican national dish Mole “an ingenious Mexican version of curry, or is the curry a Hindu adaptation of a Mexican sauce”. Unable to explain the shared love for chilli peppers and flat bread (the chapati and the tortilla), taking note of the fact that the chilli could only have been introduced to India from Mexico in historic times, he concluded that “the two cuisines share a position that can only be called eccentric: they are both imaginative and passionate infractions of the two great canons of taste, French and Chinese cuisine.” A strange and incredulous conclusion. What made Mexican and Indian cuisine look and taste alike should be understood, Laudan argues, as a consequence of the spread of Islam as the dominant religious and political power from India to Spain. Columbus himself was only admitted to the Spanish court to plead his case after King Ferdinand II had conquered the last Moorish stronghold in Southern Spain. Only with the Moors gone could resources be allocated to speculative journeys of exploration. What the Spanish ate was however still a local rendering of the same style of food that the Mughal empire brought to India. Chiles spread almost everywhere almost as soon as the Europeans discovered America. India and Mexico share the right climate for the plant and its taste found a niche that nobody in the old world knew existed until they tasted it. Mexican cuisine is an old world cuisine developing in the new world.

Map 2: Mulligatawny

Ingredients: Chiles, tomato, black mustard, cumin, coriander, lentil, onion, garlic, lemon, coconut, black pepper, ginger, turmeric, plum

Areas of domestication:

South Mexican and Central America:
South America (Peru, Ecuador, Bolivia, Chile):
The Mediterranean:
Black mustard, cumin
The Middle East:
Northwest India, Afghanistan, Tadjikistan, Uzbekistan:
Mustard, onion, garlic
India, Bangladesh, Myramar:
Lemon, coconut, black pepper, ginger, turmeric


From the perspective of the ingredients one conclusion is inescapable: at a deep level all cooking is fusion cooking. From the perspective of culture this is blatant nonsense. Food is something to take pride in and claim as your own, on personal level, on family level as well as on ethnic, religious, political and national level. On these different scales of food, the local and the global, the temporary and the historic, the cook makes her or his choices.

A fusion cook, someone who mixes tradition with alien elements with the intention of creating a novel effect or flavour is always making a statement about the importance of identity and tradition and experimenting with how far diners are willing to go in their loyalty to them. It is easy to sympathize with the Indians of the 18th and 19th century, who, with bewilderment, must have taken note of the 'Indian' food that the English in India were concocting and sending back to Europe. A dish like Mulligatawngy, a soup, became popular throughout Europe as an example of an exotic cuisine. In reality is was as novel to the Europeans as it was to the Indians: the concept of a soup was unknown on the South-Asian continent. The anglicized curry was a form of culinary imperialism, yet another example of a regime taking its own prejudices for reality, misunderstanding the food as much as they did the continent, a further humiliation of a subjected people.

The mulligatawny is a European food-monument of that time and recipes for it are included by major cookbook writers like Mrs Beeton and Escoffier. Jane Austen ate 'currees' and liked them. William Thackerey wrote 'Poem to a Curry', a recipe inside a poem proscribing a way of cooking a curry that was purely European. Thanks to google books we have easy access to publications like the 1830 issue of the 'Arcana of Science and Art, Or an Annual Register of Popular Inventions and Improvements, Abridged from the Transactions of Public Societies, and from the Scientific Journals, British and Foreign, of the Past Year' and the 1840 edition of the 'Magazine of Domestic Economy'. The food snob is a thing of all ages and these pages show a lively interest in the proper ways of cooking Indian food. This excitement for a new food perhaps explains why it was in the end good for Indian morale. The mulligatawny has been naturalized and is now claimed by Indian food writers such as part of Indian food heritage. Curry-Bible author Madhur Jaffrey uses it as an example of the baroque turns food can make without losing its own identity. You can take the curry out of India, you can't take India out of the curry. Culinary change is not a special circumstance but part of its nature.


Ingredients: Parsley, celery, thyme, fennel, rosemary, bay leaves, oats, mustard, onion, shallot, garlic, carrot, almond, walnut

The Mediterranean:
Parsley, celery, thyme, rosemary, bay leaves
The Middle East:
Northwest India, Afghanistan, Tadjikistan, Uzbekistan:
Mustard, onion, shallot, garlic, carrot, almond


Mole is Mexican no matter how much Moorish-Iberian prestige cooking was transported to it. The pizza wouldn’t be less Italian if the tomato was brought to it from outer space instead of from South-America. Both foods can however only exist as a result of larger historic circumstances that made local crops global. Map your Recipe is a website that turns any recipe into a map showing where the fruits and vegetables that went into it were first domesticated. It does not explain the historic processes of what events made what dishes possible, but by translating recipes into maps it can perhaps make visible patterns in cuisines and dishes that can only be seen from a distance. When applied to individual chefs distant cooking a recipe can reveal unspoken biases. Heston Blumenthal is at the forefront of molecular gastronomy, a way of cooking inspired by the latest developments in food science. The idea of 72 sautéed snails in oats-porridge is not immediately attractive to most people, even if they are French. The challenging nature of the main ingredient is probably explained by the environmental benefits that could be had by an increased use of non-mammalian proteins. But when putting Blumenthal’s snail porridge on the map the result is not just classical but geo-conservative. There are no ingredients here that were not available in the Middle Ages.


Ingredients: Chilli, cashew, olive, chicory, coriander, pomegranate, onion, spinach, sesame, lime, ginger, soy, cranberries, mint, watercress

Areas of domestication:

South Mexican and Central America:
Brazil, Paraguay:
The Mediterranean:
Olive, chicory
The Middle East:
Northwest India, Afghanistan, Tadjikistan, Uzbekistan:Onion, spinach
India, Bangladesh, Myramar:
Sesame, lime, ginger
Old world, but not exactly known:Mint, watercress

Jamie Oliver has sold more than 10 million books and it suggests that his type of food is accessible to many people. The map showing the origin of domestication of the ingredients in his Asian style turkey dish with pancakes is very different from Blumenthal's food sourcing. In this one dish Oliver manages to use resources from around the globe with what can only be called pan-globalist promiscuity. But his recipe does not contain anything out of the ordinary and all his ingredients can be purchased in probably all supermarkets in the developed world. Map your Recipe has as an inbuilt feature which tries to guesstimate the cuisine of a dish based on its ingredients. Using his distinctive wide ranging choice of ingredients this function will also try to determine if a recipe could be from Jamie Oliver.  


By analyzing historic cookbooks for the origin of its ingredients it might be possible to put in perspective the food diversity that we find taken for granted in Jamie Oliver. The above charts have been produced from data obtained from 46 out-of-copyright cookbooks, published between 1390 and 1935. The earliest is the Forme of Cury (1390), its unknown authors cooks to King Edward II. The latest is the Sunset All-Western Cook Book (1933) an all-purpose cookbook with “Recipes Included for Favorite Regional, and Foreign Dishes Peculiar to the West “. In between there are classics like the Art of Coockery by Hannah Glasse (1747), The Book of Household Management by Mrs. Beeton (1859), A Guide to Modern Cookery by Auguste Escoffier (1907) as well as a titles like The Curry Cook's Assistant, or, Curries, How to Make Them in England in Their Original Style by Daniel Santiagoe (1887).

Some observations:

- In the early part of the 17th century the number of ingredients available increases sharply.

- A second sharp increase happens 200 years later in the beginning of the 19th century.

- It takes to about 1650 when produce from the Americas are significantly introduced to the larder.
-American crops on there own are not enough to explain the increase in the 17th century.

All the early cookbooks used to create these charts were intended for use as mnemonics at royal courts. The modern cookbook was only created in the 18
th and 19th century and written for the emerging middle-classes. The abundant use of small game birds in the royal medieval kitchen however would get any restaurant recreating them into problems with animal rights activists. We hear much about how people's diets across the globe are getting more similar. Calling globalization a melting pot is however a faulty metaphor. Culture is not a can of paint, there is a plenty of room on the plate. Travel and migration, curiosity and surplus are creating chaotic gastronomic exchange routes on which a million mulligatawngies can emerge without hurting anyone's feelings. Global food culture is literally, filling the map and connecting the dots. Eat well.

With gratitude to Rachel Laudan for clarifying some details.
Reay Tannahill - Food In History, Penguin 1988.
Brothwell and Brothwell – Food in Antiquity. John Hopkins University Press, 1998.
Alfred W. Crosby – The Columbian Exchange, Biological and Cultural Consequences of 1492, Greenwood Press, 1972.
Madhur Jaffrey, Ultimate Curry Bible, Ebury Press, 2003.
Charles C. Mann, 1493: Uncovering the New World Columbus Created, Vintage, 2012.
Rachel Laudan, Cuisine and Empire, Cooking in World History, University of California Press, 2013.

vrijdag 25 juli 2014

Weeds and Aliens

Weeds and Aliens (1961) by Edward Salisbury (the man had more honorary titles than I have teeth) is the absolute classic book that pioneered the modern study and appreciation of wild plants in a globalized, man-made environment. I have not completely read it but you only need to read 10 pages to understand that this book is fundamental to a way of looking at plants (and the world) that is still edgy. Everything Richard Mabey has ever written is a mere footnote to this book. Peter del Tredici, Emma Marris and the entire novel ecosystems/anthropocene line of thinking should cite Salisbury's book out of habit.

Weeds and Aliens was published as part the same New Naturalist series that included the Fitter book on the Natural History of London. Where biology has now moved into the ivory tower of DNA-sequencing this is still old school and everything Salisbury did every plant spotter or gardener can do. It is experimental science with everyday materials. He collects data on seeds, soil and distribution but Salisbury does it with an intelligence and memory that few people can match. It is a tough book to read, its scope is encyclopedic but not with a desire to collect all the knowledge of the world but out of desire to share with his readers the excitement of the versatility of plants and the geographic narrative of a industrializing world they tell. It is old fashioned and refreshing at the same time to meet a writer who does assume his readers to be idiots and expect them to want to know everything to the last detail. How else can he excite if the facts themselves are left out? 

Weeds and Aliens is a book for nerds. Maps, lists, raw data. drown in it and be happy.

zondag 20 juli 2014

Food Pairs 101

What follows is a brief explanation of what our work with foodpairs is trying to do.  

Foodpairing is the theory that foodstuffs go well together if they share key chemical compounds. The ur example is Heston Blumenthal's combination of caviar and white chocolade that both contain high levels of amines. Some work has been done to turn bodies of recipes into frequency lists of foodpairs, creating an informal hierarchy of good taste. 

Here we don't buy into the theory of foodpairing, which is culturally specific anyway, but we are using its concept of a 'food pair'. Our interest is not culinary but historic: can the way cooks and cuisines combine ingredients, now and in the past, show affinities and differences. Can it illustrate larger historic explanations of how cuisines have developed.

The foodpairs for a Aloo Gobi recipe look like this:
A diagram of it looks like this, a network with all nodes connecting each other.

Here is a graph of the same aloo gobi but combined with those for a Lasagna recipe. They share an ingredient but have no foodpair in common.

When graphing foodpairs for a larger body of recipes, a cookbook, some combinations will be more common than others, this is expressed with line-width and distance as this graph of a Madhur Jaffrey cookbook shows:

It seems reasonable to suggest that different cuisines will each have a preference for certain ingredients and when they use the same ones they will combine it differently. It also seems reasonable to expect that cuisines that developed together will differ less than cuisines that didn't. This is what we want to verify.

By combining the foodpairs of the Jaffrey book with a Mexican cookbook we get the graph below. It gives some information about their commonality but without context nothing definite can be said.
To make some real sense of the ways foodpairs show affinity across the culinary scale we need a metric. The Jaccard index is a simple way to calculate similarity in data-sets. When comparing two sets that are exactly alike (comparing the foodpairs of a book with the foodpairs of its unchanged reprint) it will score 1 -> 100% similarity. If they are completely different the score is 0. 

Using the same Mexican and Indian cookbook as above we can calculate the Jaccard index as 0.11- > of the 8135 unique foodpairs the books together yield, 11% are present in both books. Without context it is a useless number but now look at the graph below that compares the foodpairs from the Jaffrey cookbook with 13 other cookbooks covering a number of styles (national cuisine and celebrity chefs). 

The Jaccard index (in whole percentages) is mapped horizontally. The vertical scale gives the total number of unique foodpairs in both books. 

That Jaffrey compares most with another Indian cookbook gives us some comfort that we are not generating random data. Jaffrey comparing least with Rene Redzepi's NOMA cookbook feels right too. The theory that Mexican and Indian food share the same middle eastern influence is hard to corroborate with this, but it could be informing that it finds more commonality with Middle Eastern food (and Greek) than with anything else.

The next graph compares the Mexican cookbook with the same books. The highest similarities found are with a book by Nigella Lawson and with a book on Hawaiian food. Notice the position of the two Chinese cookbooks in the left corner for both graphs.

Note: saying that we are comparing cuisines is obviously not true. We are comparing English language cookbooks written for an audience of English speaking home cooks, explaining them the things they expect to be explained and with ingredients that can locally purchase. Which brings us to the unanswered question what a cookbook really represents. 
In any case: the problem of meaning here is endless and this stuff will explain nothing.

vrijdag 18 juli 2014

The Moscow Rules

The Moscow rules is the name for an informal protocol on how spies are to behave while undercover on alien territory. They are fake, it makes their psychogeographic crispness even higher.
  1. Assume nothing.
  2. Never go against your gut.
  3. Everyone is potentially under opposition control.
  4. Don't look back; you are never completely alone.
  5. Go with the flow, blend in.
  6. Vary your pattern and stay within your cover.
  7. Lull them into a sense of complacency.
  8. Don't harass the opposition.
  9. Pick the time and place for action.
  10. Keep your options open.

woensdag 16 juli 2014

Interactive bubble graph for ingredients in 13 cookbooks -> Jaccard index

Food pairing / gastronomy with a telescope [Part Two]

Earlier we have looked at the possibility of using foodpairs as a yardstick by which bodies of recipes can be compared for their (dis)similarity. The aim is to so look at cuisines in order to see how Asian cuisines differ from Western ones, how Asian cuisines differ internally and how the cuisines of the new world in turn relate to the ones from the old world.

This is interesting to pursue for the way it might corroborate larger historic explanations of how cuisines have developed. China developed in isolation much longer than any other civilization in the old world, is its cooking also more singular? India has been invaded several times and its food is very much a product of its own cultures clashing with its Muslim conquerors, does that make it stand out from the other Asian cuisines? Read Rachel Laudan's book Cuisine and Empire for the bigger historic picture.

In practice when using the word cuisine we are actually comparing English language books written for an audience of English speaking home cooks; an important difference. 

The number of foodpairs a recipe generates increases exponentially with the number of ingredients. A typical cookbook (and the ones we use here are all modest one) yields anywhere between 700 and 2500 pairs, the number of connections when comparing three books is large and a really meaningful way to visualize a foodpair comparison we have not yet found. Instead we have turned to using the Jaccard Index, a simple formula for comparing similarity in datasets.  If two book are absolutely similar (a book compared with itself) the index is 1, if the books are completely dissimilar the index is 0. So how higher the number how greater the similarity. Let's look at how Jamie Oliver's Naked Chef compares to 12 cookbooks representing many styles and cuisines.

The Horizontal line is most important as it shows the similarity (in %, Jaccard index*100) between Oliver and the book being compared. The vertical line gives the total number of unique foodpairs in both books. According to this Oliver is most similar to other UK TV chefs Nigella Lawson (27%) and Gordon Ramsay (34%). He is equally similar to books on French, Mexican, Brazilian and Greek food. He is least similar to the two Chinese cookbooks (8%). The fcat these two Chinese cookbooks are equally dissimilar is important: it shows they are themselves similar, as you would expect. 

Here is the graph comparing Vietnamese, Thai, Indian (Madhur Jaffrey) and two Chinese (one by Ken Hom) cookbooks. 

Indian/Chinese has the least similarity, Chinese/Chinese most but with 16% which puts perspective on the 34% similarity between Oliver and Ramsay.

Here is the graph comparing 13 cookbooks with each other, it is large to make it legible (click to enlarge). A rough guess is that 10-15% comparison is average. The 20+ similarity for UK celebrity chefs is striking but further work will have to decide how striking.

It is much easier to compare cookbooks on the presence of ingredients alone, there is much less data. When doing this for the same books as above the graph below is created. Or check here for a interactive one.The numbers are different, the Jaccard-index gets much higher (54% ingredient similarity between the top-scoring duo Ramsay and Oliver), but the overall shape of these two graphs is recognizably similar, especially when you factor in the difference in scale. This is good news because proper food pair data (recipe for recipe) is hard to create while creating ingredient lists for books is exactly what foodmap does.

zondag 13 juli 2014

IBM's FlavorBot

Twitter amigo Theun shared this article on Chef Watson IBM program for an AI constructing recipes.
The invite-only portal lets users enter ingredients, the type of food they want to prepare (a sandwich? a stir-fry?), and a “style” to prepare food in such as Indian or Austrian, and then automatically generates 100 recipes based on those parameters. One of the big advantages for Watson’s data scientists is that Bon Appetit presented them with a recipe database that was preformatted and quality tested, making IBM’s job easier.
 Of course they want it easy!

Another article gives us the above image of a recipe for a computer generated Indian Turmeric Paella. 

<Insert cynic quip>

Both articles suggest that big data firms are ready to quantify taste and flavor on a scale of "hedonic psychophysics" or "the psychology of what people find pleasant and unpleasant" in order to manipulate and sell it. 
To generate these food leads, if you will, AI cross references three databases of information:
  1. A recipe index containing tens of thousands of existing dishes that allows the system to infer basics like “what makes a quiche a quiche”
  2. Hedonic psychophysics, which is essentially a quantification of whether people like certain flavor compounds at the molecular level
  3. Chemoinformatics, which sort of marries these two other databases, as it connects molecular flavor compounds to actual foods they’re in
<Insert another cynic quip>

I might be sitting on a gold mine!

Another article gives 4+1 recipes generated by chef Watson. The compare-yr-recipe of these is like below. A nice, well demarcated, image showing each recipe as having its own well-defined ingredient-spectrum. So who is choosing what recipe to cook of the hundreds generated? As Gary Kasparov said about Deep Blue when he lost: It was the hand of God.

What IBM is shirking from using is the term food pairing, in the IBM Watson Cognitive Cooking Fact Sheet they prefer the idiotic term Cognitive Cooking. 
At the heart of this cognitive cooking system are a set of algorithms that draw upon a number of datasets, regional and cultural knowledge as well as statistical, molecular and foodpairing theories to come up with dishes that are high in surprise, pleasantness and pair well. The system begins by capturing and analyzing tens of thousands of existing recipes to understand ingredient pairings and dish composition, and which it rearranges and redesigns into new recipes. It then cross references these with dataon the flavor compounds found in ingredients, and the psychology of people’s likes and dislikes (hedonic perception theory) to model how the human palate might respond to different combinations of flavors.
This line from the same factsheet is of course complete bullshit:
IBM’s cognitive cooking system can reason about flavor the same way a human uses his palate.

woensdag 9 juli 2014

Spotting Bird Spotters

The Dutch site is a fantastic resource, avidly used by animal spotters of every kind imaginable. Its user-base is tremendous and in total more than 23 billion sightings are currentlyon record. I was just wondering if I could use some of that data and lacking an API I wrote a little screen scraper that collects name, date and GPS coordinates. I will never be able to collect it all (even if I wanted to) for the simple reason that grows faster than I can scrape it. Bloody hell!

As a bit of hobby I wrote an online-map page that shows snapshots of data and can show the geographic distribution of a large number of birdspecies. It won't shatter the earth but here are some screenshots of things I saw.

Somebody spotting birds and plant on a bike?

Cetti's zanger: a very specific habitat.
Great tit/Koolmees, very common but only 330+ sightings.
The raven.