Skip to main content

Tools for management diet and its components

Project description

Dietkit

Dietkit is a library that provides tools for managing and analyzing diets.

Class Structure

This library includes three classes to represent diet: Ingredient, Menu and Diet.
Ingredient class stands for grocery ingredients. Each Ingredient instance includes nutrition information.
Menu class stands for dishes served in diet. Each Menu instance contains its own ingredients.
Diet class stands for diet plan. It is not single diet, but bundle of several diets. It is consist with pair of identifier and contents of diet.
Also, Dietkit contains class 'Criteria' which stands for nutrition criteria. It is used as input to the evaluation method to evaluate nutrition of the menu or diet.

Functions

Dietkit's function is divided into three main functions: Loader, Evaluator and Visualizer.
Loader functions load ingredient, menu or diet data. If the specific file path is not passed, it automatically loads the our sample data.
Evaluator functions evaluate the menu or diet in terms of ingredients and nutrition based on user's criteria. Visualizer functions graphically visualize the diet's information or evaluation results.

Dependencis

  • pandas (>=3.7)
  • matplotlib (>= 3.0.0)
  • seaborn (>= 0.11.0)

Installation

You can install this package by pip install dietkit

Tip

If from dietkit import * is input, dietkit will import all of its functions and classes. It can take quite a long time (About 3 minutes). So, it is recommended to import only the functions to be used.

About sample data

The sample ingredient data were extracted from the 9th revision of the National Standard Food Components provided by Rural Development Administration of Korean government.
The sample menu data is collected from Center for Children's food service management under the Ministry of Food and Drug safety of the Korean government.
The sample diet data is work of our research.
You can find detailed information about sample data in the study: 'Creating the K–MIND dataset for dietplanning and healthcare research: Byintegrating the capabilities of combinatorialoptimization, experts, and controllablegeneration'.

Related documents

This package is subject results of the research: [link TBD] You can check detail information about this package and its sample data in supplementary material of above research: [link TBD]

License

The source code for Dietkit is subject to the LGPL license.
However, the sample data following another license.

License about sample data

License for sample inigredient data

Subject files

'sample_ingredients_eng.csv', 'sample_ingredients_kor.csv'

Information

The ingredient data is distributed under the Korea Open Government License Type 1. In this license, user can use the data freely and without fee regardless of its commercial use, and can change or modify the data to create secondary works. However, the Rural Development Administration of Korean government, which is source of data, must be indicated.

License for sample menu data

Subject files

'sample_menus_eng.csv', 'sample_menus_kor.csv'

Information

The menu data is permitted to be used under the following conditions: The Center for Children’s Food Service Management in South Korea should be indicated as the author. Redistribution of the menu data and its derivative works are allowed. It should be used only for non-commerical purposes.

License for sample diet data

Subject files

'sample_diet_expert_eng.csv', 'sample_diet_expert_kor.csv', 'sample_diet_ml_eng.csv', 'sample_diet_ml_kor.csv', 'sample_diet_or_eng.csv', 'sample_diet_or_kor.csv'

Information

The 'CC BY-NC 4.0' license is applied to the diet data. When using diet data, the authors of this paper should be indicated as the attribution parties. Redistribution of diet data and its derivative works are allowed. Data should be used only for non-commercial purposes.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dietkit-0.0.11.tar.gz (541.7 kB view details)

Uploaded Source

Built Distribution

dietkit-0.0.11-py3-none-any.whl (544.4 kB view details)

Uploaded Python 3

File details

Details for the file dietkit-0.0.11.tar.gz.

File metadata

  • Download URL: dietkit-0.0.11.tar.gz
  • Upload date:
  • Size: 541.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.8.8

File hashes

Hashes for dietkit-0.0.11.tar.gz
Algorithm Hash digest
SHA256 70c2a34ebb4ebab94b567436bc6ced8f1d479f954f2fefbeb6dc8d606e36919d
MD5 f352667dc008c2abe2b8c1be264d244b
BLAKE2b-256 e9273c791167d240648e7225274f98fe7665d939f4c834dc1a5b0cf7d11262fb

See more details on using hashes here.

File details

Details for the file dietkit-0.0.11-py3-none-any.whl.

File metadata

  • Download URL: dietkit-0.0.11-py3-none-any.whl
  • Upload date:
  • Size: 544.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.8.8

File hashes

Hashes for dietkit-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 2a190d5a2e056bb214b55fc2266beb966747d6e21da84e51e263e8ce2d94ac25
MD5 e058f383c1b97512428e9c167418edeb
BLAKE2b-256 7b51d8b785f5166875f62ffd6a5ea2f011b8cc01c0119268a18ba4dc79a6c98d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page