Plan your Diet with Shiny

Matthew Boccio
Posted on May 4, 2020

At one point or another, most of us have made personal goals to eat more nutritious, balanced meals. Whether your goal is to drop a few pounds, have more energy, put on muscle, or just feel better throughout the day, managing one's diet is a key way to achieve all of this. Nutritionists and dietitians declare that the best way to achieve this is to have a balanced diet full of fresh, whole produce.

But being able to know whether you're getting the right balance of nutrients from this food isn't easy. Try going to the grocery store, and finding the calorie and vitamin breakdown of some of your favorite foods, and the result is often the same: your favorite vegetable, or fruit, or cut of meat, is completely unlabeled. And the task of looking up each piece, and doing the math of what calories you're getting based on how much you think it weighs, is cumbersome. With this in mind, I designed my Shiny app - Pocket Nutritionist - to be an interactive tool where users can select any food they desire, and find all the information about it that they would need to plan a healthy, balanced diet. 

The app consisted of three main parts: 

The first was a food group comparison, where you would be able to see how different foods compared to one another based on specific macro-nutrients. Does beef have more protein than pork or chicken? Which food group has the highest sugar content? What food groups should I be eating if I wanted to do a keto diet, and I needed a high fat intake? The first page of the app intends to provide easy-to-read graphs that answer all of these questions, and lets you pick specific foods based on the type of diet and nutrient intake you're looking for. 

Second, I created a display panel that lets you compare your individual food choices to the food group it belongs to as a whole. Say you wanted to pick a high carb bread or wrap to include in your lunch, but wanted to pick a type that had low sugar. This tool allows you to see how your specific food choices stack up with the greater whole, giving you more confidence in picking specific items. 

The third and final page of the app is where you're able to commit your choices to a diet plan. Included in the layout is a table, provided by the USDA, that allows you to look up your daily recommended calorie input based on your age, gender, and daily level of physical activity. Once you've recognized what your body needs, it's time to head over to the interactive diet planner, which lets you select multiple foods and see the total calories and macro-nutrients displayed for the sum of all your choices. The reactive pie chart also breaks down your macro-nutrients by percentage, letting you see if your diet is as balanced as you would like it to be. We provide recommended nutrient balances, as outlined by the USDA's dietary guidelines, but feel free to plan your diet according to your needs! 

I plan to use this app personally, and keep improving its functionality to include better available data (micro-nutrient content, additional foods, etc.) because I want to make planning my own healthy meals as easy as possible. So whatever your dietary goals or needs are, I hope that you get as much value out of this app as I do, and hope that every time you're in the grocery store, you know you can rely on your pocket nutritionist for help! 

About Author

Matthew Boccio

Matthew Boccio

Data Scientist with the ability to quickly dissect complex problems, provide thoughtful detailed analysis using data-driven tools and business intuition, and communicate solutions clearly to relevant stakeholders. I believe in the power of data science and its potential...
View all posts by Matthew Boccio >

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 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