- AKASH R 20BCE1501 Github: akash-r34
- ABRAR AHAMED 20BCE1437 Github: Abrar-Ahamed
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.
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.
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
Note: This part of our project is still under construction. We will add this in future work.
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.
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:
- Publish your Tableau visualization: You can publish your Tableau visualization to Tableau Server, Tableau Online, or Tableau Public, depending on your requirements.
- Get the Tableau JavaScript API: You can get the Tableau JavaScript API from the Tableau Developer Portal.
- 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.
- 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.
- 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.
- 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.
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
'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