Part 1: Exploratory Data Analysis — The Guardian Recipes
The Guardian publishes celebrity chefs’ recipes on a daily basis. The food section of the newspaper provides inspirations for new dishes to food lovers, hobby cooks, hungry students or tired parents. It invites amateur chefs to explore the boundless culinary world, to engage with new ingredients and flavours, to learn cooking techniques or to find inspiration for celebratory feasts. In a nutshell, The Guardian food section whets every readers’ appetite.
Newspaper culinary articles, however, shed light on much more than just food ingredients. They influence the food culture, the consumer purchases, the reader diets and the traditional family recipes. Moreover, they serve as a springboard for young chefs and sustain the establishment of trusted and beloved ones.
My curiosity for web scraping as well as my passion for data analysis and food, naturally draw me to access and explore the content of these newspaper articles. The Guardian was the first newspaper that came to my mind when starting my research and thus allows me to gain insight into the British culinary scene. The aim of this article is to present some exploratory data analysis of the Guardian Food Recipes that have been published from the 1st of January 2009 to the 16th of June 2019.
If you are feeling a bit hungry and would like to accompany your reading with a little snack, you can find all the interesting recipes here!
Data and Methods
Before starting my analysis, I first needed to collect the data! This was done through Web Scraping using Beautiful Soup and Requests. As it was the first time I experienced it, it wasn’t as easy as baking a pie. It took me some hours to read through the HTML code of the recipes pages, looking at where each element was stored. I was lucky to find great help of other medium members, especially the tutorial from Kerry Parker, and the article by Ritvik Kharkar were really useful.
In total, I collected 7,361 recipe articles with the oldest one dating back to the 3rd January 2009 and the most recent being from the 16th of June 2019. While scraping through the recipe URLs, I particularly focused on retrieving the following seven pieces of information:
- Date of publication
- Article Headline, or if you prefer, the recipe title
- Article Subtitle, one sentence describing the recipe
- Article Content, the recipe text with the ingredients list
- Author name
- Number of comments and the number of times the article has been shared
Some of the articles did not have information for the aforementioned elements, thus if one element was not found the word “None” would be written. In a second step, I removed the recipes which had no authors and no subtitles.
Analyzing the Recipes
The following graphs and tables illustrate the analysis steps taken to better understand the culinary heritage of The Guardian. Here I present the following preliminary analysis:
- The number of recipes per year, per month
- The five most famous chefs per year (by number of recipes published)
- The most famous categories per year (by number of recipes)
- The percentage of recipes published for special occasions
- The ten most shared recipes
- The ten most commented recipes
Number of recipes per year, per month
The bar graphs below show the number of recipes that were published for each year, between 2009 and 2019, for each month for all the year. Interestingly, there has been a rise in food recipe publication after the year 2012 reaching a peak in 2013 with a total of 882 recipes. This has since slightly decreased again, but on average, there have been 2 recipes published every day since then.
What is your guess for this year, 2019? Will the chefs be creative and publish even more than in 2013?
Top 5 Celebrity Chefs per year
Looking at the five authors that have contributed the most to The Guardian recipes give an insight into the popularity of the chefs. Is there a change over the year? Is there a cook getting more attention, and so has earned the privilege to contribute with his own column? The interactive graph below shows the five chefs with the highest number of recipes published for each year.
At first glance, it is indisputable that Nigel Slater and Yottam Ottolenghi are the most prestigious Food Recipes authors. Since 2009, both chefs have continuously contributed to The Guardian culinary heritage, influencing how people buy, prepare, cook, share and eat food. It is worse to notice that Nigel Slater is likely as busy as popcorn on a skillet, as he contributes over 100 recipes each year. Thus, he surpasses all the other chefs!
Another interesting point is the turn in contributing authors after the year 2013. From 2009 to 2012, both chefs Dan Lepard and Hugh Fearnley-Whittingstall have written regularly for The Guardian. However, their contribution has stopped since 2013, letting younger chefs take Top Banana. Last year, 2018, and this year, Meera Sodha, Anna Jones and Tom Hunt have joined the top five.
Some quick facts about some of the chefs above!
Dan Lepard is well-known for his amazing pastry recipes! If you are looking for a melt-in-your-mouth recipe, you will probably love Dan’s recipes. He teaches all the tricks for baking the most beautiful and sumptuous pastries, cakes and loaves of bread. Hugh Fearnley-Whittingstall is famous for being the runner of the River Cottage as well as from his campaigns on environmental issues related to food production. If you want to truly discover typical British meals, prepared with seasonal, local and sustainable British ingredients, then Hugh Fearnley-Whittingstall’s recipes will be for you!
Since 2013, there has been a continuous turnover in chef celebrities sharing their food recipes with the Guardian. Meera Sodha is famous for her celebration of dishes which are a celebration of Indian vegetables. If you are looking for an escape to an eastern destination, Meera’s recipes will give you a taste of it. Anna Jones is well-known for her vegetable cookery, which honours seasonality of local products. She spills the beans on where to find the most delicious edible herbs around London for your lunch. Finally, Tom Hunt is famous for his respect for the diversity of nature and people. If you don’t know how to use your broccoli stems, your brown banana or leftover bread, then Tom’s tips will amaze you.
Top Categories per year
Looking at the top categories for each year, it is possible to see some similarities with the highest contributing chefs. This is the result of some chefs having their personal recipe columns and thus the majority of their recipes are categorized as such.
Before you interact with the graph below, I found it particularly interesting to note that some categories mirror some global food and health trends. For instance, “The new vegetarian” category written by Yotam Ottolenghi between 2008 to 2010 has probably lead the way to the current trend in veganism and the increasing number of British people reducing the animal products in their diet. Categories that dedicated to the sweet tooth such as “How to bake” by Dan Lepard and “Ruby bakes” by Ruby Tandoh were among the top 10 until 2015. While love for baking hasn’t disappeared and recipes from The Great British Bake Off are still published in the Guardian, their importance might have decreased to some extent following efforts of Public Health England to tackle the obesity crisis.
British Festivities and Food
Festivities like Christmas or Easter are intrinsically linked to food. For each of these occasions, the dishes are carefully chosen. Some families will plan the menu days in advance, trying a few new recipes as well as preparing the traditional family ones! These occasions give a perfect opportunity for chefs, restaurants, food companies and food retailers to inspire amateurs and tempt your gluttony!
The graphs below show the percentage of occasion recipes (Valentines, Easter, Halloween, Bonfire Night, Christmas, New Year) in the total of the recipes published for each year and each month.
Interestingly, recipes dedicated to Christmas start to be published around October and make up to 30% of all recipes during the month of December. Bonfire Night, also known as Guy Fawkes Night is a traditional commemoration in the United Kingdom and some Commonwealth countries. This festival is celebrated on the 5th of November with large fireworks and bonfires around the country. Usually, families and friends will gather and enjoy cheesy jacket potatoes, creamy pumpkin pie, crunchy toffee apples or sticky chocolate marshmallows!
The 10 most shared, 10 most commented recipes
Looking at the ten most shared and ten most commented recipes gives an interesting insight into readers’ interests or articles raising controversies among readers. The following tables present the most shared and commented recipes and the authors behind them.
Not surprisingly, the most famous chefs are also the most shared. And apparently, readers like to share their Christmas recipes! Readers also like to learn tips and tricks and thus, “How to cook” recipes are also largely appreciated! Also, note the high number of shared for “Yotam Ottolenghi’s super-cheap recipes for students”! Students know where to find the best food deals, right?
The most commented recipes show how highly readers engaged with an article. This illustrates articles that have given readers food for thought! Have a look at the following recipes and their comments to see how closely food affects our emotions, at times raising admiration, astonishment or indignation.
Time to come to an end! 🙂 This article has explored some 7,361 food recipes published in The Guardian from January 2013 to June 2019. It was really enjoyable to explore these recipes and get to know more about famous British chefs.
If you are interested in seeing my preprocessing steps, how I picked, washed, chopped, seasoned and finally arranged the numerous data, you can have a look at my GitHub repository over here!
Next course on the menu?
The next meal (guardian food article part 2) will deliver some more flavour from the chefs you love to learn from and showcase the meals you should be preparing, each season. I will present to you the findings of my natural language processing (NLP) analysis. Be prepared to see the recipes finely chopped!
Thanks for reading! Aude
Before cleaning the dishes!
I hope you enjoyed the post and if you’d like to leave any comments, suggestions or thoughts, I would really appreciate it! So please, feel free to reach out!
Also a huge thanks to Medium’s members for sharing their work and providing helpful tutorials that always give me new insight into useful tools and methods!
PostScriptum: Please, note that by looking into the Guardian Food recipes, I am only providing you with a small overview of the culinary British food scene and thus, may miss some of your beloved food celebrities.
MSc. Student in Urban Analytics at CASA, UCL in London. Passionate about food culture and innovation, cities, and people behaviours. Get in touch via Twitter or LinkedIn.