czarandy / usda Goto Github PK
View Code? Open in Web Editor NEWCode to import USDA nutrition info into a database
Code to import USDA nutrition info into a database
The USDA has a database of nutritional information for many foods available at: http://www.ars.usda.gov/Services/docs.htm?docid=8964 By default it's contained in flat files. This project includes scripts to generate appropriate schema and import them into a SQLite database. I've also hand generated a subset of the nutrients that includes commonly-familiar nutrients vs. the very extensive list provided by the USDA. You will need to first download the files and unzip them into the data directory, e.g. for release SR24 cd data wget http://www.ars.usda.gov/SP2UserFiles/Place/12354500/Data/SR24/dnload/sr24.zip unzip sr24.zip Then just run create_db.sh with the name of the file you want to make: ./create_db.sh usda.sql3 For convenience I've included the data files for SR24 in the data directory. I've also included the resulting db for convenience if you just want to use it directly. On my system it takes about 10 seconds to populate the db. I've included two simple python scripts that let you search for food items and print out nutritional facts in json.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.