Using Data to Analyze Coffee Stats

Posted on Jul 1, 2019

The skills the author demonstrated here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.


Coffee! Based on data, humans has been consuming coffee since 9th century. Coffee is a major export commodity, being the top legal agricultural export for numerous countries. It is one of the most valuable commodities exported by developing countries. This shiny app, Coffee Stats presents the trends of the coffee production and consumption among the countries in the world. The code for this project is present in the Github.

Using Data to Analyze World's Top 5

The bar charts depict the World's Top five countries in 'Domestic Consumption' and 'Total Production' categories. Brazil is the leading country in production and consumption of the coffee crop. Vietnam is the next leading producer in the world after Brazil whose total production is twice that of Vietnam. Each graph shows the top five countries in their respective categories with data in the recent years. The text in the hovering box displays country, year and production/consumption information of that particular year.

Using Data to Analyze Percentage Change in the Total Production

This tab presents the percentage change in the total production of the crop in the member countries whose median total production greater than three million bags per year in recent years (2010 - 2017). The hovering text presents country, year and percentage change in the production information for that year. Based on my observation from the graph, there is production decrease in Latin American countries like Brazil, Colombia, Honduras and Mexico due to coffee rust fungus which has been reducing the yield of the crop. In countries like Vietnam and India with a production increase of 15% and 12% respectively in recent years are identified as emerging markets. These emerging markets serve investing opportunities for big coffee retailers like Starbucks and Tim Hortons.

Using Data to Analyze Coffee Stats

Trend Over The Years (1990-2017)

This tab presents the trend of Production and Consumption of the member countries over the years 1990 to 2017 using a scatter plot of the countries whose median total production is greater than three million bags per year since 1990. The hovering text presents the country, total production and domestic production information.

Using Data to Analyze Coffee Stats

Using Data to Analyze Crop by Seasons

This tab presents the scatter plots of consumption and production by Spring, Summer and Fall seasons. I calculated the correlation between domestic consumption and total production per season Spring (0.98), Summer(0.06) and Fall(0.58) which suggests the existence of a relationship between domestic consumption and total production for seasons Spring and Fall.

Using Data to Analyze Coffee Stats
Using Data to Analyze Coffee Stats
Using Data to Analyze Coffee Stats


The data indicates that in recent years in Latin American countries like Brazil, Colombia, Honduras and Mexico, the coffee crop yield has been affected by Coffee Rust fungus. While the governments of those countries take up the measures to contain the fungus and plant more of the fungus resistant variety seeds, big coffee retailers can invest in the emerging markets like Vietnam and India whose production has been increasing in recent years to offset the crop production deficit in Latin countries.


Future Work

I would like to continue my work on this project by getting my hands on the datasets of coffee importing countries and coffee prices over the years to see how the demand for coffee in the importing countries drives up the prices of coffee. Also would like to see if there is any relation between changing climate and production of coffee.

Thanks for reading.

About Author

Venkata Vemanedi

Venkata Vemanedi is a cohort in the NYC Data Science Academy with previous experience in Finance, Retail industry in Project Management and Sybase database development. Venkata is a graduate with MS in Applied Computer Science from University of...
View all posts by Venkata Vemanedi >

Leave a Comment

No comments found.

View Posts by Categories

Our Recent Popular Posts

View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI