https://github.com/danielnaab/django-usda-nutrition
Django app including models and import scripts for the USDA Nutritional Database.
https://github.com/danielnaab/django-usda-nutrition
Last synced: 12 months ago
JSON representation
Django app including models and import scripts for the USDA Nutritional Database.
- Host: GitHub
- URL: https://github.com/danielnaab/django-usda-nutrition
- Owner: danielnaab
- License: bsd-3-clause
- Created: 2016-02-02T23:14:55.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-09-24T13:16:40.000Z (almost 9 years ago)
- Last Synced: 2025-07-06T15:45:52.622Z (about 1 year ago)
- Language: Python
- Size: 6.47 MB
- Stars: 11
- Watchers: 2
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# django-usda-nutrition
This is a Django application which includes models corresponding to the USDA
Nutrition Database, as well as import scripts to pull the current version of
the dataset (SR28) into the Django-managed database.
NOTE: [django-usda](https://github.com/notanumber/django-usda) also exists,
but imports an older (SR22) dataset.
## Dependencies
This packaged has only been tested with Python 3.5+ and Django 1.9+, but should
work with other versions. Feel free to submit pull requests for compatibility.
## Install
Install from `pip`:
pip install django-usda-nutrition
## Usage
Add `usda_nutrition` to your `INSTALLED_APPS` and then:
./manage.py import_usda
## Notes
- The USDA database includes comprehensive information on how all nutritional
data is calculated and references to the corresponding source datasets. Because
that data is out of scope to use-cases that simply want to include the raw
nutritional content in an application, those tables are not imported with this
package. Nonetheless, the source CSV files, stubbed out models, and references
to them in the import management command and checked in. The corresponding code
is commented out and could be a starting point to anyone wanted to use that
data in a Django app.
- A single bad datapoint from `FOOTNOTE.txt` was manually removed.