Using Data to Create a Guide for Your Grocery Shoping
The skills the author demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.
Introduction
This shiny data app can be found here: http://shiny.markko.net/food_nutrition/
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.
Shiny App Data
Diet By Countries
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.
Nutrition Factor
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.
Relationships
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.
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.
Conclusion
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.