Understanding The Flavours Of Cacao Using Exploratory Data Analysis
Eating fine chocolate is far more than a simple indulgence. It’s a complex sensory experience. The cacao tree produces cacao fruit which contains cocoa beans. A chocolate produced with cocoa bean grown in one region can vary completely from that produced in a region just a few kilometers away. Nature gives cacao its flavor and these flavors ultimately become a part of the chocolate.
Chocolate can vary from sweet milk chocolate to super dark chocolate with 80 percent cocoa, and a lot of other options in between. But, how much do you actually know about the different kinds of chocolate? Which country produces the most chocolate? Which chocolate (sweet or bitter) is more liked by people?
To answer all of these questions, I have used the Chocolate Bar Ratings data set from Kaggle. I found answers to the following questions:
- Which country is the largest producer of chocolate?
- How does the cocoa percentage in chocolates affect ratings?
- How does the production of chocolate vary based on type (normal or dark)?
- Which country has the highest chocolate ratings?
- How does the cocoa percentage affect the ratings in different countries?
- How have the ratings for different types of chocolates changed over time?
The rating system in the dataset for chocolate:
- 5= Elite (Transcending beyond the ordinary limits)
- 4= Premium (Superior flavor development, character, and style)
- 3= Satisfactory(3.0) to praiseworthy(3.75) (well made with special qualities)
- 2= Disappointing (Passable but contains at least one significant flaw)
- 1= Unpleasant (mostly unpalatable)
Which country is the largest producer of chocolate?
When we talk about chocolate some of the countries that come to our mind are Belgium, Switzerland, Ecuador, turns out they are the last ones on the list of chocolate producing countries (quality over quantity, I guess?).
Get Ksheerja Seth’s stories in your inbox
Join Medium for free to get updates from this writer.
The U.S.A is the largest producer of chocolate globally, followed by France and Canada, respectively.
How does the cocoa percentage in chocolates affect their ratings?
Chocolate containing 65- 70% of cocoa has the maximum liking, 3.5 being the average rating for this percentage, this is also the only range that has ratings higher than 4.5. The second most rated percentage is 70– 75% cocoa, the average rating for this range is 3.5 as well. The least rated percentage of cocoa is 0- 55% and 90– 100%. This shows that the majority of people don’t consume or like chocolates with extreme cocoa percentages.
How does the production of chocolate vary based on type (normal or dark)?
The results for this bar chart are almost the same as that of the bar chart for the production of chocolate all over the world. As we can see, the production of dark chocolate is more than that of normal chocolate everywhere. Belgium is the smallest producer of normal chocolate and the U.S.A is the largest producer of normal as well as dark chocolate.
Which country has the highest chocolate ratings?
Looks like Switzerland, Canada, and Italy make up for the less quantity with great quality. Australia has the highest median rating of 3.5. Italy seems to be the only country to have a rating higher than 4.
How does the cocoa percentage affect the ratings in different countries?
U.S.A is the only country with the same maximum and minimum ratings for dark and normal chocolate, with median values 3.25 and 3 respectively. Italy, Australia, and Switzerland have the highest median rating for dark chocolate, 3.5. Canada has the highest median rating for normal chocolate (3.37), closely followed by Ecuador (3.25).
From this, we can conclude, Italy, Australia, and Switzerland have the best ratings for dark chocolate and Canada and Ecuador for normal chocolate. Italy is the only country with ratings higher than 4 and it’s for dark chocolate.
How did the ratings for different types of chocolates change over time?
As we can see in the line plot, the liking for dark chocolate has increased over the years whereas it’s the same for normal chocolate.
Ratings for normal chocolate have been mostly steady.
There was a fall in ratings for dark chocolate from 2006 to 2008, followed by a drastic increase up until 2011.
In 2011, normal and dark chocolate had almost the same ratings.
Conclusion
- The U.S.A is the largest producer of chocolate (dark as well as normal).
- 65–75% of cocoa in chocolates is the most preferred range.
- Australia has the highest median ratings (3.5), while U.K and Ecuador have the smallest (3).
- Italy, Australia, and Switzerland have the best ratings for dark chocolate, and Canada and Ecuador for normal chocolate.
- Italy is the only country with ratings higher than 4 and it’s for dark chocolate.
- The liking for dark chocolate has increased over the years whereas it’s the same for normal chocolate.
Acknowledgments
These ratings were compiled by Brady Brelinski, Founding Member of the Manhattan Chocolate Society. For up-to-date information, as well as additional content (including interviews with craft chocolate makers), please see his website: Flavors of Cacao.
Github repository: Here




