Giter Club home page Giter Club logo

diet-log's Introduction

Diet and Exercise Tracker Analysis

Track and analyze your daily diet and exercise to understand their impact on your weight.

license last-commit repo-top-language repo-language-count

Developed with the software and tools below.

R RStudio Plotly


Introduction

This repository contains a suite of R scripts designed to analyze my daily logs of diet, exercise, and weight tracking. A sample from these logs looks like,

Datetime,Value,Activity
2/24/2024 19:37:00,Dinner; 1 cucumber,Meal
2/24/2024 18:09:00,Evening Snack; 50 gms makhana with sunflower and pumpkin seeds,Meal
2/24/2024 17:35:00,"Evening Snack; 100 gm mixed nuts (almonds, cranberries etc.)",Meal
2/24/2024 13:13:00,Lunch; 3 millet pessarattu (~ 150 gms) with peanut butter,Meal
2/24/2024 12:15:00,Afternoon Drink; 1 cup caramel macchiato,Meal
2/24/2024 11:50:00,Morning Snack; 40 gms cashews + almonds,Meal
2/24/2024 9:29:00,Breakfast; Kefir chia seed pudding 350 gms,Meal
2/24/2024 9:11:00,167.6 lbs,Weight
2/24/2024 9:01:00,40 mins; indoor cycling; (~ 275 cals),Exercise

The scripts process input data from CSV files, perform detailed analyses to correlate activities with weight changes, and generate insightful visualizations showing the impact of diet and exercise on weight over time.

Table of Contents

Installation πŸ› οΈ

GitHub Maintenance

Follow these steps to set up the environment:

  1. Clone the repository to your local machine.
  2. Unzip the contents of library.zip into the repository folder. This step ensures that all required R packages are available and version-controlled.
  3. Ensure R is installed on your machine.

Usage πŸ”§

Each script is designed to be run from the command line. Here’s how to use each one:

  • Processing Data: Rscript process.R --config_file="config/process.yaml"
  • Analyzing Data: Rscript analyze.R --config_file="config/analyze.yaml"
  • Generating Plots: Rscript plot.R --config_file="config/plot.yaml"

Or use littler instead of RScript.

Ensure that the configuration files are set correctly as per your data paths and requirements before running the scripts.

Features ✨

  • Command Line Interface: All scripts can be run from the command line, allowing for automation and ease of use.
  • Comprehensive Logging: Each step of the process, from data processing to plotting, is logged to help track the flow and troubleshoot issues.
  • Interactive Plots: The final output is an interactive plot that visually represents weight changes alongside diet and exercise activities.
  • Configurable: All operations can be customized through YAML configuration files located in the config/ folder.

Configuration βš™οΈ

Configuration files in the YAML format are used to specify input details, processing parameters, and output preferences. These files are located in the config/ directory. Users can modify these files to suit their specific needs for data paths, processing logic, and visualization details.

Dependencies πŸ“¦

Dependencies are managed through the included library.zip file, which contains all the necessary R packages. This method ensures that the environment is consistent and that the package versions are controlled. Unzip this file in the project root directory before running the scripts.

Contributors πŸ‘₯

If you would like to contribute to this project, please fork the repository and submit a pull request.

License πŸ“„

This project is licensed under the MIT License - see the LICENSE file for details.

diet-log's People

Contributors

prasxanth avatar

Watchers

 avatar

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.