Nutrition Guide for Your Grocery Shoping

Posted on May 17, 2016

Contributed by Ruonan Ding. She is currently in the NYC Data Science Academy 12 week full time Data Science Bootcamp program taking place between April 11th to July 1st, 2016. This post is based on her second class project - R Shiny (due on the 4th week of the program)

This shiny app can be found here:

Have you ever tried to watch your diet? Do you actively look through all the nutrition factors on the back of the package?  Are you one of those people that carefully calculate your calories everyday? Hopefully my App can give you an overview by the type of nutrition you are looking for.

The data is from Open Food Facts, which is an open database that contains nutrition information of 81K products across 139 countries.  There are three questions that I hope the App can address for the users.  First is to give the users the ability to check the nutrition factors across countries and product categories.  Second is to see whether there are some relationships between different nutritions.  Thirdly, the app will give the users the top 15 brands of a specific food category.

First, the app provides an overview of the diet by countries.   For example, the graph shows the rank of countries by the overall carbohydrates consumption.  The graph below  shows that Italy has the most heavy carb diet among all the target countries.  Austria and Germany have lowest carb diets.   The nutrition drop-down selection include various nutrition factors, including fat, sodium, fiber, sugar and overall energy.

Screen Shot 2016-05-16 at 8.40.18 PM


The second graph, which will change as you select the nutrition factor on top of the tab, shows the ranking of product categories by specific nutrition factor. The graph below shows the ranking by average carbohydrates intake again.  All the sugary and salty snacks contain more carb than all other types.

Screen Shot 2016-05-16 at 8.53.26 PM


The second question to address is whether there is a relationship between the two different nutrition groups.  For an example, the scatter plot below shows that the carb consumption has a positive relationship with the energy consumption.  The more carb we consume, the higher calories overall.  Other than protein, carbohydrates and fat, energy doesn't have an obvious relationship with any other nutrition factors.

Screen Shot 2016-05-16 at 9.09.10 PM


The last question to address by the App is to provide consumers a brand list by product type you are looking for.  Users can pull out the list of top 15 brands by the highest nutrition score that was ranked by British Food Foundation.

Screen Shot 2016-05-16 at 9.26.43 PM

While working on the App, I validated some of the conventional diet assumption.  For instance, sugary snack and beverage have the lowest nutrition scores.  Note that the data id based on the voluntarily input by consumers.  It is mostly conducted in the French market.  Therefore, it may lack some credibility in the lower represented countries.

About Author


Ruonan Ding

Ruonan Ding has more than five years of experience in the actuarial science and financial field across asset management and insurance sectors. She was a pricing actuary for a property and casualty company, a lead analyst in capital...
View all posts by Ruonan Ding >

Related Articles

Leave a Comment

No comments found.

View Posts by Categories

Our Recent Popular Posts

View Posts by Tags

#python #trainwithnycdsa 2019 airbnb Alex Baransky alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus API Application artist aws 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 Bundles California Cancer Research capstone Career Career Day citibike clustering Coding Course Demo Course Report D3.js data Data Analyst data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization Deep Learning Demo Day Discount dplyr employer networking feature engineering Finance Financial Data Science Flask gbm Get Hired ggplot2 googleVis Hadoop higgs boson Hiring hiring partner events Hiring Partners Industry Experts Instructor Blog Instructor Interview Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter lasso regression Lead Data Scienctist Lead Data Scientist leaflet linear regression Logistic Regression machine learning Maps matplotlib Medical Research Meet the team meetup Networking neural network Neural networks New Courses nlp NYC NYC Data Science nyc data science academy NYC Open Data NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time Portfolio Development prediction Prework Programming PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R 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 Selenium sentiment analysis Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau team TensorFlow Testimonial tf-idf Top Data Science Bootcamp twitter visualization web scraping Weekend Course What to expect word cloud word2vec XGBoost yelp