Giter Site home page Giter Site logo

akash-r34 / calcheck Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 5.8 MB

A project to develop a system that assists users in achieving their health and fitness goals by recommending default diets based on their BMI, and make informed decisions about their dietary choices using various visualization techniques

Python 4.39% Jupyter Notebook 95.61%
data-visualization diet-recommender python tableau vellore-institute-of-technology indian-food-data

calcheck's Introduction

CalCheck: A Diet planner system for your BMI

Team members

Abstract

This project aims to develop a system that assists users in achieving their health and fitness goals by recommending default diets based on their BMI and enabling them to build customized diets. The system will also provide users with insights into the nutrient content of various foods through visualizations, helping them make informed decisions about their dietary choices. To achieve this, the system will leverage Tableau to create interactive and informative visualizations of food and nutrient data. The system will be designed to be user-friendly and accessible to people of all ages and backgrounds. By providing users with personalized diet recommendations and valuable nutritional information, the app aims to help users make healthier choices and improve their overall health and well-being.

Dataset

You can find all the datasets used in this project here -> Datasets

First we construct the Indian food dataset with the help of a python code that uses the requests library to make HTTP requests to the USDA FoodData Central (FDC) API to extract data on various food items. The code creates a dataset of Indian food items by specifying a list of FDCIDs of those items available in the FDC database. It extracts information such as the name of the food item and its nutrient composition in a JSON format. The extracted information is stored in a list of dictionaries, where each dictionary corresponds to a single food item. The code also includes a step to mine 10 items per code block to identify faulty API requests, if any. We also assign a dietID to every food item to create Default diet plan dataset.

Next, we use another python code that generates data for 100 users in the form of height and weight. It then calculates the BMI of each user and categorizes them into four categories based on BMI - "Underweight", "Normal", "Overweight", "Obesity". The code then mines the website "https://www.calculator.net/macro-calculator.html" to find the minimum macro intake data for each user based on their height and weight. It merges the BMI and macro intake data into a single pandas dataframe and exports it to an excel file to create a User and recommended minimum macros intake dataset.

Finally, we use a python code for assigning diet IDs to users based on their minimum nutrient intake level. The code reads in two datasets, the first being a user macros dataset and the second being a diet plan dataset containing diet IDs and their corresponding macro levels. The code then aggregates the diet plans by their macro levels and creates a heatmap for better interpretation. The aggregated data is then converted into a pandas dataframe. Next, the code assigns recommended diet IDs to all users based on their minimum macro levels intake. If the minimum macro levels intake of the user is less than or equal to a diet plan's macro level, then recommend that plan to the user. Finally, the resulting dataset is exported as an Excel file to create a User diet recommendation dataset.

Data Visualization

Software used: Tableau
You can find all the visualizations done in this project here -> Visualization images
You can find all the Tableau workbooks used in this project here -> Visualization workbooks

Building an app from this system

Note: This part of our project is still under construction. We will add this in future work.

CalCheck app

The CalCheck app is a useful tool for individuals looking to track their calorie intake and monitor their progress towards their weight loss or fitness goals. The project includes a mobile application developed using Flutter, a web application developed using Flask, and a database to store user information.

The mobile application allows users to track their calorie intake by scanning food items or manually entering their food intake. The app also provides users with personalized recommendations based on their weight, height, and activity level.

The application provides a dashboard for users to view their progress towards their goals and visualize their calorie intake through charts and graphs.

Connect Tableau with Calcheck

To connect CalCheck with Tableau, we will the Tableau JavaScript API, which allows us to embed visualizations in web pages and applications.

Here are the steps we will use to connect a CalCheck app with Tableau:

  1. Publish your Tableau visualization: You can publish your Tableau visualization to Tableau Server, Tableau Online, or Tableau Public, depending on your requirements.
  2. Get the Tableau JavaScript API: You can get the Tableau JavaScript API from the Tableau Developer Portal.
  3. Integrate the Tableau JavaScript API in your Flutter app: You can use a WebView in Flutter to display the Tableau visualization. The WebView will load an HTML file that includes the Tableau JavaScript API.
  4. Create a Tableau viz: You can create a Tableau viz using the Tableau JavaScript API. You can pass parameters to the viz, such as filters and values.
  5. Connect the Flutter app to the Tableau viz: You can use the postMessage() method of the WebView to send messages to the Tableau viz, and receive messages from the viz.
  6. Display the Tableau viz in your Flutter app: You can display the Tableau viz in your Flutter app using the WebView. The Tableau viz will be responsive, and will adjust to the size of the WebView.
Note that embedding Tableau visualizations in a mobile app can be challenging, and may require advanced JavaScript and Flutter skills. We may also need to optimize the Tableau viz for mobile devices, by using appropriate chart types and layouts.

Conclusion

From the visualization results we can see that this system is well-designed and user-friendly, and it can be a valuable tool for anyone looking to improve their health and fitness. The visualizations used in the CalCheck project are effective in presenting the user's calorie intake and macronutrient breakdown in an easy-to-understand format, and the interactive features allow for a more detailed analysis of the data. However, future improvements could include integrating more advanced features such as machine learning algorithms for more personalized recommendations and adding social sharing features to encourage users to share their progress with friends and family

Future work

'Building an app from this system' section will be completed in future. We also plan on integrating more advanced features such as machine learning algorithms for more personalized recommendations and adding social sharing features to encourage users to share their progress with friends and famil

calcheck's People

Contributors

abrar-ahamed avatar akash-r34 avatar

Watchers

 avatar

Forkers

siddhuvinayak

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.