Sweet, spicy, North or South? : Indian Cuisine Analysis

ARYA Last Updated : 28 Oct, 2020
5 min read

This article was published as a part of the Data Science Blogathon.

Introduction

Food brings people together, on many different levels!

From ‘Chole Bhature’ and ‘Paneer Masala’ of North to ‘Idli’, ‘Dosa’, and ‘Rassam’ of South, from ‘Dal Bati’ and ‘Dal Dhokli’ of Gujarat, Rajasthan to Bengali sweets and Spicy non-vegetarian food of Assam, Maharashtra’s Zunka, bhaji to Bihar’s Litti Chokha! Indian cuisine is all about mouth-watering dishes. It’s not just the food but the emotion!

Here’s an Indian cuisine analysis using various Data Analysis techniques. So, are you ready to experience the sweetness of the east, a bit spicy meal from the north, mouth-watering dishes from the east, and some delicious cuisine of the South?

Here’s the link to the dataset used: Dataset

 

Introduction to the dataset

This dataset is about the Indian Cuisine Variety. It tells us about various dishes in various states and regions. Besides, it tells us the course of these food dishes and their flavor profiles. So let’s do some analysis of this data! First, importing required libraries :

import geopandas as gpd
import plotly.express as px
from plotly.offline import init_notebook_mode
import matplotlib.pyplot as plt
%matplotlib inline
from wordcloud import WordCloud , ImageColorGenerator
from PIL import Imagess 'pandas.core.frame.DataFrame'>
First, let’s see how many sweet and spicy dishes are included in our dataset.
pie_df = cuisine.flavor_profile.value_counts().reset_index()
pie_df.columns = ['flavor_profile', 'count']
fig = px.pie(pie_df, values='count', names='flavor_profile', title='Sweet or Spicy?',
             color_discrete_sequence=['blue', 'light green'])
fig.show()
cuisine analysis

Time analysis: How much time does it take to prepare and cook these dishes?

Here, some graphs are plotted which will tell us how much preparation and cooking time is required for different dishes. To get to know more about these graphs I’m providing the link of the whole code at the end! Here’s is one sample code for Bar graph :

reg_df = cuisine.flavor_profile.value_counts().reset_index()
reg_df.columns = ['flavor_profile', 'prep_time']
reg_df = reg_df.sample(frac=1)
fig = px.bar(reg_df,x='flavor_profile',y='prep_time',title='Okay!variety in spicy food items is more, but it takes more time to get prepared! Are you ready to wait?',
color_discrete_sequence=['purple'])
fig.show()

Okay! The variety of spicy food items is more, but it also takes more time to prepare them! Are you ready to wait?

cuisine analysis

It took more time to prepare, but wait! sweet dishes also take much time to get cooked, not more than spicy dishes though! 😉

cuisine analysis

Let’s order the main course, as it takes more time to get prepared! Well, don’t forget to order your favorite dessert!

cuisine analysis

Snacks are here! Umm, the main course may take some more time, and dessert too!cuisine analysis

Different states, different tastes: Statewise analysis

Now, let’s see if we can guess the names of states from the names of dishes! Here, I’ve created word clouds for various states. First, have a look at the code.

mh_cuisine  = cuisine[cuisine['state']=='Maharashtra'].reset_index()
name = []
for i in range(0,len(mh_cuisine)):
    text = mh_cuisine['name'][i].split(',')
    text = ','.join(text)
    name.append(text)
    text = ' '.join(name)
wordcloud = WordCloud(width = 500, height = 500, background_color ='black', 
                min_font_size = 14).generate(text)                  
plt.figure(figsize = (4, 4), facecolor = None) 
plt.imshow(wordcloud) 
plt.axis('off') 
plt.show()
g_cuisine  = cuisine[cuisine['state']=='Gujarat'].reset_index()
name = []
for i in range(0,len(g_cuisine)):
    text = g_cuisine['name'][i].split(',')
    text = ','.join(text)
    name.append(text)
    text = ' '.join(name)
wordcloud = WordCloud(width = 500, height = 500, background_color ='black', 
                min_font_size = 14).generate(text)                  
plt.figure(figsize = (4, 4), facecolor = None) 
plt.imshow(wordcloud) 
plt.axis('off') 
plt.show()
r_cuisine  = cuisine[cuisine['state']=='Rajasthan'].reset_index()
name = []
for i in range(0,len(r_cuisine)):
    text = r_cuisine['name'][i].split(',')
    text = ','.join(text)
    name.append(text)
    text = ' '.join(name)
wordcloud = WordCloud(width = 500, height = 500, background_color ='black', 
                min_font_size = 14).generate(text)                  
plt.figure(figsize = (4, 4), facecolor = None) 
plt.imshow(wordcloud) 
plt.axis('off') 
plt.show()

Maharashtra’s Amti, Gujarat’s Dal Dhokli, and Rajasthan’s Dal Bati!

Maharashtra Cuisine Analysis

Maharashtra

Gujrat Cuisine Analysis

Gujrat

Rajasthan Cuisine Analysis

Rajasthan

Here are the ingredients used in West Indian Food :

Assam’s spicy food, Bengal’s sweetness, and Odisha’s variety!

Assam

Assam

West Bengal

West Bengal

Odisha

Odisha

Here are the ingredients used in East Indian Food :

 

Let’s see dishes from some other states :

Aloo tikki, paneer masala, chole bhature….list goes on!

Punjab

Punjab

 

Jammu and Kashmir

Jammu and Kashmir

Here are the ingredients used in North Indian Food :

South Indian sambar with idli, dosa!

Kerala

Tamil Nadu

Telengana

Here are the ingredients for South Indian Food

Cuisine Analysis w.r.t. Ingredients

We’ve seen all the ingredients used in each part of India. Have you observed that few ingredients are common in 2 or 3 regions? Let’s do some Cuisine analysis with respect to ingredients!

So, here are the ingredients which are used in most of the dishes.

ingredients = pd.Series(cuisine.ingredients.str.split(',').sum()).value_counts()
ingredients = ingredients[ingredients>12]

px.bar(ingredients, y=ingredients.values, x=ingredients.index, color=ingredients.values, title= 'Indian cuisine is nothing without these top ingredients!', 
    labels={
    'index': 'Inngredients',
    'y': 'count'
        })

Indian cuisine is nothing without these top ingredients :

Though the following ingredients are used less, they help in making the food more tasty and yummy!

cuisine analysis

Conclusion

So, this was the Indian Cuisine analysis. Conclusions drawn are as follows :

  1. Flavour_profile: In India, while ordering food, one can get many options in Spicy dishes as compared to sweet dishes.

  2. Time: Mostly, Spicy dishes take more time in preparation as well as cooking. Some of the sweet dishes also need more cooking time.

  3. Ingredients: Indian Cuisine has much variety from North to South, and also from East to West! However, few ingredients are common in many dishes.

Links

Here’s the link to code from Kaggle:

Here’s the Github repository link :

– Arya Talathi

I Arya Talathi, am currently a Computer Engineering Student, who likes to seek out new challenges; the one who finds pleasure in exploring new things.

A passionate learner who loves problem-solving, especially when it is a Data problem. Being a Data Science and Machine Learning enthusiast; always ready to play with the data and come to conclusions. Besides, invests a good amount of time in Competitive Programming and Web Designing.

I like to read and write. No amount of money can replace the kind of happiness and satisfaction I derive from writing and exploring the Data Science field. I try to share my knowledge through my writing because I believe in "Knowledge increases by sharing but not by saving".

Responses From Readers

Clear

Rahul G
Rahul G

The results are only as accurate as the raw datasets. There's almost no data on tribal food from the NE states besides a few dishes from Assam. Let alone more granular regional variations from lower-caste kitchens. The skew toward vegetarian dishes also represents biases inherent in the researchers teams.

Ashoke Ssharma
Ashoke Ssharma

Profoundly excellent information

Godfather
Godfather

Looks like the blog page is corrupted...images not loading... Programming commands all visible in place of text...Please correct it... really enjoying the content...

Congratulations, You Did It!
Well Done on Completing Your Learning Journey. Stay curious and keep exploring!

We use cookies essential for this site to function well. Please click to help us improve its usefulness with additional cookies. Learn about our use of cookies in our Privacy Policy & Cookies Policy.

Show details