The Witch’s Brew

BigVisualData
3 min readJan 2, 2023

--

While reading this you may like to listen to Omnia’s “Wytches’ Brew”

Teaching about networks is sometimes boresome for my students. It is nice to show iconic networks or speak about real life criminal networks and so on. But this may not sound as an easy entry level hands-on practice. Why not try something familiar, fun, and unexpected. How about the ingredients of Hermione’s Cauldron, the potion savant of Hogwarts School of Wizardry? Are there common ingredients for different potions, balms, and antidotes? Are there rare ingredients that bridge different kinds of potions and filters? What should a nerd student of Hogwarts always keep with him/her?

The Witch’s Brew (image by the author)

The inspiration

The idea of creating networks related to food originated from the work of Albert-László Barabási and his colleagues: In a paper published in 2020 Hooton, Menichetti & Barabási presented an algorithm to identify references to chemical components included in nutrition ingredients not yet included in relevant databases. Then, they use “unsupervised machine learning to create chemical embeddings, finding that the chemicals identified by FoodMine tend to have direct health relevance, reflecting the scientific community’s focus on health-related chemicals in our food.”

In another paper, Milanlouei, Menichetti, Li, Loscalzo, Willett & Barabási (2020) use network theory “to explore comprehensively and agnostically the association of 257 nutrients and 117 foods with coronary heart disease risk.”

My friend and colleague Moses Boudourides provided an analysis of roman culinary recipes based on Caelius Apicius’ “De re culinaria,” with 60 recipes, 64 title ingredients and 134 contents ingredients.

Moses Boudourides, A Visualization of the Directed Graphs among Ingredients in the 10 Books of Caelius Apicius’ “De re culinaria”

The data

Finding a complete list of ingredients and potions in the Harry Potter series of books, films and paraphernalia is not always convenient. Gulsah Demiryurek posted a dataset in Kaggle containing 74 potions, and for 40 of them ingredients are included.[1] Though a good start, it is not as much as needed. While character networks are readily available in several places, the potion ingredients are not thought of as an interesting thing per se. Thus, the list provided at the Harry Potter Wiki[2] was a nice surprise. It contains 95 potions, and 284 ingredients, though some are not properly related to certain potions (they seem to be more generic) or have a yet unknown use.

[1] https://www.kaggle.com/datasets/gulsahdemiryurek/harry-potter-dataset?select=Potions.csv

[2] https://harrypotter.fandom.com/wiki/List_of_potion_ingredients

Preparing the data

Though the list was ready, a lot of preprocessing had to be done. I worked in Excel for convenience and created two workpages: one for the nodes and one for the edges. In my case there were two kinds of nodes: the ingredients and the potions or other types of magic stuff like filters or antidotes. In this network the edges, also called ‘ties’ or ‘links,’ are highly important: there are two kinds of edges: one to connect ingredients to potions, and another to connect the ingredients used for preparing the same potion.

Read in my next post how I worked with the dataset, in Gephi.

--

--

BigVisualData

Analyzing Visual Corpora with computational methods. It’ll provide pieces on methodology, sociological & semiotics viewpoints. Yannis Skarpelos