]> Nutra Git (v1) - nutratech/usda-sqlite.git/commitdiff
wip usda-nt
authorShane Jaroch <nutratracker@protonmail.com>
Sat, 19 Sep 2020 23:14:12 +0000 (19:14 -0400)
committerShane Jaroch <nutratracker@protonmail.com>
Sat, 19 Sep 2020 23:14:12 +0000 (19:14 -0400)
31 files changed:
README.rst
data/access2csv [deleted submodule]
data/rda.csv [deleted file]
docs/nutra.svg [deleted file]
docs/sqleton.sh
docs/usda.svg [new file with mode: 0644]
nt/biometrics/tables.sql [copied from sql/tables.sql with 100% similarity]
nt/build.sh [copied from sql/build.sh with 100% similarity]
nt/format-sql.sh [copied from sql/format-sql.sh with 100% similarity]
nt/init.sql [copied from sql/init.sql with 100% similarity]
nt/plates/tables.sql [copied from sql/tables.sql with 100% similarity]
nt/recipes/tables.sql [copied from sql/tables.sql with 100% similarity]
sql/version.csv [deleted file]
usda/build.sh [moved from sql/build.sh with 72% similarity]
usda/data/access2csv/.gitignore [new file with mode: 0644]
usda/data/access2csv/.travis.yml [new file with mode: 0644]
usda/data/access2csv/Dockerfile [new file with mode: 0644]
usda/data/access2csv/LICENSE [new file with mode: 0644]
usda/data/access2csv/README.md [new file with mode: 0644]
usda/data/access2csv/access2csv [new file with mode: 0755]
usda/data/access2csv/pom.xml [new file with mode: 0755]
usda/data/access2csv/src/access2csv/Driver.java [new file with mode: 0644]
usda/data/access2csv/src/main/java/access2csv/Driver.java [new file with mode: 0644]
usda/data/access2csv/src/test/java/access2csv/DriverTest.java [new file with mode: 0644]
usda/data/dep-graph.yml [moved from data/dep-graph.yml with 100% similarity]
usda/data/process.py [moved from data/process.py with 100% similarity]
usda/data/setup.sh [moved from data/setup.sh with 100% similarity]
usda/format-sql.sh [moved from sql/format-sql.sh with 100% similarity]
usda/import.sql [moved from sql/import.sql with 54% similarity]
usda/init.sql [moved from sql/init.sql with 100% similarity]
usda/tables.sql [moved from sql/tables.sql with 100% similarity]

index 9972bcaab9750bb9101441b1a1907ea785009694..d5e543c5c0f8f2feefb8f539d54716d3d01ce6f9 100644 (file)
@@ -12,7 +12,7 @@ See CLI:    https://github.com/nutratech/cli
 Pypi page:  https://pypi.org/project/nutra
 
 
-Building the database
+Building USDA database
 #########################
 
 1. Install ``access2csv`` dependency,
@@ -26,7 +26,7 @@ Building the database
 
 .. code-block:: bash
 
-    cd data
+    cd usda/data
     bash setup.sh
     python3 process.py
 
@@ -46,8 +46,8 @@ Building the database
 
 .. code-block:: bash
 
-    cd ../sql
-    sqlite3 nutra.db
+    cd ..
+    sqlite3 usda.db
 
 NOTE: FOLLOW STEPS 5 and 6 FROM INSIDE THE SQL SHELL
 
@@ -63,9 +63,9 @@ Or alternatively from the bash shell (outside SQL)
 
 .. code-block:: bash
 
-    sqlite3 nutra.db -init init.sql
+    sqlite3 usda.db -init init.sql
 
-6. Verify the tables (again inside the SQL shell :code:`sqlite nutra.db`),
+6. Verify the tables (again inside the SQL shell :code:`sqlite usda.db`),
 
 .. code-block:: sql
 
@@ -75,14 +75,14 @@ Or alternatively from the bash shell (outside SQL)
     SELECT * FROM nt_ver;
     .exit
 
-7. If everything looks good, compress into :code:`nutra-X.X.X.db.tar.xz` and upload to binary host.
+7. If everything looks good, compress into :code:`usda-X.X.X.db.tar.xz` and upload to binary host.
 
 
 Tables (Relational Design)
 ##########################
 
-See :code:`sql/tables.sql` for details.
+See :code:`usda/sql/tables.sql` and :code:`nt/*/sql/tables.sql` for details.
 
 This is frequently updated, see :code:`docs/` for more info.
 
-.. image:: docs/nutra.svg
+.. image:: docs/usda.svg
diff --git a/data/access2csv b/data/access2csv
deleted file mode 160000 (submodule)
index 2edd3cb..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 2edd3cba957024bcde1c78c69f2c53443a155595
diff --git a/data/rda.csv b/data/rda.csv
deleted file mode 100644 (file)
index 27329c5..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-id,rda,units,tagname,nutr_desc,anti_nutrient,weight
-203,60,g,PRO,Protein,,
-204,90,g,FAT,Total lipid (fat),,
-205,230,g,CARB,"Carbohydrate, by difference",,
-207,,g,ASH,Ash,,
-208,1850,kcal,CAL,Energy,t,-0.4
-209,,g,STARCH,Starch,,
-210,,g,SUCS,Sucrose,,
-211,,g,GLUS,Glucose (dextrose),,
-212,,g,FRUS,Fructose,,
-213,,g,LACS,Lactose,,
-214,,g,MALS,Maltose,,
-221,,g,ALC,"Alcohol, ethyl",,
-255,,g,WATER,Water,,
-262,,mg,CAFFN,Caffeine,,
-263,,mg,THEBRN,Theobromine,,
-268,,kJ,ENERC_KJ,Energy,,
-269,80,g,SUGAR,"Sugars, total",t,-0.5
-287,,g,GALS,Galactose,,
-291,30,g,FIBTG,"Fiber, total dietary",,
-301,1300,mg,CA,"Calcium, Ca",,
-303,18,mg,FE,"Iron, Fe",,
-304,420,mg,MG,"Magnesium, Mg",,
-305,1250,mg,P,"Phosphorus, P",,
-306,4700,mg,K,"Potassium, K",,
-307,1500,mg,NA,"Sodium, Na",t,-0.5
-309,11,mg,ZN,"Zinc, Zn",,
-312,0.9,mg,CU,"Copper, Cu",,
-313,,µg,FL,"Fluoride, F",t,-0.5
-315,2.3,mg,MN,"Manganese, Mn",,
-317,55,µg,SE,"Selenium, Se",,
-318,5000,IU,VITA_IU,"Vitamin A, IU",,
-319,,µg,RETOL,Retinol,,
-320,900,µg,VITA_RAE,"Vitamin A, RAE",,
-321,,µg,CARTB,"Carotene, beta",,
-322,,µg,CARTA,"Carotene, alpha",,
-323,,mg,TOCPHA,Vitamin E (alpha-tocopherol),,
-324,800,IU,VITD_IU,Vitamin D,,
-325,,µg,ERGCAL,Vitamin D2 (ergocalciferol),,
-326,,µg,CHOCAL,Vitamin D3 (cholecalciferol),,
-328,20,µg,VITD,Vitamin D (D2 + D3),,
-334,,µg,CRYPX,"Cryptoxanthin, beta",,
-337,3000,µg,LYCPN,Lycopene,,
-338,7000,µg,LUTZEA,Lutein + zeaxanthin,,
-341,,mg,TOCPHB,"Tocopherol, beta",,
-342,,mg,TOCPHG,"Tocopherol, gamma",,
-343,,mg,TOCPHD,"Tocopherol, delta",,
-344,,mg,TOCTRA,"Tocotrienol, alpha",,
-345,,mg,TOCTRB,"Tocotrienol, beta",,
-346,,mg,TOCTRG,"Tocotrienol, gamma",,
-347,,mg,TOCTRD,"Tocotrienol, delta",,
-401,90,mg,VITC,"Vitamin C, total ascorbic acid",,
-404,1.2,mg,B1,Thiamin,,
-405,1.3,mg,B2,Riboflavin,,
-406,16,mg,B3,Niacin,,
-410,5,mg,B5,Pantothenic acid,,
-415,1.7,mg,B6,Vitamin B-6,,
-417,400,µg,B9,"Folate, total",,
-418,2.4,µg,B12,Vitamin B-12,,
-421,550,mg,CHO,"Choline, total",,
-428,,µg,MK4,Menaquinone-4,,
-429,,µg,VITK1D,Dihydrophylloquinone,,
-430,120,µg,VITK,Vitamin K (phylloquinone),,
-431,,µg,FOLAC,Folic acid,,
-432,,µg,FOLFD,"Folate, food",,
-435,,µg,FOLDFE,"Folate, DFE",,
-454,,mg,BETN,Betaine,,
-501,0.3,g,TRP_G,Tryptophan,,
-502,1,g,THR_G,Threonine,,
-503,1.4,g,ILE_G,Isoleucine,,
-504,2.7,g,LEU_G,Leucine,,
-505,2.1,g,LYS_G,Lysine,,
-506,0.8,g,MET_G,Methionine,,
-507,,g,CYS_G,Cystine,,
-508,1.2,g,PHE_G,Phenylalanine,,
-509,1.4,g,TYR_G,Tyrosine,,
-510,1.8,g,VAL_G,Valine,,
-511,1,g,ARG_G,Arginine,,
-512,0.8,g,HISTN_G,Histidine,,
-513,1,g,ALA_G,Alanine,,
-514,1,g,ASP_G,Aspartic acid,,
-515,2,g,GLU_G,Glutamic acid,,
-516,0.8,g,GLY_G,Glycine,,
-517,0.6,g,PRO_G,Proline,,
-518,1.6,g,SER_G,Serine,,
-521,,g,HYP,Hydroxyproline,,
-573,,mg,VITE_ADD,"Vitamin E, added",,
-578,,µg,B12_ADD,"Vitamin B-12, added",,
-601,200,mg,CHOLEST,Cholesterol,t,-0.4
-605,,g,FATRN,"Fatty acids, total trans",t,-1.2
-606,30,g,FASAT,"Fatty acids, total saturated",t,-0.7
-607,,g,F4D0,4:0,,
-608,,g,F6D0,6:0,,
-609,,g,F8D0,8:0,,
-610,,g,F10D0,10:0,,
-611,,g,F12D0,12:0,,
-612,,g,F14D0,14:0,,
-613,,g,F16D0,16:0,,
-614,,g,F18D0,18:0,,
-615,,g,F20D0,20:0,,
-617,,g,F18D1,18:1 undifferentiated,,
-618,,g,F18D2,18:2 undifferentiated,,
-619,,g,F18D3,18:3 undifferentiated,,
-620,,g,F20D4,20:4 undifferentiated,,
-621,0.2,g,F22D6,22:6 n-3 (DHA),,
-624,,g,F22D0,22:0,,
-625,,g,F14D1,14:1,,
-626,,g,F16D1,16:1 undifferentiated,,
-627,,g,F18D4,18:4,,
-628,,g,F20D1,20:1,,
-629,0.1,g,F20D5,20:5 n-3 (EPA),,
-630,,g,F22D1,22:1 undifferentiated,,
-631,,g,F22D5,22:5 n-3 (DPA),,
-636,,mg,PHYSTR,Phytosterols,,
-638,,mg,STID7,Stigmasterol,,
-639,,mg,CAMD5,Campesterol,,
-641,,mg,SITSTR,Beta-sitosterol,,
-645,35,g,FAMS,"Fatty acids, total monounsaturated",,
-646,25,g,FAPU,"Fatty acids, total polyunsaturated",,
-652,,g,F15D0,15:0,,
-653,,g,F17D0,17:0,,
-654,,g,F24D0,24:0,,
-662,,g,F16D1T,16:1 t,,
-663,,g,F18D1T,18:1 t,,
-664,,g,F22D1T,22:1 t,,
-665,,g,F18D2NFD,18:2 t not further defined,,
-666,,g,F18D2I,18:2 i,,
-669,,g,F18D2TT,"18:2 t,t",,
-670,,g,F18D2CLA,18:2 CLAs,,
-671,,g,F24D1C,24:1 c,,
-672,,g,F20D2CN6,"20:2 n-6 c,c",,
-673,,g,F16D1C,16:1 c,,
-674,,g,F18D1C,18:1 c,,
-675,,g,F18D2CN6,"18:2 n-6 c,c",,
-676,,g,F22D1C,22:1 c,,
-685,,g,F18D3CN6,"18:3 n-6 c,c,c",,
-687,,g,F17D1,17:1,,
-689,,g,F20D3,20:3 undifferentiated,,
-693,,g,FATRNM,"Fatty acids, total trans-monoenoic",,
-695,,g,FATRNP,"Fatty acids, total trans-polyenoic",,
-696,,g,F13D0,13:0,,
-697,,g,F15D1,15:1,,
-851,2,g,F18D3CN3,"18:3 n-3 c,c,c (ALA)",,
-852,,g,F20D3N3,20:3 n-3,,
-853,,g,F20D3N6,20:3 n-6,,
-855,,g,F20D4N6,20:4 n-6,,
-856,,g,F18D3I,18:3i,,
-857,,g,F21D5,21:5,,
-858,,g,F22D4,22:4,,
-859,,g,F18D1TN7,18:1-11 t (18:1t n-7),,
-710,30,mg,DAID,Daidzein,,
-711,15,mg,GENI,Genistein,,
-712,,mg,GLYC,Glycitein,,
-713,45,mg,TOTISO,Total isoflavones,,
-714,,mg,BIOC,Biochanin A,,
-715,,mg,FORM,Formononetin,,
-716,,mg,COUM,Coumestrol,,
-734,5,mg,PAdimer,Proanthocyanidin dimers,,
-735,5,mg,PAtrimer,Proanthocyanidin trimers,,
-736,20,mg,PA4-6mer,Proanthocyanidin 4-6mers,,
-737,20,mg,PA7-10mer,Proanthocyanidin 7-10mers,,
-738,60,mg,PApolymer,Proanthocyanidin polymers (>10mers),,
-731,20,mg,CYAD,Cyanidin,,
-740,,mg,PETUNIDIN,Petunidin,,
-741,,mg,DELPH,Delphinidin ,,
-742,,mg,MALVIDIN,Malvidin,,
-743,,mg,PELA,Pelargonidin,,
-745,,mg,PEONIDIN,Peonidin,,
-749,40,mg,CATE,(+)-Catechin,,
-750,40,mg,EPICATEGC,(-)-Epigallocatechin,,
-751,40,mg,EPICATEC,(-)-Epicatechin,,
-752,40,mg,EPICATECG3,(-)-Epicatechin 3-gallate,,
-753,60,mg,EGCG,(-)-Epigallocatechin 3-gallate,,
-755,,mg,THEAF,Theaflavin,,
-756,,mg,THEAR,Thearubigins,,
-758,,mg,ERIOD,Eriodictyol,,
-759,80,mg,HESPT,Hesperetin,,
-762,60,mg,NARING,Naringenin,,
-770,30,mg,APIGEN,Apigenin,,
-773,20,mg,LUTEOL,Luteolin,,
-785,5,mg,ISORHAM,Isorhamnetin,,
-786,5,mg,KAEMF,Kaempferol,,
-788,2,mg,MYRIC,Myricetin,,
-789,20,mg,QUERCE,Quercetin,,
-791,,mg,THEA3DI,"Theaflavin-3,3'-digallate",,
-792,,mg,THEA3GP,Theaflavin-3'-gallate,,
-793,,mg,THEA3G,Theaflavin-3-gallate,,
-794,,mg,GALCATEGC,(+)-Gallocatechin,,
-2000,1.5,mg,B,"Boron, B",,
diff --git a/docs/nutra.svg b/docs/nutra.svg
deleted file mode 100644 (file)
index 306ea19..0000000
+++ /dev/null
@@ -1,363 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
- "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<!-- Generated by graphviz version 2.43.0 (0)
- -->
-<!-- Title: undefined Pages: 1 -->
-<svg width="1007pt" height="1516pt"
- viewBox="0.00 0.00 1006.60 1515.60" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(28.8 1465.8)">
-<title>undefined</title>
-<polygon fill="white" stroke="transparent" points="-28.8,49.8 -28.8,-1465.8 977.8,-1465.8 977.8,49.8 -28.8,49.8"/>
-<text text-anchor="start" x="445.5" y="12.6" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">nutra.db</text>
-<!-- version -->
-<g id="node1" class="node">
-<title>version</title>
-<path fill="none" stroke="black" d="M815.24,-730.14C815.24,-730.14 935.24,-730.14 935.24,-730.14 941.24,-730.14 947.24,-736.14 947.24,-742.14 947.24,-742.14 947.24,-805.14 947.24,-805.14 947.24,-811.14 941.24,-817.14 935.24,-817.14 935.24,-817.14 815.24,-817.14 815.24,-817.14 809.24,-817.14 803.24,-811.14 803.24,-805.14 803.24,-805.14 803.24,-742.14 803.24,-742.14 803.24,-736.14 809.24,-730.14 815.24,-730.14"/>
-<text text-anchor="start" x="848.24" y="-796.74" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">version</text>
-<polyline fill="none" stroke="black" points="803.24,-787.14 947.24,-787.14 "/>
-<text text-anchor="start" x="810.24" y="-773.04" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="831.24" y="-773.04" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
-<text text-anchor="start" x="810.24" y="-756.04" font-family="Helvetica,sans-Serif" font-size="12.00">version </text>
-<text text-anchor="start" x="858.24" y="-756.04" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="810.24" y="-739.04" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
-<text text-anchor="start" x="860.24" y="-739.04" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">timestamp</text>
-</g>
-<!-- sqlite_sequence -->
-<g id="node2" class="node">
-<title>sqlite_sequence</title>
-<path fill="none" stroke="black" d="M815.24,-949.64C815.24,-949.64 935.24,-949.64 935.24,-949.64 941.24,-949.64 947.24,-955.64 947.24,-961.64 947.24,-961.64 947.24,-1007.64 947.24,-1007.64 947.24,-1013.64 941.24,-1019.64 935.24,-1019.64 935.24,-1019.64 815.24,-1019.64 815.24,-1019.64 809.24,-1019.64 803.24,-1013.64 803.24,-1007.64 803.24,-1007.64 803.24,-961.64 803.24,-961.64 803.24,-955.64 809.24,-949.64 815.24,-949.64"/>
-<text text-anchor="start" x="817.24" y="-999.24" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">sqlite_sequence</text>
-<polyline fill="none" stroke="black" points="803.24,-989.64 947.24,-989.64 "/>
-<text text-anchor="start" x="810.24" y="-976.04" font-family="Helvetica,sans-Serif" font-size="12.00">name </text>
-<text text-anchor="start" x="849.24" y="-976.04" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00"> </text>
-<text text-anchor="start" x="810.24" y="-959.04" font-family="Helvetica,sans-Serif" font-size="12.00">seq </text>
-<text text-anchor="start" x="835.24" y="-959.04" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00"> </text>
-</g>
-<!-- nutr_def -->
-<g id="node3" class="node">
-<title>nutr_def</title>
-<path fill="none" stroke="black" d="M11.97,-646.9C11.97,-646.9 135.97,-646.9 135.97,-646.9 141.97,-646.9 147.97,-652.9 147.97,-658.9 147.97,-658.9 147.97,-823.9 147.97,-823.9 147.97,-829.9 141.97,-835.9 135.97,-835.9 135.97,-835.9 11.97,-835.9 11.97,-835.9 5.97,-835.9 -0.03,-829.9 -0.03,-823.9 -0.03,-823.9 -0.03,-658.9 -0.03,-658.9 -0.03,-652.9 5.97,-646.9 11.97,-646.9"/>
-<text text-anchor="start" x="42.97" y="-815.5" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">nutr_def</text>
-<polyline fill="none" stroke="black" points="-0.03,-805.9 147.97,-805.9 "/>
-<text text-anchor="start" x="6.97" y="-791.8" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="27.97" y="-791.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
-<text text-anchor="start" x="6.97" y="-774.8" font-family="Helvetica,sans-Serif" font-size="12.00">rda </text>
-<text text-anchor="start" x="30.97" y="-774.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">float</text>
-<text text-anchor="start" x="6.97" y="-757.8" font-family="Helvetica,sans-Serif" font-size="12.00">unit </text>
-<text text-anchor="start" x="33.97" y="-757.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="6.97" y="-740.8" font-family="Helvetica,sans-Serif" font-size="12.00">tagname </text>
-<text text-anchor="start" x="64.97" y="-740.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="6.97" y="-723.8" font-family="Helvetica,sans-Serif" font-size="12.00">nutr_desc </text>
-<text text-anchor="start" x="69.97" y="-723.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="6.97" y="-706.8" font-family="Helvetica,sans-Serif" font-size="12.00">anti_nutrient </text>
-<text text-anchor="start" x="86.97" y="-706.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">boolean</text>
-<text text-anchor="start" x="6.97" y="-689.8" font-family="Helvetica,sans-Serif" font-size="12.00">num_dec </text>
-<text text-anchor="start" x="65.97" y="-689.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="6.97" y="-672.8" font-family="Helvetica,sans-Serif" font-size="12.00">sr_order </text>
-<text text-anchor="start" x="60.97" y="-672.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="6.97" y="-655.8" font-family="Helvetica,sans-Serif" font-size="12.00">flav_class </text>
-<text text-anchor="start" x="67.97" y="-655.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-</g>
-<!-- fdgrp -->
-<g id="node4" class="node">
-<title>fdgrp</title>
-<path fill="none" stroke="black" d="M817.16,-543.88C817.16,-543.88 937.16,-543.88 937.16,-543.88 943.16,-543.88 949.16,-549.88 949.16,-555.88 949.16,-555.88 949.16,-601.88 949.16,-601.88 949.16,-607.88 943.16,-613.88 937.16,-613.88 937.16,-613.88 817.16,-613.88 817.16,-613.88 811.16,-613.88 805.16,-607.88 805.16,-601.88 805.16,-601.88 805.16,-555.88 805.16,-555.88 805.16,-549.88 811.16,-543.88 817.16,-543.88"/>
-<text text-anchor="start" x="857.16" y="-593.48" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">fdgrp</text>
-<polyline fill="none" stroke="black" points="805.16,-583.88 949.16,-583.88 "/>
-<text text-anchor="start" x="812.16" y="-570.28" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="833.16" y="-570.28" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
-<text text-anchor="start" x="812.16" y="-553.28" font-family="Helvetica,sans-Serif" font-size="12.00">fdgrp_desc </text>
-<text text-anchor="start" x="882.16" y="-553.28" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-</g>
-<!-- food_des -->
-<g id="node5" class="node">
-<title>food_des</title>
-<path fill="none" stroke="black" d="M508.73,-469.21C508.73,-469.21 628.73,-469.21 628.73,-469.21 634.73,-469.21 640.73,-475.21 640.73,-481.21 640.73,-481.21 640.73,-731.21 640.73,-731.21 640.73,-737.21 634.73,-743.21 628.73,-743.21 628.73,-743.21 508.73,-743.21 508.73,-743.21 502.73,-743.21 496.73,-737.21 496.73,-731.21 496.73,-731.21 496.73,-481.21 496.73,-481.21 496.73,-475.21 502.73,-469.21 508.73,-469.21"/>
-<text text-anchor="start" x="535.73" y="-722.81" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">food_des</text>
-<polyline fill="none" stroke="black" points="496.73,-713.21 640.73,-713.21 "/>
-<text text-anchor="start" x="503.73" y="-699.61" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="524.73" y="-699.61" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
-<text text-anchor="start" x="503.73" y="-682.61" font-family="Helvetica,sans-Serif" font-size="12.00">fdgrp_id </text>
-<text text-anchor="start" x="556.73" y="-682.61" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="503.73" y="-665.61" font-family="Helvetica,sans-Serif" font-size="12.00">long_desc </text>
-<text text-anchor="start" x="567.73" y="-665.61" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="503.73" y="-648.61" font-family="Helvetica,sans-Serif" font-size="12.00">shrt_desc </text>
-<text text-anchor="start" x="564.73" y="-648.61" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="503.73" y="-631.61" font-family="Helvetica,sans-Serif" font-size="12.00">com_name </text>
-<text text-anchor="start" x="574.73" y="-631.61" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="503.73" y="-614.61" font-family="Helvetica,sans-Serif" font-size="12.00">manufac_name </text>
-<text text-anchor="start" x="601.73" y="-614.61" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="503.73" y="-597.61" font-family="Helvetica,sans-Serif" font-size="12.00">survey </text>
-<text text-anchor="start" x="547.73" y="-597.61" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="503.73" y="-580.61" font-family="Helvetica,sans-Serif" font-size="12.00">ref_desc </text>
-<text text-anchor="start" x="558.73" y="-580.61" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="503.73" y="-563.61" font-family="Helvetica,sans-Serif" font-size="12.00">refuse </text>
-<text text-anchor="start" x="545.73" y="-563.61" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="503.73" y="-546.61" font-family="Helvetica,sans-Serif" font-size="12.00">sci_name </text>
-<text text-anchor="start" x="564.73" y="-546.61" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="503.73" y="-529.61" font-family="Helvetica,sans-Serif" font-size="12.00">n_factor </text>
-<text text-anchor="start" x="557.73" y="-529.61" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">float</text>
-<text text-anchor="start" x="503.73" y="-512.61" font-family="Helvetica,sans-Serif" font-size="12.00">pro_factor </text>
-<text text-anchor="start" x="569.73" y="-512.61" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">float</text>
-<text text-anchor="start" x="503.73" y="-495.61" font-family="Helvetica,sans-Serif" font-size="12.00">fat_factor </text>
-<text text-anchor="start" x="566.73" y="-495.61" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">float</text>
-<text text-anchor="start" x="503.73" y="-478.61" font-family="Helvetica,sans-Serif" font-size="12.00">cho_factor </text>
-<text text-anchor="start" x="571.73" y="-478.61" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">float</text>
-</g>
-<!-- food_des&#45;&gt;fdgrp -->
-<g id="edge1" class="edge">
-<title>food_des&#45;&gt;fdgrp</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M641.04,-599.8C687.75,-595.66 748.58,-590.27 796.8,-586"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="797.31,-588.76 805.03,-585.27 796.82,-583.19 797.31,-588.76"/>
-</g>
-<!-- src_cd -->
-<g id="node6" class="node">
-<title>src_cd</title>
-<path fill="none" stroke="black" d="M263.66,-1366.74C263.66,-1366.74 383.66,-1366.74 383.66,-1366.74 389.66,-1366.74 395.66,-1372.74 395.66,-1378.74 395.66,-1378.74 395.66,-1424.74 395.66,-1424.74 395.66,-1430.74 389.66,-1436.74 383.66,-1436.74 383.66,-1436.74 263.66,-1436.74 263.66,-1436.74 257.66,-1436.74 251.66,-1430.74 251.66,-1424.74 251.66,-1424.74 251.66,-1378.74 251.66,-1378.74 251.66,-1372.74 257.66,-1366.74 263.66,-1366.74"/>
-<text text-anchor="start" x="300.66" y="-1416.34" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">src_cd</text>
-<polyline fill="none" stroke="black" points="251.66,-1406.74 395.66,-1406.74 "/>
-<text text-anchor="start" x="258.66" y="-1393.14" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="279.66" y="-1393.14" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="258.66" y="-1376.14" font-family="Helvetica,sans-Serif" font-size="12.00">description </text>
-<text text-anchor="start" x="328.66" y="-1376.14" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-</g>
-<!-- deriv_cd -->
-<g id="node7" class="node">
-<title>deriv_cd</title>
-<path fill="none" stroke="black" d="M637.25,-1249.77C637.25,-1249.77 757.25,-1249.77 757.25,-1249.77 763.25,-1249.77 769.25,-1255.77 769.25,-1261.77 769.25,-1261.77 769.25,-1307.77 769.25,-1307.77 769.25,-1313.77 763.25,-1319.77 757.25,-1319.77 757.25,-1319.77 637.25,-1319.77 637.25,-1319.77 631.25,-1319.77 625.25,-1313.77 625.25,-1307.77 625.25,-1307.77 625.25,-1261.77 625.25,-1261.77 625.25,-1255.77 631.25,-1249.77 637.25,-1249.77"/>
-<text text-anchor="start" x="667.25" y="-1299.37" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">deriv_cd</text>
-<polyline fill="none" stroke="black" points="625.25,-1289.77 769.25,-1289.77 "/>
-<text text-anchor="start" x="632.25" y="-1276.17" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="653.25" y="-1276.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="632.25" y="-1259.17" font-family="Helvetica,sans-Serif" font-size="12.00">description </text>
-<text text-anchor="start" x="702.25" y="-1259.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-</g>
-<!-- nut_data -->
-<g id="node8" class="node">
-<title>nut_data</title>
-<path fill="none" stroke="black" d="M309.32,-879.67C309.32,-879.67 429.32,-879.67 429.32,-879.67 435.32,-879.67 441.32,-885.67 441.32,-891.67 441.32,-891.67 441.32,-1209.67 441.32,-1209.67 441.32,-1215.67 435.32,-1221.67 429.32,-1221.67 429.32,-1221.67 309.32,-1221.67 309.32,-1221.67 303.32,-1221.67 297.32,-1215.67 297.32,-1209.67 297.32,-1209.67 297.32,-891.67 297.32,-891.67 297.32,-885.67 303.32,-879.67 309.32,-879.67"/>
-<text text-anchor="start" x="337.32" y="-1201.27" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">nut_data</text>
-<polyline fill="none" stroke="black" points="297.32,-1191.67 441.32,-1191.67 "/>
-<text text-anchor="start" x="304.32" y="-1178.07" font-family="Helvetica,sans-Serif" font-size="12.00">food_id </text>
-<text text-anchor="start" x="352.32" y="-1178.07" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="304.32" y="-1161.07" font-family="Helvetica,sans-Serif" font-size="12.00">nutr_id </text>
-<text text-anchor="start" x="350.32" y="-1161.07" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="304.32" y="-1144.07" font-family="Helvetica,sans-Serif" font-size="12.00">nutr_val </text>
-<text text-anchor="start" x="356.32" y="-1144.07" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">float</text>
-<text text-anchor="start" x="304.32" y="-1127.07" font-family="Helvetica,sans-Serif" font-size="12.00">num_data_pts </text>
-<text text-anchor="start" x="392.32" y="-1127.07" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="304.32" y="-1110.07" font-family="Helvetica,sans-Serif" font-size="12.00">std_err </text>
-<text text-anchor="start" x="350.32" y="-1110.07" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">float</text>
-<text text-anchor="start" x="304.32" y="-1093.07" font-family="Helvetica,sans-Serif" font-size="12.00">src_cd </text>
-<text text-anchor="start" x="346.32" y="-1093.07" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="304.32" y="-1076.07" font-family="Helvetica,sans-Serif" font-size="12.00">deriv_cd </text>
-<text text-anchor="start" x="359.32" y="-1076.07" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="304.32" y="-1059.07" font-family="Helvetica,sans-Serif" font-size="12.00">ref_food_id </text>
-<text text-anchor="start" x="374.32" y="-1059.07" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="304.32" y="-1042.07" font-family="Helvetica,sans-Serif" font-size="12.00">add_nutr_mark </text>
-<text text-anchor="start" x="399.32" y="-1042.07" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="304.32" y="-1025.07" font-family="Helvetica,sans-Serif" font-size="12.00">num_studies </text>
-<text text-anchor="start" x="383.32" y="-1025.07" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="304.32" y="-1008.07" font-family="Helvetica,sans-Serif" font-size="12.00">min </text>
-<text text-anchor="start" x="331.32" y="-1008.07" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">float</text>
-<text text-anchor="start" x="304.32" y="-991.07" font-family="Helvetica,sans-Serif" font-size="12.00">max </text>
-<text text-anchor="start" x="335.32" y="-991.07" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">float</text>
-<text text-anchor="start" x="304.32" y="-974.07" font-family="Helvetica,sans-Serif" font-size="12.00">df </text>
-<text text-anchor="start" x="320.32" y="-974.07" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">long</text>
-<text text-anchor="start" x="304.32" y="-957.07" font-family="Helvetica,sans-Serif" font-size="12.00">low_eb </text>
-<text text-anchor="start" x="350.32" y="-957.07" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">float</text>
-<text text-anchor="start" x="304.32" y="-940.07" font-family="Helvetica,sans-Serif" font-size="12.00">up_eb </text>
-<text text-anchor="start" x="344.32" y="-940.07" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">float</text>
-<text text-anchor="start" x="304.32" y="-923.07" font-family="Helvetica,sans-Serif" font-size="12.00">stat_cmt </text>
-<text text-anchor="start" x="360.32" y="-923.07" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="304.32" y="-906.07" font-family="Helvetica,sans-Serif" font-size="12.00">add_mod_date </text>
-<text text-anchor="start" x="397.32" y="-906.07" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">date</text>
-<text text-anchor="start" x="304.32" y="-889.07" font-family="Helvetica,sans-Serif" font-size="12.00">cc </text>
-<text text-anchor="start" x="322.32" y="-889.07" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-</g>
-<!-- nut_data&#45;&gt;nutr_def -->
-<g id="edge4" class="edge">
-<title>nut_data&#45;&gt;nutr_def</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M297.07,-975.02C253.67,-929.57 198.39,-871.68 153.72,-824.9"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="155.59,-822.81 148.04,-818.96 151.54,-826.68 155.59,-822.81"/>
-</g>
-<!-- nut_data&#45;&gt;food_des -->
-<g id="edge5" class="edge">
-<title>nut_data&#45;&gt;food_des</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M441.45,-889.9C461.84,-844.46 483.89,-795.3 503.83,-750.87"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="506.41,-751.94 507.13,-743.49 501.31,-749.65 506.41,-751.94"/>
-</g>
-<!-- nut_data&#45;&gt;src_cd -->
-<g id="edge3" class="edge">
-<title>nut_data&#45;&gt;src_cd</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M347.06,-1221.84C340.45,-1272.64 333.78,-1323.94 329.26,-1358.68"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="326.47,-1358.42 328.21,-1366.71 332.02,-1359.14 326.47,-1358.42"/>
-</g>
-<!-- nut_data&#45;&gt;deriv_cd -->
-<g id="edge2" class="edge">
-<title>nut_data&#45;&gt;deriv_cd</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M441.69,-1102.34C501.87,-1145.29 586.27,-1205.55 641.35,-1244.87"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="639.78,-1247.19 647.92,-1249.56 643.04,-1242.63 639.78,-1247.19"/>
-</g>
-<!-- lang_desc -->
-<g id="node9" class="node">
-<title>lang_desc</title>
-<path fill="none" stroke="black" d="M796.72,-0.95C796.72,-0.95 916.72,-0.95 916.72,-0.95 922.72,-0.95 928.72,-6.95 928.72,-12.95 928.72,-12.95 928.72,-58.95 928.72,-58.95 928.72,-64.95 922.72,-70.95 916.72,-70.95 916.72,-70.95 796.72,-70.95 796.72,-70.95 790.72,-70.95 784.72,-64.95 784.72,-58.95 784.72,-58.95 784.72,-12.95 784.72,-12.95 784.72,-6.95 790.72,-0.95 796.72,-0.95"/>
-<text text-anchor="start" x="820.72" y="-50.55" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">lang_desc</text>
-<polyline fill="none" stroke="black" points="784.72,-40.95 928.72,-40.95 "/>
-<text text-anchor="start" x="791.72" y="-27.35" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="812.72" y="-27.35" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="791.72" y="-10.35" font-family="Helvetica,sans-Serif" font-size="12.00">description </text>
-<text text-anchor="start" x="861.72" y="-10.35" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-</g>
-<!-- langual -->
-<g id="node10" class="node">
-<title>langual</title>
-<path fill="none" stroke="black" d="M501.46,-271.92C501.46,-271.92 621.46,-271.92 621.46,-271.92 627.46,-271.92 633.46,-277.92 633.46,-283.92 633.46,-283.92 633.46,-329.92 633.46,-329.92 633.46,-335.92 627.46,-341.92 621.46,-341.92 621.46,-341.92 501.46,-341.92 501.46,-341.92 495.46,-341.92 489.46,-335.92 489.46,-329.92 489.46,-329.92 489.46,-283.92 489.46,-283.92 489.46,-277.92 495.46,-271.92 501.46,-271.92"/>
-<text text-anchor="start" x="534.46" y="-321.52" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">langual</text>
-<polyline fill="none" stroke="black" points="489.46,-311.92 633.46,-311.92 "/>
-<text text-anchor="start" x="496.46" y="-298.32" font-family="Helvetica,sans-Serif" font-size="12.00">food_id </text>
-<text text-anchor="start" x="544.46" y="-298.32" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="496.46" y="-281.32" font-family="Helvetica,sans-Serif" font-size="12.00">factor_id </text>
-<text text-anchor="start" x="553.46" y="-281.32" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-</g>
-<!-- langual&#45;&gt;food_des -->
-<g id="edge7" class="edge">
-<title>langual&#45;&gt;food_des</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M562.31,-342.13C563.03,-371.88 564.12,-416.59 565.2,-460.81"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="562.4,-461.13 565.4,-469.06 568,-460.99 562.4,-461.13"/>
-</g>
-<!-- langual&#45;&gt;lang_desc -->
-<g id="edge6" class="edge">
-<title>langual&#45;&gt;lang_desc</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M599.75,-271.77C654.4,-221.62 754.53,-129.73 812.34,-76.68"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="814.49,-78.51 818.49,-71.03 810.7,-74.38 814.49,-78.51"/>
-</g>
-<!-- data_src -->
-<g id="node11" class="node">
-<title>data_src</title>
-<path fill="none" stroke="black" d="M125.56,-7.99C125.56,-7.99 245.56,-7.99 245.56,-7.99 251.56,-7.99 257.56,-13.99 257.56,-19.99 257.56,-19.99 257.56,-184.99 257.56,-184.99 257.56,-190.99 251.56,-196.99 245.56,-196.99 245.56,-196.99 125.56,-196.99 125.56,-196.99 119.56,-196.99 113.56,-190.99 113.56,-184.99 113.56,-184.99 113.56,-19.99 113.56,-19.99 113.56,-13.99 119.56,-7.99 125.56,-7.99"/>
-<text text-anchor="start" x="154.56" y="-176.59" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">data_src</text>
-<polyline fill="none" stroke="black" points="113.56,-166.99 257.56,-166.99 "/>
-<text text-anchor="start" x="120.56" y="-152.89" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="141.56" y="-152.89" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="120.56" y="-135.89" font-family="Helvetica,sans-Serif" font-size="12.00">authors </text>
-<text text-anchor="start" x="170.56" y="-135.89" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="120.56" y="-118.89" font-family="Helvetica,sans-Serif" font-size="12.00">title </text>
-<text text-anchor="start" x="147.56" y="-118.89" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="120.56" y="-101.89" font-family="Helvetica,sans-Serif" font-size="12.00">year </text>
-<text text-anchor="start" x="151.56" y="-101.89" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="120.56" y="-84.89" font-family="Helvetica,sans-Serif" font-size="12.00">journal </text>
-<text text-anchor="start" x="165.56" y="-84.89" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="120.56" y="-67.89" font-family="Helvetica,sans-Serif" font-size="12.00">vol_city </text>
-<text text-anchor="start" x="169.56" y="-67.89" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="120.56" y="-50.89" font-family="Helvetica,sans-Serif" font-size="12.00">issue_state </text>
-<text text-anchor="start" x="190.56" y="-50.89" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="120.56" y="-33.89" font-family="Helvetica,sans-Serif" font-size="12.00">start_page </text>
-<text text-anchor="start" x="188.56" y="-33.89" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="120.56" y="-16.89" font-family="Helvetica,sans-Serif" font-size="12.00">end_page </text>
-<text text-anchor="start" x="183.56" y="-16.89" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-</g>
-<!-- datsrcln -->
-<g id="node12" class="node">
-<title>datsrcln</title>
-<path fill="none" stroke="black" d="M76.95,-321.59C76.95,-321.59 196.95,-321.59 196.95,-321.59 202.95,-321.59 208.95,-327.59 208.95,-333.59 208.95,-333.59 208.95,-396.59 208.95,-396.59 208.95,-402.59 202.95,-408.59 196.95,-408.59 196.95,-408.59 76.95,-408.59 76.95,-408.59 70.95,-408.59 64.95,-402.59 64.95,-396.59 64.95,-396.59 64.95,-333.59 64.95,-333.59 64.95,-327.59 70.95,-321.59 76.95,-321.59"/>
-<text text-anchor="start" x="106.95" y="-388.19" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">datsrcln</text>
-<polyline fill="none" stroke="black" points="64.95,-378.59 208.95,-378.59 "/>
-<text text-anchor="start" x="71.95" y="-364.49" font-family="Helvetica,sans-Serif" font-size="12.00">food_id </text>
-<text text-anchor="start" x="119.95" y="-364.49" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="71.95" y="-347.49" font-family="Helvetica,sans-Serif" font-size="12.00">nutr_id </text>
-<text text-anchor="start" x="117.95" y="-347.49" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="71.95" y="-330.49" font-family="Helvetica,sans-Serif" font-size="12.00">data_src_id </text>
-<text text-anchor="start" x="142.95" y="-330.49" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-</g>
-<!-- datsrcln&#45;&gt;nutr_def -->
-<g id="edge9" class="edge">
-<title>datsrcln&#45;&gt;nutr_def</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M129.66,-408.63C120.32,-464.44 103.83,-563 91.21,-638.42"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="88.4,-638.22 89.84,-646.57 93.93,-639.14 88.4,-638.22"/>
-</g>
-<!-- datsrcln&#45;&gt;food_des -->
-<g id="edge10" class="edge">
-<title>datsrcln&#45;&gt;food_des</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M209.22,-405.45C286.71,-448.72 409.36,-517.21 489.45,-561.94"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="488.23,-564.46 496.58,-565.92 490.96,-559.57 488.23,-564.46"/>
-</g>
-<!-- datsrcln&#45;&gt;data_src -->
-<g id="edge8" class="edge">
-<title>datsrcln&#45;&gt;data_src</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M145.03,-321.43C150.89,-289.78 159.07,-245.62 166.54,-205.25"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="169.32,-205.61 168.02,-197.23 163.82,-204.59 169.32,-205.61"/>
-</g>
-<!-- footnote -->
-<g id="node13" class="node">
-<title>footnote</title>
-<path fill="none" stroke="black" d="M191.99,-565.29C191.99,-565.29 311.99,-565.29 311.99,-565.29 317.99,-565.29 323.99,-571.29 323.99,-577.29 323.99,-577.29 323.99,-674.29 323.99,-674.29 323.99,-680.29 317.99,-686.29 311.99,-686.29 311.99,-686.29 191.99,-686.29 191.99,-686.29 185.99,-686.29 179.99,-680.29 179.99,-674.29 179.99,-674.29 179.99,-577.29 179.99,-577.29 179.99,-571.29 185.99,-565.29 191.99,-565.29"/>
-<text text-anchor="start" x="219.99" y="-665.89" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">footnote</text>
-<polyline fill="none" stroke="black" points="179.99,-656.29 323.99,-656.29 "/>
-<text text-anchor="start" x="186.99" y="-642.19" font-family="Helvetica,sans-Serif" font-size="12.00">food_id </text>
-<text text-anchor="start" x="234.99" y="-642.19" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="186.99" y="-625.19" font-family="Helvetica,sans-Serif" font-size="12.00">footnt_no </text>
-<text text-anchor="start" x="247.99" y="-625.19" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="186.99" y="-608.19" font-family="Helvetica,sans-Serif" font-size="12.00">footnt_typ </text>
-<text text-anchor="start" x="251.99" y="-608.19" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="186.99" y="-591.19" font-family="Helvetica,sans-Serif" font-size="12.00">nutr_id </text>
-<text text-anchor="start" x="232.99" y="-591.19" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="186.99" y="-574.19" font-family="Helvetica,sans-Serif" font-size="12.00">footnt_txt </text>
-<text text-anchor="start" x="248.99" y="-574.19" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-</g>
-<!-- footnote&#45;&gt;nutr_def -->
-<g id="edge11" class="edge">
-<title>footnote&#45;&gt;nutr_def</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M179.84,-672.64C171.71,-677.93 163.38,-683.33 155.15,-688.68"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="153.44,-686.45 148.25,-693.16 156.49,-691.15 153.44,-686.45"/>
-</g>
-<!-- footnote&#45;&gt;food_des -->
-<g id="edge12" class="edge">
-<title>footnote&#45;&gt;food_des</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M324.26,-621.32C373.22,-618.29 437.95,-614.29 488.51,-611.17"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="488.68,-613.96 496.5,-610.67 488.34,-608.37 488.68,-613.96"/>
-</g>
-<!-- serv_desc -->
-<g id="node14" class="node">
-<title>serv_desc</title>
-<path fill="none" stroke="black" d="M93.98,-1027.27C93.98,-1027.27 213.98,-1027.27 213.98,-1027.27 219.98,-1027.27 225.98,-1033.27 225.98,-1039.27 225.98,-1039.27 225.98,-1085.27 225.98,-1085.27 225.98,-1091.27 219.98,-1097.27 213.98,-1097.27 213.98,-1097.27 93.98,-1097.27 93.98,-1097.27 87.98,-1097.27 81.98,-1091.27 81.98,-1085.27 81.98,-1085.27 81.98,-1039.27 81.98,-1039.27 81.98,-1033.27 87.98,-1027.27 93.98,-1027.27"/>
-<text text-anchor="start" x="117.98" y="-1076.87" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">serv_desc</text>
-<polyline fill="none" stroke="black" points="81.98,-1067.27 225.98,-1067.27 "/>
-<text text-anchor="start" x="88.98" y="-1053.67" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="109.98" y="-1053.67" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
-<text text-anchor="start" x="88.98" y="-1036.67" font-family="Helvetica,sans-Serif" font-size="12.00">msre_desc </text>
-<text text-anchor="start" x="156.98" y="-1036.67" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-</g>
-<!-- serving -->
-<g id="node15" class="node">
-<title>serving</title>
-<path fill="none" stroke="black" d="M545.41,-799.49C545.41,-799.49 665.41,-799.49 665.41,-799.49 671.41,-799.49 677.41,-805.49 677.41,-811.49 677.41,-811.49 677.41,-908.49 677.41,-908.49 677.41,-914.49 671.41,-920.49 665.41,-920.49 665.41,-920.49 545.41,-920.49 545.41,-920.49 539.41,-920.49 533.41,-914.49 533.41,-908.49 533.41,-908.49 533.41,-811.49 533.41,-811.49 533.41,-805.49 539.41,-799.49 545.41,-799.49"/>
-<text text-anchor="start" x="578.41" y="-900.09" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">serving</text>
-<polyline fill="none" stroke="black" points="533.41,-890.49 677.41,-890.49 "/>
-<text text-anchor="start" x="540.41" y="-876.39" font-family="Helvetica,sans-Serif" font-size="12.00">food_id </text>
-<text text-anchor="start" x="588.41" y="-876.39" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="540.41" y="-859.39" font-family="Helvetica,sans-Serif" font-size="12.00">msre_id </text>
-<text text-anchor="start" x="591.41" y="-859.39" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="540.41" y="-842.39" font-family="Helvetica,sans-Serif" font-size="12.00">grams </text>
-<text text-anchor="start" x="583.41" y="-842.39" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">float</text>
-<text text-anchor="start" x="540.41" y="-825.39" font-family="Helvetica,sans-Serif" font-size="12.00">num_data_pts </text>
-<text text-anchor="start" x="628.41" y="-825.39" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="540.41" y="-808.39" font-family="Helvetica,sans-Serif" font-size="12.00">std_dev </text>
-<text text-anchor="start" x="590.41" y="-808.39" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">float</text>
-</g>
-<!-- serving&#45;&gt;food_des -->
-<g id="edge14" class="edge">
-<title>serving&#45;&gt;food_des</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M596.63,-799.21C594.51,-784.59 592.16,-768.35 589.75,-751.67"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="592.48,-750.96 588.57,-743.45 586.94,-751.77 592.48,-750.96"/>
-</g>
-<!-- serving&#45;&gt;serv_desc -->
-<g id="edge13" class="edge">
-<title>serving&#45;&gt;serv_desc</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M533.19,-847.31C467,-839.36 368.3,-837.03 294.12,-876.47 235.49,-907.65 194.38,-975.37 172.46,-1019.87"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="169.94,-1018.65 168.98,-1027.07 174.98,-1021.09 169.94,-1018.65"/>
-</g>
-</g>
-</svg>
index e5e52c1b3f99bc4f0a2a54c73c61d4f44f09e035..045762078dae0766a4b8947d0f5138baad64316e 100755 (executable)
@@ -2,6 +2,6 @@
 
 # cd to script's directory
 cd "$(dirname "$0")"
-cd ../sql
+cd ../usda
 
-sqleton -o ../docs/nutra.svg nutra.db
+sqleton -o ../docs/usda.svg usda.db
diff --git a/docs/usda.svg b/docs/usda.svg
new file mode 100644 (file)
index 0000000..ad21bc5
--- /dev/null
@@ -0,0 +1,361 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<!-- Generated by graphviz version 2.43.0 (0)
+ -->
+<!-- Title: undefined Pages: 1 -->
+<svg width="996pt" height="1501pt"
+ viewBox="0.00 0.00 995.60 1500.60" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(28.8 1450.8)">
+<title>undefined</title>
+<polygon fill="white" stroke="transparent" points="-28.8,49.8 -28.8,-1450.8 966.8,-1450.8 966.8,49.8 -28.8,49.8"/>
+<text text-anchor="start" x="442" y="12.6" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">usda.db</text>
+<!-- version -->
+<g id="node1" class="node">
+<title>version</title>
+<path fill="none" stroke="black" d="M804.24,-720.14C804.24,-720.14 924.24,-720.14 924.24,-720.14 930.24,-720.14 936.24,-726.14 936.24,-732.14 936.24,-732.14 936.24,-795.14 936.24,-795.14 936.24,-801.14 930.24,-807.14 924.24,-807.14 924.24,-807.14 804.24,-807.14 804.24,-807.14 798.24,-807.14 792.24,-801.14 792.24,-795.14 792.24,-795.14 792.24,-732.14 792.24,-732.14 792.24,-726.14 798.24,-720.14 804.24,-720.14"/>
+<text text-anchor="start" x="837.24" y="-786.74" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">version</text>
+<polyline fill="none" stroke="black" points="792.24,-777.14 936.24,-777.14 "/>
+<text text-anchor="start" x="799.24" y="-763.04" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="820.24" y="-763.04" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
+<text text-anchor="start" x="799.24" y="-746.04" font-family="Helvetica,sans-Serif" font-size="12.00">version </text>
+<text text-anchor="start" x="847.24" y="-746.04" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="799.24" y="-729.04" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
+<text text-anchor="start" x="849.24" y="-729.04" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">timestamp</text>
+</g>
+<!-- sqlite_sequence -->
+<g id="node2" class="node">
+<title>sqlite_sequence</title>
+<path fill="none" stroke="black" d="M804.24,-936.64C804.24,-936.64 924.24,-936.64 924.24,-936.64 930.24,-936.64 936.24,-942.64 936.24,-948.64 936.24,-948.64 936.24,-994.64 936.24,-994.64 936.24,-1000.64 930.24,-1006.64 924.24,-1006.64 924.24,-1006.64 804.24,-1006.64 804.24,-1006.64 798.24,-1006.64 792.24,-1000.64 792.24,-994.64 792.24,-994.64 792.24,-948.64 792.24,-948.64 792.24,-942.64 798.24,-936.64 804.24,-936.64"/>
+<text text-anchor="start" x="806.24" y="-986.24" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">sqlite_sequence</text>
+<polyline fill="none" stroke="black" points="792.24,-976.64 936.24,-976.64 "/>
+<text text-anchor="start" x="799.24" y="-963.04" font-family="Helvetica,sans-Serif" font-size="12.00">name </text>
+<text text-anchor="start" x="838.24" y="-963.04" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00"> </text>
+<text text-anchor="start" x="799.24" y="-946.04" font-family="Helvetica,sans-Serif" font-size="12.00">seq </text>
+<text text-anchor="start" x="824.24" y="-946.04" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00"> </text>
+</g>
+<!-- nutr_def -->
+<g id="node3" class="node">
+<title>nutr_def</title>
+<path fill="none" stroke="black" d="M11.61,-647.36C11.61,-647.36 131.61,-647.36 131.61,-647.36 137.61,-647.36 143.61,-653.36 143.61,-659.36 143.61,-659.36 143.61,-807.36 143.61,-807.36 143.61,-813.36 137.61,-819.36 131.61,-819.36 131.61,-819.36 11.61,-819.36 11.61,-819.36 5.61,-819.36 -0.39,-813.36 -0.39,-807.36 -0.39,-807.36 -0.39,-659.36 -0.39,-659.36 -0.39,-653.36 5.61,-647.36 11.61,-647.36"/>
+<text text-anchor="start" x="40.61" y="-798.96" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">nutr_def</text>
+<polyline fill="none" stroke="black" points="-0.39,-789.36 143.61,-789.36 "/>
+<text text-anchor="start" x="6.61" y="-775.76" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="27.61" y="-775.76" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
+<text text-anchor="start" x="6.61" y="-758.76" font-family="Helvetica,sans-Serif" font-size="12.00">rda </text>
+<text text-anchor="start" x="30.61" y="-758.76" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">float</text>
+<text text-anchor="start" x="6.61" y="-741.76" font-family="Helvetica,sans-Serif" font-size="12.00">unit </text>
+<text text-anchor="start" x="33.61" y="-741.76" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="6.61" y="-724.76" font-family="Helvetica,sans-Serif" font-size="12.00">tagname </text>
+<text text-anchor="start" x="64.61" y="-724.76" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="6.61" y="-707.76" font-family="Helvetica,sans-Serif" font-size="12.00">nutr_desc </text>
+<text text-anchor="start" x="69.61" y="-707.76" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="6.61" y="-690.76" font-family="Helvetica,sans-Serif" font-size="12.00">num_dec </text>
+<text text-anchor="start" x="65.61" y="-690.76" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="6.61" y="-673.76" font-family="Helvetica,sans-Serif" font-size="12.00">sr_order </text>
+<text text-anchor="start" x="60.61" y="-673.76" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="6.61" y="-656.76" font-family="Helvetica,sans-Serif" font-size="12.00">flav_class </text>
+<text text-anchor="start" x="67.61" y="-656.76" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+</g>
+<!-- fdgrp -->
+<g id="node4" class="node">
+<title>fdgrp</title>
+<path fill="none" stroke="black" d="M805.78,-537.67C805.78,-537.67 925.78,-537.67 925.78,-537.67 931.78,-537.67 937.78,-543.67 937.78,-549.67 937.78,-549.67 937.78,-595.67 937.78,-595.67 937.78,-601.67 931.78,-607.67 925.78,-607.67 925.78,-607.67 805.78,-607.67 805.78,-607.67 799.78,-607.67 793.78,-601.67 793.78,-595.67 793.78,-595.67 793.78,-549.67 793.78,-549.67 793.78,-543.67 799.78,-537.67 805.78,-537.67"/>
+<text text-anchor="start" x="845.78" y="-587.27" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">fdgrp</text>
+<polyline fill="none" stroke="black" points="793.78,-577.67 937.78,-577.67 "/>
+<text text-anchor="start" x="800.78" y="-564.07" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="821.78" y="-564.07" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
+<text text-anchor="start" x="800.78" y="-547.07" font-family="Helvetica,sans-Serif" font-size="12.00">fdgrp_desc </text>
+<text text-anchor="start" x="870.78" y="-547.07" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+</g>
+<!-- food_des -->
+<g id="node5" class="node">
+<title>food_des</title>
+<path fill="none" stroke="black" d="M500.81,-462.69C500.81,-462.69 620.81,-462.69 620.81,-462.69 626.81,-462.69 632.81,-468.69 632.81,-474.69 632.81,-474.69 632.81,-724.69 632.81,-724.69 632.81,-730.69 626.81,-736.69 620.81,-736.69 620.81,-736.69 500.81,-736.69 500.81,-736.69 494.81,-736.69 488.81,-730.69 488.81,-724.69 488.81,-724.69 488.81,-474.69 488.81,-474.69 488.81,-468.69 494.81,-462.69 500.81,-462.69"/>
+<text text-anchor="start" x="527.81" y="-716.29" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">food_des</text>
+<polyline fill="none" stroke="black" points="488.81,-706.69 632.81,-706.69 "/>
+<text text-anchor="start" x="495.81" y="-693.09" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="516.81" y="-693.09" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
+<text text-anchor="start" x="495.81" y="-676.09" font-family="Helvetica,sans-Serif" font-size="12.00">fdgrp_id </text>
+<text text-anchor="start" x="548.81" y="-676.09" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="495.81" y="-659.09" font-family="Helvetica,sans-Serif" font-size="12.00">long_desc </text>
+<text text-anchor="start" x="559.81" y="-659.09" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="495.81" y="-642.09" font-family="Helvetica,sans-Serif" font-size="12.00">shrt_desc </text>
+<text text-anchor="start" x="556.81" y="-642.09" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="495.81" y="-625.09" font-family="Helvetica,sans-Serif" font-size="12.00">com_name </text>
+<text text-anchor="start" x="566.81" y="-625.09" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="495.81" y="-608.09" font-family="Helvetica,sans-Serif" font-size="12.00">manufac_name </text>
+<text text-anchor="start" x="593.81" y="-608.09" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="495.81" y="-591.09" font-family="Helvetica,sans-Serif" font-size="12.00">survey </text>
+<text text-anchor="start" x="539.81" y="-591.09" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="495.81" y="-574.09" font-family="Helvetica,sans-Serif" font-size="12.00">ref_desc </text>
+<text text-anchor="start" x="550.81" y="-574.09" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="495.81" y="-557.09" font-family="Helvetica,sans-Serif" font-size="12.00">refuse </text>
+<text text-anchor="start" x="537.81" y="-557.09" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="495.81" y="-540.09" font-family="Helvetica,sans-Serif" font-size="12.00">sci_name </text>
+<text text-anchor="start" x="556.81" y="-540.09" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="495.81" y="-523.09" font-family="Helvetica,sans-Serif" font-size="12.00">n_factor </text>
+<text text-anchor="start" x="549.81" y="-523.09" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">float</text>
+<text text-anchor="start" x="495.81" y="-506.09" font-family="Helvetica,sans-Serif" font-size="12.00">pro_factor </text>
+<text text-anchor="start" x="561.81" y="-506.09" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">float</text>
+<text text-anchor="start" x="495.81" y="-489.09" font-family="Helvetica,sans-Serif" font-size="12.00">fat_factor </text>
+<text text-anchor="start" x="558.81" y="-489.09" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">float</text>
+<text text-anchor="start" x="495.81" y="-472.09" font-family="Helvetica,sans-Serif" font-size="12.00">cho_factor </text>
+<text text-anchor="start" x="563.81" y="-472.09" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">float</text>
+</g>
+<!-- food_des&#45;&gt;fdgrp -->
+<g id="edge1" class="edge">
+<title>food_des&#45;&gt;fdgrp</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M633.08,-593.28C678.96,-589.22 738.37,-583.96 785.67,-579.76"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="786.04,-582.54 793.76,-579.05 785.54,-576.96 786.04,-582.54"/>
+</g>
+<!-- src_cd -->
+<g id="node6" class="node">
+<title>src_cd</title>
+<path fill="none" stroke="black" d="M258.49,-1351.29C258.49,-1351.29 378.49,-1351.29 378.49,-1351.29 384.49,-1351.29 390.49,-1357.29 390.49,-1363.29 390.49,-1363.29 390.49,-1409.29 390.49,-1409.29 390.49,-1415.29 384.49,-1421.29 378.49,-1421.29 378.49,-1421.29 258.49,-1421.29 258.49,-1421.29 252.49,-1421.29 246.49,-1415.29 246.49,-1409.29 246.49,-1409.29 246.49,-1363.29 246.49,-1363.29 246.49,-1357.29 252.49,-1351.29 258.49,-1351.29"/>
+<text text-anchor="start" x="295.49" y="-1400.89" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">src_cd</text>
+<polyline fill="none" stroke="black" points="246.49,-1391.29 390.49,-1391.29 "/>
+<text text-anchor="start" x="253.49" y="-1377.69" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="274.49" y="-1377.69" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="253.49" y="-1360.69" font-family="Helvetica,sans-Serif" font-size="12.00">description </text>
+<text text-anchor="start" x="323.49" y="-1360.69" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+</g>
+<!-- deriv_cd -->
+<g id="node7" class="node">
+<title>deriv_cd</title>
+<path fill="none" stroke="black" d="M627.89,-1235.63C627.89,-1235.63 747.89,-1235.63 747.89,-1235.63 753.89,-1235.63 759.89,-1241.63 759.89,-1247.63 759.89,-1247.63 759.89,-1293.63 759.89,-1293.63 759.89,-1299.63 753.89,-1305.63 747.89,-1305.63 747.89,-1305.63 627.89,-1305.63 627.89,-1305.63 621.89,-1305.63 615.89,-1299.63 615.89,-1293.63 615.89,-1293.63 615.89,-1247.63 615.89,-1247.63 615.89,-1241.63 621.89,-1235.63 627.89,-1235.63"/>
+<text text-anchor="start" x="657.89" y="-1285.23" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">deriv_cd</text>
+<polyline fill="none" stroke="black" points="615.89,-1275.63 759.89,-1275.63 "/>
+<text text-anchor="start" x="622.89" y="-1262.03" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="643.89" y="-1262.03" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="622.89" y="-1245.03" font-family="Helvetica,sans-Serif" font-size="12.00">description </text>
+<text text-anchor="start" x="692.89" y="-1245.03" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+</g>
+<!-- nut_data -->
+<g id="node8" class="node">
+<title>nut_data</title>
+<path fill="none" stroke="black" d="M303.64,-868.16C303.64,-868.16 423.64,-868.16 423.64,-868.16 429.64,-868.16 435.64,-874.16 435.64,-880.16 435.64,-880.16 435.64,-1198.16 435.64,-1198.16 435.64,-1204.16 429.64,-1210.16 423.64,-1210.16 423.64,-1210.16 303.64,-1210.16 303.64,-1210.16 297.64,-1210.16 291.64,-1204.16 291.64,-1198.16 291.64,-1198.16 291.64,-880.16 291.64,-880.16 291.64,-874.16 297.64,-868.16 303.64,-868.16"/>
+<text text-anchor="start" x="331.64" y="-1189.76" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">nut_data</text>
+<polyline fill="none" stroke="black" points="291.64,-1180.16 435.64,-1180.16 "/>
+<text text-anchor="start" x="298.64" y="-1166.56" font-family="Helvetica,sans-Serif" font-size="12.00">food_id </text>
+<text text-anchor="start" x="346.64" y="-1166.56" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="298.64" y="-1149.56" font-family="Helvetica,sans-Serif" font-size="12.00">nutr_id </text>
+<text text-anchor="start" x="344.64" y="-1149.56" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="298.64" y="-1132.56" font-family="Helvetica,sans-Serif" font-size="12.00">nutr_val </text>
+<text text-anchor="start" x="350.64" y="-1132.56" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">float</text>
+<text text-anchor="start" x="298.64" y="-1115.56" font-family="Helvetica,sans-Serif" font-size="12.00">num_data_pts </text>
+<text text-anchor="start" x="386.64" y="-1115.56" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="298.64" y="-1098.56" font-family="Helvetica,sans-Serif" font-size="12.00">std_err </text>
+<text text-anchor="start" x="343.64" y="-1098.56" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">float</text>
+<text text-anchor="start" x="298.64" y="-1081.56" font-family="Helvetica,sans-Serif" font-size="12.00">src_cd </text>
+<text text-anchor="start" x="340.64" y="-1081.56" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="298.64" y="-1064.56" font-family="Helvetica,sans-Serif" font-size="12.00">deriv_cd </text>
+<text text-anchor="start" x="353.64" y="-1064.56" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="298.64" y="-1047.56" font-family="Helvetica,sans-Serif" font-size="12.00">ref_food_id </text>
+<text text-anchor="start" x="368.64" y="-1047.56" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="298.64" y="-1030.56" font-family="Helvetica,sans-Serif" font-size="12.00">add_nutr_mark </text>
+<text text-anchor="start" x="393.64" y="-1030.56" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="298.64" y="-1013.56" font-family="Helvetica,sans-Serif" font-size="12.00">num_studies </text>
+<text text-anchor="start" x="377.64" y="-1013.56" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="298.64" y="-996.56" font-family="Helvetica,sans-Serif" font-size="12.00">min </text>
+<text text-anchor="start" x="325.64" y="-996.56" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">float</text>
+<text text-anchor="start" x="298.64" y="-979.56" font-family="Helvetica,sans-Serif" font-size="12.00">max </text>
+<text text-anchor="start" x="329.64" y="-979.56" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">float</text>
+<text text-anchor="start" x="298.64" y="-962.56" font-family="Helvetica,sans-Serif" font-size="12.00">df </text>
+<text text-anchor="start" x="314.64" y="-962.56" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">long</text>
+<text text-anchor="start" x="298.64" y="-945.56" font-family="Helvetica,sans-Serif" font-size="12.00">low_eb </text>
+<text text-anchor="start" x="344.64" y="-945.56" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">float</text>
+<text text-anchor="start" x="298.64" y="-928.56" font-family="Helvetica,sans-Serif" font-size="12.00">up_eb </text>
+<text text-anchor="start" x="338.64" y="-928.56" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">float</text>
+<text text-anchor="start" x="298.64" y="-911.56" font-family="Helvetica,sans-Serif" font-size="12.00">stat_cmt </text>
+<text text-anchor="start" x="354.64" y="-911.56" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="298.64" y="-894.56" font-family="Helvetica,sans-Serif" font-size="12.00">add_mod_date </text>
+<text text-anchor="start" x="391.64" y="-894.56" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">date</text>
+<text text-anchor="start" x="298.64" y="-877.56" font-family="Helvetica,sans-Serif" font-size="12.00">cc </text>
+<text text-anchor="start" x="316.64" y="-877.56" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+</g>
+<!-- nut_data&#45;&gt;nutr_def -->
+<g id="edge4" class="edge">
+<title>nut_data&#45;&gt;nutr_def</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M291.45,-963.57C248.29,-918.37 193.44,-860.93 149.33,-814.74"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="151.28,-812.73 143.73,-808.87 147.23,-816.59 151.28,-812.73"/>
+</g>
+<!-- nut_data&#45;&gt;food_des -->
+<g id="edge5" class="edge">
+<title>nut_data&#45;&gt;food_des</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M435.66,-878.64C455.37,-834.71 476.6,-787.38 495.89,-744.39"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="498.49,-745.42 499.21,-736.98 493.38,-743.13 498.49,-745.42"/>
+</g>
+<!-- nut_data&#45;&gt;src_cd -->
+<g id="edge3" class="edge">
+<title>nut_data&#45;&gt;src_cd</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M341.4,-1210.18C334.99,-1259.4 328.56,-1308.9 324.14,-1342.83"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="321.32,-1342.81 323.07,-1351.11 326.88,-1343.53 321.32,-1342.81"/>
+</g>
+<!-- nut_data&#45;&gt;deriv_cd -->
+<g id="edge2" class="edge">
+<title>nut_data&#45;&gt;deriv_cd</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M436,-1090.82C495.07,-1132.98 577.35,-1191.72 631.58,-1230.43"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="630.24,-1232.92 638.38,-1235.29 633.5,-1228.36 630.24,-1232.92"/>
+</g>
+<!-- lang_desc -->
+<g id="node9" class="node">
+<title>lang_desc</title>
+<path fill="none" stroke="black" d="M785.57,-0.84C785.57,-0.84 905.57,-0.84 905.57,-0.84 911.57,-0.84 917.57,-6.84 917.57,-12.84 917.57,-12.84 917.57,-58.84 917.57,-58.84 917.57,-64.84 911.57,-70.84 905.57,-70.84 905.57,-70.84 785.57,-70.84 785.57,-70.84 779.57,-70.84 773.57,-64.84 773.57,-58.84 773.57,-58.84 773.57,-12.84 773.57,-12.84 773.57,-6.84 779.57,-0.84 785.57,-0.84"/>
+<text text-anchor="start" x="809.57" y="-50.44" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">lang_desc</text>
+<polyline fill="none" stroke="black" points="773.57,-40.84 917.57,-40.84 "/>
+<text text-anchor="start" x="780.57" y="-27.24" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="801.57" y="-27.24" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="780.57" y="-10.24" font-family="Helvetica,sans-Serif" font-size="12.00">description </text>
+<text text-anchor="start" x="850.57" y="-10.24" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+</g>
+<!-- langual -->
+<g id="node10" class="node">
+<title>langual</title>
+<path fill="none" stroke="black" d="M493.62,-268.76C493.62,-268.76 613.62,-268.76 613.62,-268.76 619.62,-268.76 625.62,-274.76 625.62,-280.76 625.62,-280.76 625.62,-326.76 625.62,-326.76 625.62,-332.76 619.62,-338.76 613.62,-338.76 613.62,-338.76 493.62,-338.76 493.62,-338.76 487.62,-338.76 481.62,-332.76 481.62,-326.76 481.62,-326.76 481.62,-280.76 481.62,-280.76 481.62,-274.76 487.62,-268.76 493.62,-268.76"/>
+<text text-anchor="start" x="526.62" y="-318.36" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">langual</text>
+<polyline fill="none" stroke="black" points="481.62,-308.76 625.62,-308.76 "/>
+<text text-anchor="start" x="488.62" y="-295.16" font-family="Helvetica,sans-Serif" font-size="12.00">food_id </text>
+<text text-anchor="start" x="536.62" y="-295.16" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="488.62" y="-278.16" font-family="Helvetica,sans-Serif" font-size="12.00">factor_id </text>
+<text text-anchor="start" x="545.62" y="-278.16" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+</g>
+<!-- langual&#45;&gt;food_des -->
+<g id="edge7" class="edge">
+<title>langual&#45;&gt;food_des</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M554.47,-338.87C555.18,-367.98 556.24,-411.45 557.28,-454.59"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="554.49,-454.71 557.48,-462.64 560.08,-454.58 554.49,-454.71"/>
+</g>
+<!-- langual&#45;&gt;lang_desc -->
+<g id="edge6" class="edge">
+<title>langual&#45;&gt;lang_desc</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M591.79,-268.74C645.77,-219.19 744.2,-128.86 801.32,-76.45"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="803.39,-78.35 807.39,-70.87 799.6,-74.22 803.39,-78.35"/>
+</g>
+<!-- data_src -->
+<g id="node11" class="node">
+<title>data_src</title>
+<path fill="none" stroke="black" d="M121.95,-7.13C121.95,-7.13 241.95,-7.13 241.95,-7.13 247.95,-7.13 253.95,-13.13 253.95,-19.13 253.95,-19.13 253.95,-184.13 253.95,-184.13 253.95,-190.13 247.95,-196.13 241.95,-196.13 241.95,-196.13 121.95,-196.13 121.95,-196.13 115.95,-196.13 109.95,-190.13 109.95,-184.13 109.95,-184.13 109.95,-19.13 109.95,-19.13 109.95,-13.13 115.95,-7.13 121.95,-7.13"/>
+<text text-anchor="start" x="150.95" y="-175.73" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">data_src</text>
+<polyline fill="none" stroke="black" points="109.95,-166.13 253.95,-166.13 "/>
+<text text-anchor="start" x="116.95" y="-152.03" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="137.95" y="-152.03" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="116.95" y="-135.03" font-family="Helvetica,sans-Serif" font-size="12.00">authors </text>
+<text text-anchor="start" x="166.95" y="-135.03" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="116.95" y="-118.03" font-family="Helvetica,sans-Serif" font-size="12.00">title </text>
+<text text-anchor="start" x="143.95" y="-118.03" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="116.95" y="-101.03" font-family="Helvetica,sans-Serif" font-size="12.00">year </text>
+<text text-anchor="start" x="147.95" y="-101.03" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="116.95" y="-84.03" font-family="Helvetica,sans-Serif" font-size="12.00">journal </text>
+<text text-anchor="start" x="161.95" y="-84.03" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="116.95" y="-67.03" font-family="Helvetica,sans-Serif" font-size="12.00">vol_city </text>
+<text text-anchor="start" x="165.95" y="-67.03" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="116.95" y="-50.03" font-family="Helvetica,sans-Serif" font-size="12.00">issue_state </text>
+<text text-anchor="start" x="186.95" y="-50.03" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="116.95" y="-33.03" font-family="Helvetica,sans-Serif" font-size="12.00">start_page </text>
+<text text-anchor="start" x="184.95" y="-33.03" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="116.95" y="-16.03" font-family="Helvetica,sans-Serif" font-size="12.00">end_page </text>
+<text text-anchor="start" x="179.95" y="-16.03" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+</g>
+<!-- datsrcln -->
+<g id="node12" class="node">
+<title>datsrcln</title>
+<path fill="none" stroke="black" d="M73.88,-317.78C73.88,-317.78 193.88,-317.78 193.88,-317.78 199.88,-317.78 205.88,-323.78 205.88,-329.78 205.88,-329.78 205.88,-392.78 205.88,-392.78 205.88,-398.78 199.88,-404.78 193.88,-404.78 193.88,-404.78 73.88,-404.78 73.88,-404.78 67.88,-404.78 61.88,-398.78 61.88,-392.78 61.88,-392.78 61.88,-329.78 61.88,-329.78 61.88,-323.78 67.88,-317.78 73.88,-317.78"/>
+<text text-anchor="start" x="103.88" y="-384.38" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">datsrcln</text>
+<polyline fill="none" stroke="black" points="61.88,-374.78 205.88,-374.78 "/>
+<text text-anchor="start" x="68.88" y="-360.68" font-family="Helvetica,sans-Serif" font-size="12.00">food_id </text>
+<text text-anchor="start" x="116.88" y="-360.68" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="68.88" y="-343.68" font-family="Helvetica,sans-Serif" font-size="12.00">nutr_id </text>
+<text text-anchor="start" x="114.88" y="-343.68" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="68.88" y="-326.68" font-family="Helvetica,sans-Serif" font-size="12.00">data_src_id </text>
+<text text-anchor="start" x="139.88" y="-326.68" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+</g>
+<!-- datsrcln&#45;&gt;nutr_def -->
+<g id="edge9" class="edge">
+<title>datsrcln&#45;&gt;nutr_def</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M126.56,-405.06C116.99,-462.24 99.98,-563.89 87.41,-638.98"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="84.61,-638.73 86.05,-647.08 90.14,-639.65 84.61,-638.73"/>
+</g>
+<!-- datsrcln&#45;&gt;food_des -->
+<g id="edge10" class="edge">
+<title>datsrcln&#45;&gt;food_des</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M206.31,-401.72C282.74,-444.41 402.85,-511.48 481.72,-555.52"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="480.4,-557.99 488.75,-559.45 483.13,-553.1 480.4,-557.99"/>
+</g>
+<!-- datsrcln&#45;&gt;data_src -->
+<g id="edge8" class="edge">
+<title>datsrcln&#45;&gt;data_src</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M141.98,-317.53C147.7,-286.63 155.61,-243.89 162.89,-204.59"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="165.73,-204.64 164.43,-196.26 160.22,-203.62 165.73,-204.64"/>
+</g>
+<!-- footnote -->
+<g id="node13" class="node">
+<title>footnote</title>
+<path fill="none" stroke="black" d="M187.63,-558.55C187.63,-558.55 307.63,-558.55 307.63,-558.55 313.63,-558.55 319.63,-564.55 319.63,-570.55 319.63,-570.55 319.63,-667.55 319.63,-667.55 319.63,-673.55 313.63,-679.55 307.63,-679.55 307.63,-679.55 187.63,-679.55 187.63,-679.55 181.63,-679.55 175.63,-673.55 175.63,-667.55 175.63,-667.55 175.63,-570.55 175.63,-570.55 175.63,-564.55 181.63,-558.55 187.63,-558.55"/>
+<text text-anchor="start" x="215.63" y="-659.15" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">footnote</text>
+<polyline fill="none" stroke="black" points="175.63,-649.55 319.63,-649.55 "/>
+<text text-anchor="start" x="182.63" y="-635.45" font-family="Helvetica,sans-Serif" font-size="12.00">food_id </text>
+<text text-anchor="start" x="230.63" y="-635.45" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="182.63" y="-618.45" font-family="Helvetica,sans-Serif" font-size="12.00">footnt_no </text>
+<text text-anchor="start" x="243.63" y="-618.45" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="182.63" y="-601.45" font-family="Helvetica,sans-Serif" font-size="12.00">footnt_typ </text>
+<text text-anchor="start" x="247.63" y="-601.45" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="182.63" y="-584.45" font-family="Helvetica,sans-Serif" font-size="12.00">nutr_id </text>
+<text text-anchor="start" x="228.63" y="-584.45" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="182.63" y="-567.45" font-family="Helvetica,sans-Serif" font-size="12.00">footnt_txt </text>
+<text text-anchor="start" x="244.63" y="-567.45" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+</g>
+<!-- footnote&#45;&gt;nutr_def -->
+<g id="edge11" class="edge">
+<title>footnote&#45;&gt;nutr_def</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M175.53,-665.87C167.37,-671.17 159.02,-676.59 150.78,-681.95"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="149.07,-679.72 143.89,-686.42 152.12,-684.41 149.07,-679.72"/>
+</g>
+<!-- footnote&#45;&gt;food_des -->
+<g id="edge12" class="edge">
+<title>footnote&#45;&gt;food_des</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M319.87,-614.58C367.87,-611.62 430.94,-607.72 480.51,-604.65"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="480.85,-607.44 488.66,-604.15 480.5,-601.85 480.85,-607.44"/>
+</g>
+<!-- serv_desc -->
+<g id="node14" class="node">
+<title>serv_desc</title>
+<path fill="none" stroke="black" d="M90.72,-1015.62C90.72,-1015.62 210.72,-1015.62 210.72,-1015.62 216.72,-1015.62 222.72,-1021.62 222.72,-1027.62 222.72,-1027.62 222.72,-1073.62 222.72,-1073.62 222.72,-1079.62 216.72,-1085.62 210.72,-1085.62 210.72,-1085.62 90.72,-1085.62 90.72,-1085.62 84.72,-1085.62 78.72,-1079.62 78.72,-1073.62 78.72,-1073.62 78.72,-1027.62 78.72,-1027.62 78.72,-1021.62 84.72,-1015.62 90.72,-1015.62"/>
+<text text-anchor="start" x="114.72" y="-1065.22" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">serv_desc</text>
+<polyline fill="none" stroke="black" points="78.72,-1055.62 222.72,-1055.62 "/>
+<text text-anchor="start" x="85.72" y="-1042.02" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="106.72" y="-1042.02" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
+<text text-anchor="start" x="85.72" y="-1025.02" font-family="Helvetica,sans-Serif" font-size="12.00">msre_desc </text>
+<text text-anchor="start" x="153.72" y="-1025.02" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+</g>
+<!-- serving -->
+<g id="node15" class="node">
+<title>serving</title>
+<path fill="none" stroke="black" d="M537.08,-790.12C537.08,-790.12 657.08,-790.12 657.08,-790.12 663.08,-790.12 669.08,-796.12 669.08,-802.12 669.08,-802.12 669.08,-899.12 669.08,-899.12 669.08,-905.12 663.08,-911.12 657.08,-911.12 657.08,-911.12 537.08,-911.12 537.08,-911.12 531.08,-911.12 525.08,-905.12 525.08,-899.12 525.08,-899.12 525.08,-802.12 525.08,-802.12 525.08,-796.12 531.08,-790.12 537.08,-790.12"/>
+<text text-anchor="start" x="570.08" y="-890.72" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">serving</text>
+<polyline fill="none" stroke="black" points="525.08,-881.12 669.08,-881.12 "/>
+<text text-anchor="start" x="532.08" y="-867.02" font-family="Helvetica,sans-Serif" font-size="12.00">food_id </text>
+<text text-anchor="start" x="580.08" y="-867.02" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="532.08" y="-850.02" font-family="Helvetica,sans-Serif" font-size="12.00">msre_id </text>
+<text text-anchor="start" x="583.08" y="-850.02" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="532.08" y="-833.02" font-family="Helvetica,sans-Serif" font-size="12.00">grams </text>
+<text text-anchor="start" x="575.08" y="-833.02" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">float</text>
+<text text-anchor="start" x="532.08" y="-816.02" font-family="Helvetica,sans-Serif" font-size="12.00">num_data_pts </text>
+<text text-anchor="start" x="620.08" y="-816.02" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="532.08" y="-799.02" font-family="Helvetica,sans-Serif" font-size="12.00">std_dev </text>
+<text text-anchor="start" x="582.08" y="-799.02" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">float</text>
+</g>
+<!-- serving&#45;&gt;food_des -->
+<g id="edge14" class="edge">
+<title>serving&#45;&gt;food_des</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M588.3,-789.88C586.3,-776.05 584.09,-760.77 581.82,-745.06"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="584.55,-744.33 580.63,-736.81 579,-745.13 584.55,-744.33"/>
+</g>
+<!-- serving&#45;&gt;serv_desc -->
+<g id="edge13" class="edge">
+<title>serving&#45;&gt;serv_desc</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M524.81,-837.26C459.17,-828.85 361.7,-825.93 288.44,-864.96 230.35,-895.91 190.16,-963.41 168.79,-1007.92"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="166.14,-1006.97 165.26,-1015.41 171.2,-1009.36 166.14,-1006.97"/>
+</g>
+</g>
+</svg>
similarity index 100%
copy from sql/tables.sql
copy to nt/biometrics/tables.sql
similarity index 100%
copy from sql/build.sh
copy to nt/build.sh
similarity index 100%
copy from sql/format-sql.sh
copy to nt/format-sql.sh
similarity index 100%
copy from sql/init.sql
copy to nt/init.sql
similarity index 100%
copy from sql/tables.sql
copy to nt/plates/tables.sql
similarity index 100%
copy from sql/tables.sql
copy to nt/recipes/tables.sql
diff --git a/sql/version.csv b/sql/version.csv
deleted file mode 100644 (file)
index 316748e..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-id,version,created
-1,0.0.0,Wed 05 Aug 2020 07:09:35 PM EDT
-2,0.0.1,Wed 05 Aug 2020 08:14:52 PM EDT
-3,0.0.2,Thu 06 Aug 2020 11:39:54 AM EDT
-4,0.0.3,Tue 11 Aug 2020 09:37:50 PM EDT
-5,0.0.4,Mon 07 Sep 2020 10:01:45 AM EDT
similarity index 72%
rename from sql/build.sh
rename to usda/build.sh
index ffeb8bd07ad1eee25e7ff8abbfe5ff77121d332f..5e0df3ce3c3c43531068a4087d7e7fe33dbcd70f 100755 (executable)
@@ -10,20 +10,20 @@ fi
 cd "$(dirname "$0")"
 # printf "\\n\e[1;31m\e[0m\\n"
 
-rm_cmd="rm -f nutra.db"
+rm_cmd="rm -f usda.db"
 printf "\\n\e[1;31m${rm_cmd}\e[0m\\n\n"
 $rm_cmd
 
-pack_msg="==> Pack nutra.db-$VERSION"
+pack_msg="==> Pack usda.db-$VERSION"
 printf "\\n\\x1b[32m${pack_msg}\x1b[0m\n\n"
 
 # Create SQL file
-pack_cmd="sqlite3 nutra.db \".read init.sql\""
+pack_cmd="sqlite3 usda.db \".read init.sql\""
 printf "\\n\e[1;31m${pack_cmd}\e[0m\\n"
 bash -exec "$pack_cmd"
 
 # Compress xzip
-tar_cmd="tar cJvf nutra.db-$VERSION.tar.xz nutra.db"
+tar_cmd="tar cJvf usda.db-$VERSION.tar.xz usda.db"
 printf "\\n\e[1;31m${tar_cmd}\e[0m\\n"
 $tar_cmd
 
@@ -31,6 +31,6 @@ $tar_cmd
 # printf "\\n\e[1;31m${rm_cmd}\e[0m\\n"
 # $rm_cmd
 
-mv_cmd="mv nutra.db-$VERSION.tar.xz dist"
+mv_cmd="mv usda.db-$VERSION.tar.xz dist"
 printf "\\n\e[1;31m${mv_cmd}\e[0m\\n\n"
 $mv_cmd
diff --git a/usda/data/access2csv/.gitignore b/usda/data/access2csv/.gitignore
new file mode 100644 (file)
index 0000000..5b13aa4
--- /dev/null
@@ -0,0 +1,7 @@
+/access2csv.jar
+/bin
+/target/
+.classpath
+.settings
+.project
+/data
diff --git a/usda/data/access2csv/.travis.yml b/usda/data/access2csv/.travis.yml
new file mode 100644 (file)
index 0000000..8ff9659
--- /dev/null
@@ -0,0 +1,10 @@
+language: java
+sudo: false
+cache:
+  directories:
+    - $HOME/.m2
+jdk:
+  - oraclejdk7
+  - oraclejdk8
+after_success:
+  - mvn clean test jacoco:report coveralls:report
diff --git a/usda/data/access2csv/Dockerfile b/usda/data/access2csv/Dockerfile
new file mode 100644 (file)
index 0000000..1f56a8d
--- /dev/null
@@ -0,0 +1,16 @@
+FROM openjdk:8-jdk-alpine as build
+
+RUN apk update && apk add git maven
+
+ADD ./ /app
+
+WORKDIR /app
+
+RUN mvn clean install
+
+FROM openjdk:8-jre-alpine
+
+COPY --from=build /app/target /app
+WORKDIR /app
+
+ENTRYPOINT [ "/app/appassembler/bin/access2csv" ]
\ No newline at end of file
diff --git a/usda/data/access2csv/LICENSE b/usda/data/access2csv/LICENSE
new file mode 100644 (file)
index 0000000..5df17bb
--- /dev/null
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2013 Accelerated Data Works, Ryan Davis
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/usda/data/access2csv/README.md b/usda/data/access2csv/README.md
new file mode 100644 (file)
index 0000000..bac3c4a
--- /dev/null
@@ -0,0 +1,67 @@
+# access2csv
+
+Simple program to extract data from Access databases into CSV files.
+
+## Features
+
+ * view the schema of the database
+ * export all tables to csv files named after the table
+ * export one table
+
+## Examples
+
+Dumping a schema:
+
+    $ ./access2csv myfile.accdb --schema       
+       CREATE TABLE Test(
+               Id INT,
+               Name TEXT,
+       )
+       CREATE TABLE Test2(
+               Id INT,
+               Name TEXT
+       )
+       
+Exporting all tables:
+
+    $ ./access2csv myfile.accdb
+       Exporting 'Test' to /home/ryepup/Test.csv
+       2 rows exported
+       Exporting 'Test2' to /home/ryepup/Test2.csv
+       100000 rows exported
+       
+Export one table:
+
+    $ ./access2csv myfile.accdb Test
+       1,"foo"
+       2,"bar"
+
+## Installation
+
+Binaries are available at
+https://github.com/AccelerationNet/access2csv/releases, download a jar
+file from there then use it as shown above.
+
+### Compile from source
+
+    $ git clone https://github.com/AccelerationNet/access2csv.git
+    $ cd access2csv
+    $ mvn clean install
+       
+Now you should have a `access2csv.jar` in the target directory, ready to go.
+
+Note December, 2017. Things have changed a little. If nothing else works then, (after compiling with mvn clean install) try running something 
+like this (example of Windows batch file) in the root of the repository (replace the path\to\file):
+<pre> ".\target\appassembler\bin\access2csv.bat" --input ".\path\to\file" --output . --write-null NULL --quote-all false --schema --with-header </pre>
+
+
+## Depenencies
+
+ * [Jackess](http://jackcess.sourceforge.net/) - a pure Java library
+   for reading from and writing to MS Access databases
+ * [opencsv](http://opencsv.sourceforge.net/) - CSV library
+
+## Contributing
+
+Use https://github.com/AccelerationNet/access2csv to open issues or
+pull requests.
diff --git a/usda/data/access2csv/access2csv b/usda/data/access2csv/access2csv
new file mode 100755 (executable)
index 0000000..a78eb1a
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+# This script runs the Access 2 CSV code.
+# Before running this script for the first time 
+# you may need to run:
+#     chmod +x access2csv
+#
+
+if [ ! -d "target/appassembler/bin" ]; then
+    mvn -quiet clean install -DskipTests -Djetty.skip
+fi
+
+chmod u+x target/appassembler/bin/*
+target/appassembler/bin/access2csv "$@"
diff --git a/usda/data/access2csv/pom.xml b/usda/data/access2csv/pom.xml
new file mode 100755 (executable)
index 0000000..40d59e5
--- /dev/null
@@ -0,0 +1,399 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+       <modelVersion>4.0.0</modelVersion>
+       <groupId>com.github.AccelerationNet.access2csv</groupId>
+       <artifactId>access2csv</artifactId>
+       <version>0.2-SNAPSHOT</version>
+       <name>Access to CSV</name>
+       <description>Converter from Access to CSV</description>
+       <packaging>jar</packaging>
+
+       <url>https://github.com/AccelerationNet/access2csv/</url>
+       <licenses>
+               <license>
+                       <name>MIT License</name>
+                       <url>https://github.com/AccelerationNet/access2csv/blob/master/LICENSE</url>
+                       <distribution>repo</distribution>
+               </license>
+       </licenses>
+       <scm>
+               <url>git@github.com:AccelerationNet/access2csv.git</url>
+               <connection>scm:git:git@github.com:AccelerationNet/access2csv.git</connection>
+               <developerConnection>scm:git:git@github.com:AccelerationNet/access2csv.git</developerConnection>
+       </scm>
+       <developers>
+               <developer>
+                       <name>Ryan Davis</name>
+               </developer>
+               <developer>
+                       <name>Peter Ansell</name>
+               </developer>
+       </developers>
+
+       <properties>
+               <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+               <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+
+               <junit.version>4.12</junit.version>
+               <slf4j.version>1.7.16</slf4j.version>
+       </properties>
+       <prerequisites>
+               <maven>3.0.5</maven>
+       </prerequisites>
+
+       <dependencies>
+               <dependency>
+                       <groupId>com.opencsv</groupId>
+                       <artifactId>opencsv</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>com.healthmarketscience.jackcess</groupId>
+                       <artifactId>jackcess</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>net.sf.jopt-simple</groupId>
+                       <artifactId>jopt-simple</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.slf4j</groupId>
+                       <artifactId>jcl-over-slf4j</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.slf4j</groupId>
+                       <artifactId>slf4j-simple</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>junit</groupId>
+                       <artifactId>junit</artifactId>
+               </dependency>
+       </dependencies>
+
+       <dependencyManagement>
+               <dependencies>
+                       <dependency>
+                               <groupId>com.opencsv</groupId>
+                               <artifactId>opencsv</artifactId>
+                               <version>3.7</version>
+                       </dependency>
+                       <dependency>
+                               <groupId>com.healthmarketscience.jackcess</groupId>
+                               <artifactId>jackcess</artifactId>
+                               <version>2.1.3</version>
+                               <exclusions>
+                                       <exclusion>
+                                               <artifactId>commons-logging</artifactId>
+                                               <groupId>commons-logging</groupId>
+                                       </exclusion>
+                               </exclusions>
+                       </dependency>
+                       <dependency>
+                               <groupId>net.sf.jopt-simple</groupId>
+                               <artifactId>jopt-simple</artifactId>
+                               <version>4.9</version>
+                       </dependency>
+                       <dependency>
+                               <groupId>junit</groupId>
+                               <artifactId>junit</artifactId>
+                               <version>${junit.version}</version>
+                               <scope>test</scope>
+                               <exclusions>
+                                       <exclusion>
+                                               <artifactId>commons-logging</artifactId>
+                                               <groupId>commons-logging</groupId>
+                                       </exclusion>
+                               </exclusions>
+                       </dependency>
+                       <dependency>
+                               <groupId>org.slf4j</groupId>
+                               <artifactId>slf4j-api</artifactId>
+                               <version>${slf4j.version}</version>
+                       </dependency>
+                       <dependency>
+                               <groupId>org.slf4j</groupId>
+                               <artifactId>jcl-over-slf4j</artifactId>
+                               <version>${slf4j.version}</version>
+                               <scope>runtime</scope>
+                       </dependency>
+                       <dependency>
+                               <groupId>org.slf4j</groupId>
+                               <artifactId>slf4j-simple</artifactId>
+                               <version>${slf4j.version}</version>
+                               <scope>runtime</scope>
+                       </dependency>
+                       <dependency>
+                               <groupId>commons-lang</groupId>
+                               <artifactId>commons-lang</artifactId>
+                               <version>2.6</version>
+                       </dependency>
+                       <dependency>
+                               <groupId>org.apache.commons</groupId>
+                               <artifactId>commons-lang3</artifactId>
+                               <version>3.4</version>
+                       </dependency>
+               </dependencies>
+       </dependencyManagement>
+
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.codehaus.mojo</groupId>
+                               <artifactId>appassembler-maven-plugin</artifactId>
+                               <executions>
+                                       <execution>
+                                               <phase>package</phase>
+                                               <goals>
+                                                       <goal>assemble</goal>
+                                               </goals>
+                                       </execution>
+                               </executions>
+                               <configuration>
+                                       <programs>
+                                               <program>
+                                                       <mainClass>access2csv.Driver</mainClass>
+                                                       <id>access2csv</id>
+                                               </program>
+                                       </programs>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.jacoco</groupId>
+                               <artifactId>jacoco-maven-plugin</artifactId>
+                               <executions>
+                                       <execution>
+                                               <id>prepare-agent</id>
+                                               <goals>
+                                                       <goal>prepare-agent</goal>
+                                               </goals>
+                                       </execution>
+                               </executions>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-assembly-plugin</artifactId>
+                               <executions>
+                                       <execution>
+                                               <id>make-assembly</id>
+                                               <phase>package</phase>
+                                               <goals>
+                                                       <goal>single</goal>
+                                               </goals>
+                                       </execution>
+                               </executions>
+                       </plugin>
+               </plugins>
+
+               <pluginManagement>
+                       <plugins>
+                               <plugin>
+                                       <groupId>org.apache.maven.plugins</groupId>
+                                       <artifactId>maven-assembly-plugin</artifactId>
+                                       <version>2.6</version>
+                                       <configuration>
+                                               <descriptorRefs>
+                                                       <descriptorRef>bin</descriptorRef>
+                                                       <descriptorRef>jar-with-dependencies</descriptorRef>
+                                               </descriptorRefs>
+                                       </configuration>
+                               </plugin>
+                               <plugin>
+                                       <groupId>org.apache.maven.plugins</groupId>
+                                       <artifactId>maven-compiler-plugin</artifactId>
+                                       <version>3.5.1</version>
+                                       <configuration>
+                                               <source>1.6</source>
+                                               <target>1.6</target>
+                                       </configuration>
+                               </plugin>
+                               <plugin>
+                                       <groupId>org.apache.maven.plugins</groupId>
+                                       <artifactId>maven-javadoc-plugin</artifactId>
+                                       <version>2.10.3</version>
+                               </plugin>
+                               <plugin>
+                                       <groupId>org.apache.maven.plugins</groupId>
+                                       <artifactId>maven-deploy-plugin</artifactId>
+                                       <version>2.8.2</version>
+                               </plugin>
+                               <plugin>
+                                       <groupId>org.apache.maven.plugins</groupId>
+                                       <artifactId>maven-resources-plugin</artifactId>
+                                       <version>2.7</version>
+                               </plugin>
+                               <plugin>
+                                       <groupId>org.apache.maven.plugins</groupId>
+                                       <artifactId>maven-install-plugin</artifactId>
+                                       <version>2.5.2</version>
+                               </plugin>
+                               <plugin>
+                                       <groupId>org.apache.maven.plugins</groupId>
+                                       <artifactId>maven-clean-plugin</artifactId>
+                                       <version>3.0.0</version>
+                               </plugin>
+                               <plugin>
+                                       <groupId>org.apache.maven.plugins</groupId>
+                                       <artifactId>maven-gpg-plugin</artifactId>
+                                       <version>1.6</version>
+                               </plugin>
+                               <plugin>
+                                       <groupId>org.apache.maven.plugins</groupId>
+                                       <artifactId>maven-jar-plugin</artifactId>
+                                       <version>2.6</version>
+                                       <executions>
+                                               <execution>
+                                                       <goals>
+                                                               <goal>test-jar</goal>
+                                                       </goals>
+                                               </execution>
+                                       </executions>
+                               </plugin>
+                               <plugin>
+                                       <groupId>org.apache.maven.plugins</groupId>
+                                       <artifactId>maven-source-plugin</artifactId>
+                                       <version>2.4</version>
+                                       <executions>
+                                               <execution>
+                                                       <id>attach-source</id>
+                                                       <goals>
+                                                               <goal>jar</goal>
+                                                       </goals>
+                                               </execution>
+                                               <execution>
+                                                       <id>attach-test-sources</id>
+                                                       <goals>
+                                                               <goal>test-jar-no-fork</goal>
+                                                       </goals>
+                                               </execution>
+                                       </executions>
+                               </plugin>
+                               <plugin>
+                                       <groupId>org.apache.maven.plugins</groupId>
+                                       <artifactId>maven-surefire-plugin</artifactId>
+                                       <version>2.19.1</version>
+                               </plugin>
+                               <plugin>
+                                       <groupId>org.codehaus.mojo</groupId>
+                                       <artifactId>appassembler-maven-plugin</artifactId>
+                                       <version>1.10</version>
+                               </plugin>
+                               <!-- Create code coverage reports and submit them to coveralls.io. -->
+                               <plugin>
+                                       <groupId>org.eluder.coveralls</groupId>
+                                       <artifactId>coveralls-maven-plugin</artifactId>
+                                       <version>3.0.1</version>
+                               </plugin>
+                               <plugin>
+                                       <groupId>org.jacoco</groupId>
+                                       <artifactId>jacoco-maven-plugin</artifactId>
+                                       <version>0.7.4.201502262128</version>
+                               </plugin>
+                               <!--This plugin's configuration is used to store Eclipse m2e settings 
+                                       only. It has no influence on the Maven build itself. -->
+                               <plugin>
+                                       <groupId>org.eclipse.m2e</groupId>
+                                       <artifactId>lifecycle-mapping</artifactId>
+                                       <version>1.0.0</version>
+                                       <configuration>
+                                               <lifecycleMappingMetadata>
+                                                       <pluginExecutions>
+                                                               <pluginExecution>
+                                                                       <pluginExecutionFilter>
+                                                                               <groupId>org.jacoco</groupId>
+                                                                               <artifactId>
+                                                                                       jacoco-maven-plugin
+                                                                               </artifactId>
+                                                                               <versionRange>
+                                                                                       [0.7.2.201409121644,)
+                                                                               </versionRange>
+                                                                               <goals>
+                                                                                       <goal>prepare-agent</goal>
+                                                                               </goals>
+                                                                       </pluginExecutionFilter>
+                                                                       <action>
+                                                                               <ignore></ignore>
+                                                                       </action>
+                                                               </pluginExecution>
+                                                       </pluginExecutions>
+                                               </lifecycleMappingMetadata>
+                                       </configuration>
+                               </plugin>
+                       </plugins>
+               </pluginManagement>
+       </build>
+
+       <repositories>
+               <repository>
+                       <id>sonatype-nexus-snapshots</id>
+                       <name>Sonatype Nexus Snapshots</name>
+                       <url>https://oss.sonatype.org/content/repositories/snapshots</url>
+                       <releases>
+                               <enabled>false</enabled>
+                       </releases>
+                       <snapshots>
+                               <enabled>true</enabled>
+                       </snapshots>
+               </repository>
+       </repositories>
+
+
+       <distributionManagement>
+               <snapshotRepository>
+                       <id>sonatype-nexus-snapshots</id>
+                       <name>Sonatype Nexus Snapshots</name>
+                       <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
+               </snapshotRepository>
+               <repository>
+                       <id>sonatype-nexus-staging</id>
+                       <name>Nexus Release Repository</name>
+                       <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
+               </repository>
+       </distributionManagement>
+
+       <profiles>
+               <profile>
+                       <id>sonatype-oss-release</id>
+                       <build>
+                               <plugins>
+                                       <plugin>
+                                               <groupId>org.apache.maven.plugins</groupId>
+                                               <artifactId>maven-source-plugin</artifactId>
+                                               <executions>
+                                                       <execution>
+                                                               <id>attach-sources</id>
+                                                               <goals>
+                                                                       <goal>jar-no-fork</goal>
+                                                               </goals>
+                                                       </execution>
+                                               </executions>
+                                       </plugin>
+                                       <plugin>
+                                               <groupId>org.apache.maven.plugins</groupId>
+                                               <artifactId>maven-javadoc-plugin</artifactId>
+                                               <executions>
+                                                       <execution>
+                                                               <id>attach-javadocs</id>
+                                                               <goals>
+                                                                       <goal>jar</goal>
+                                                               </goals>
+                                                       </execution>
+                                               </executions>
+                                       </plugin>
+                                       <plugin>
+                                               <groupId>org.apache.maven.plugins</groupId>
+                                               <artifactId>maven-gpg-plugin</artifactId>
+                                               <executions>
+                                                       <execution>
+                                                               <id>sign-artifacts</id>
+                                                               <phase>verify</phase>
+                                                               <goals>
+                                                                       <goal>sign</goal>
+                                                               </goals>
+                                                       </execution>
+                                               </executions>
+                                       </plugin>
+                               </plugins>
+                       </build>
+               </profile>
+       </profiles>
+</project>
+
diff --git a/usda/data/access2csv/src/access2csv/Driver.java b/usda/data/access2csv/src/access2csv/Driver.java
new file mode 100644 (file)
index 0000000..65f32d6
--- /dev/null
@@ -0,0 +1,189 @@
+package access2csv;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.Writer;
+import java.util.Arrays;
+import java.util.ArrayList;
+import java.util.List;
+
+import com.opencsv.CSVWriter;
+
+import com.healthmarketscience.jackcess.*;
+
+public class Driver {
+
+       static int export(Database db, String tableName, Writer csv, boolean withHeader) throws IOException{
+               Table table = db.getTable(tableName);
+               String[] buffer = new String[table.getColumnCount()];
+               CSVWriter writer = new CSVWriter(new BufferedWriter(csv));
+               int rows = 0;
+               try{
+                       if (withHeader) {
+                               int x = 0;
+                               for(Column col : table.getColumns()){
+                                       buffer[x++] = col.getName();
+                               }
+                               writer.writeNext(buffer);
+                       }
+
+                       for(Row row : table){
+                               int i = 0;
+                               for (Object object : row.values()) {
+                                       buffer[i++] = object == null ? null : object.toString();
+                               }
+                               writer.writeNext(buffer);
+                               rows++;
+                       }
+               }finally{
+                       writer.close();
+               }
+               return rows;
+       }
+       
+       static Database openDatabase( String filename, String db_passwd ) throws IOException{
+               if( db_passwd.equals("")) {
+                       Database db = DatabaseBuilder.open(new File(filename));
+                       return( db ) ;
+               } else {
+                       Database db = new DatabaseBuilder(new File(filename))
+                               .setCodecProvider(new CryptCodecProvider(db_passwd))
+                               .open();
+                       return( db ) ;
+               }
+       }
+
+       static void export(String filename, String tableName, boolean withHeader, String db_passwd) throws IOException{
+               Database db = openDatabase( filename, db_passwd ) ;
+               
+               try{
+                       export(db, tableName, new PrintWriter(System.out), withHeader);
+               }finally{
+                       db.close();
+               }
+       }
+
+       static void schema(String filename, String db_passwd) throws IOException{
+               Database db = openDatabase( filename, db_passwd ) ;
+
+               try{
+                       for(String tableName : db.getTableNames()){
+                               Table table = db.getTable(tableName);
+                               System.out.println(String.format("CREATE TABLE %s (", tableName));
+                               for(Column col : table.getColumns()){
+                                       System.out.println(String.format("  %s %s,", 
+                                                       col.getName(), col.getType()));
+                               }
+                               System.out.println(")");
+                       }
+               }finally{
+                       db.close();
+               }
+
+       }
+
+       static void exportAll(String filename, boolean withHeader, String db_passwd) throws IOException{
+               Database db = openDatabase( filename, db_passwd ) ;
+
+               try{
+                       for(String tableName : db.getTableNames()){
+                               String csvName = tableName + ".csv";
+                               Writer csv = new FileWriter(csvName);
+                               try{
+                                       System.out.println(String.format("Exporting '%s' to %s/%s",
+                                                       tableName, System.getProperty("user.dir"), csvName));
+                                       int rows = export(db, tableName, csv, withHeader);
+                                       System.out.println(String.format("%d rows exported", rows));
+                               }finally{
+                                       try{
+                                               csv.flush();
+                                               csv.close();
+                                       }catch(IOException ex){}
+                               }
+                       }
+               }finally{
+                       db.close();
+               }
+
+       }
+
+       static void printUsage(){
+               System.out.println("Usage:");
+               System.out.println(" java -jar access2csv.jar [ACCESS FILE] [OPTIONS]");
+               System.out.println("");
+               System.out.println("Options:");
+               System.out.println("");
+               System.out.println(" * if no options are provided, all tables will be exported to CSV files,");
+               System.out.println("   one file per table. Output file paths will be printed to stdout");
+               System.out.println(" * '--password password' - tries to open an encrypted database with the specified password");
+               System.out.println(" * '--schema' - prints the database schema");
+               System.out.println(" * '--with-header' - export the header with the field names");
+               System.out.println(" * [TABLENAME] - prints the given table as CSV to stdout");
+       }
+
+       /**
+        * @param args
+        * @throws IOException 
+        */
+       public static void main(String[] cmdLineArgs) throws IOException {
+               List<String> helpCommands = Arrays.asList(new String[]{"-h", "--help", "-H", "/?"});
+               List<String> passwdCommands = Arrays.asList(new String[]{"-p", "--password", "--passwd"});
+               
+               // Make a copy of the command line args and then
+               // process them to remove and record any passwords
+               // and note any --with-header options
+               String password = "" ;
+               boolean includeHeaders = false ; // the default
+               List<String> argList = new ArrayList<>() ;
+               for( int j=0 ; j < cmdLineArgs.length ; j++ ) {
+                       if( passwdCommands.contains(cmdLineArgs[j]) ) {
+                               if( ++j < cmdLineArgs.length ) {
+                                       password = cmdLineArgs[j] ;
+                               } else {
+                                       printUsage();
+                                       System.exit(0);
+                               }
+                       } 
+                       else if( cmdLineArgs[j].equals("--with-header") ) {
+                               includeHeaders = true ;
+                       }
+                       else {
+                               // Save the arg to handle later
+                               argList.add( cmdLineArgs[j] ) ;
+                       }
+               }
+                               
+               // Copy argList into an array so that the block below will work
+               String[] args = argList.toArray(new String[argList.size()]) ;
+               
+               // Handle remaining args
+               if( args.length == 1 ) {
+                       if( helpCommands.contains(args[0]) ){
+                               printUsage();
+                       }
+                       else {
+                               exportAll(args[0], includeHeaders, password);
+                       }
+                       
+                       System.exit(0);
+               }
+               else if( args.length == 2 ) {
+                       if( args[1].equals("--schema") ){
+                               schema(args[0], password) ;
+                       }
+                       else {
+                               export(args[0], args[1], includeHeaders, password);
+                       }
+                       
+                       System.exit(0) ;
+               }
+               else {
+                       System.err.println("Invalid arguments.");
+                       printUsage();
+                       System.exit(1);
+               }
+       }
+}
diff --git a/usda/data/access2csv/src/main/java/access2csv/Driver.java b/usda/data/access2csv/src/main/java/access2csv/Driver.java
new file mode 100644 (file)
index 0000000..8b5dbd2
--- /dev/null
@@ -0,0 +1,174 @@
+package access2csv;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.Writer;
+import java.util.Arrays;
+import java.util.List;
+
+import com.opencsv.CSVWriter;
+
+import joptsimple.OptionException;
+import joptsimple.OptionParser;
+import joptsimple.OptionSet;
+import joptsimple.OptionSpec;
+
+import com.healthmarketscience.jackcess.*;
+
+public class Driver {
+
+  
+       static int export(Database db, String tableName, Writer csv, boolean withHeader, boolean applyQuotesToAll, String nullText) throws IOException{
+               Table table = db.getTable(tableName);
+               String[] buffer = new String[table.getColumnCount()];
+               CSVWriter writer = new CSVWriter(new BufferedWriter(csv), CSVWriter.DEFAULT_SEPARATOR, CSVWriter.DEFAULT_QUOTE_CHARACTER);
+               int rows = 0;
+               try{
+                       if (withHeader) {
+                               int x = 0;
+                               for(Column col : table.getColumns()){
+                                       buffer[x++] = col.getName();
+                               }
+                               writer.writeNext(buffer, applyQuotesToAll);
+                       }
+            
+                       for(Row row : table){
+                               int i = 0;
+                               for (Object object : row.values()) {
+                                       buffer[i++] = object == null ? nullText : object.toString();
+                               }
+                               writer.writeNext(buffer, applyQuotesToAll);
+                               rows++;
+                       }
+               }finally{
+                       writer.close();
+               }
+               return rows;
+       }
+
+       static void export(File inputFile, String tableName, boolean withHeader, File outputDir, String csvPrefix, boolean applyQuotesToAll, String nullText) throws IOException{
+               Database db = DatabaseBuilder.open(inputFile);
+               try{
+                       export(db, tableName, new FileWriter(new File(outputDir, csvPrefix + tableName + ".csv")), withHeader, applyQuotesToAll, nullText);
+               }finally{
+                       db.close();
+               }
+       }
+
+       static void schema(File inputFile) throws IOException{
+
+               Database db = DatabaseBuilder.open(inputFile);
+               try{
+                       for(String tableName : db.getTableNames()){
+                               Table table = db.getTable(tableName);
+                               System.out.println(String.format("CREATE TABLE %s (", tableName));
+                               for(Column col : table.getColumns()){
+                                       System.out.println(String.format("  %s %s,", 
+                                                       col.getName(), col.getType()));
+                               }
+                               System.out.println(")");
+                       }
+               }finally{
+                       db.close();
+               }
+
+       }
+
+       static void exportAll(File inputFile, boolean withHeader, File outputDir, String csvPrefix, boolean applyQuotesToAll, String nullText) throws IOException{
+               Database db = DatabaseBuilder.open(inputFile);
+               try{
+                       for(String tableName : db.getTableNames()){
+                               String csvName = csvPrefix + tableName + ".csv";
+                               File outputFile = new File(outputDir, csvName);
+                               Writer csv = new FileWriter(outputFile);
+                               try{
+                                       System.out.println(String.format("Exporting '%s' to %s",
+                                                       tableName, outputFile.toString()));
+                                       int rows = export(db, tableName, csv, withHeader, applyQuotesToAll, nullText);
+                                       System.out.println(String.format("%d rows exported", rows));
+                               }finally{
+                                       try{
+                                               csv.flush();
+                                               csv.close();
+                                       }catch(IOException ex){}
+                               }
+                       }
+               }finally{
+                       db.close();
+               }
+
+       }
+
+       public static void main(String[] args) throws Exception {
+               final OptionParser parser = new OptionParser();
+
+               final OptionSpec<Void> help = parser.acceptsAll(Arrays.asList("help")).forHelp();
+               final OptionSpec<String> schema = parser.accepts("schema").withOptionalArg()
+                               .describedAs("The schema is written to standard output.");
+               final OptionSpec<String> withHeader = parser.accepts("with-header").withOptionalArg()
+                               .describedAs("When with-header is included, a header line of column names is written to each data file.");
+               final OptionSpec<File> input = parser.accepts("input").withRequiredArg().ofType(File.class).required()
+                               .describedAs("The input accdb file.");
+               final OptionSpec<String> table = parser.accepts("table").withRequiredArg().ofType(String.class).describedAs("The table name to export, or all if it is not specified.");
+               final OptionSpec<File> output = parser.accepts("output").requiredUnless("schema").withRequiredArg().ofType(File.class)
+                               .describedAs("The output directory for data files. This is required for writing data output. This not required for schema output.");
+               final OptionSpec<String> csvPrefix = parser.accepts("csv-prefix").withRequiredArg().ofType(String.class).defaultsTo("").describedAs("A prefix to add to all of the generated CSV file names");    
+               final OptionSpec<Boolean> quoteAll = parser.accepts("quote-all").withOptionalArg().ofType(Boolean.class).defaultsTo(true)
+                               .describedAs("Set quote-all to true if all values are to be quoted. " +
+                               "Set to false if quotes are only to be applied to values which contain " + 
+                               "the separator, secape, quote, or new line characters. The default is true.");
+               final OptionSpec<String> writeNull = parser.accepts("write-null").withOptionalArg().ofType(String.class).defaultsTo("")
+                               .describedAs("The text to write when entry is NULL. Defaults to empty output if not specified or if no argument supplied. " +
+                               "If quote-all is set to true then the value for write-null is also quoted.");
+   
+    
+               OptionSet options = null;
+
+               try {
+                       options = parser.parse(args);
+               } catch (final OptionException e) {
+                       System.out.println(e.getMessage());
+                       parser.printHelpOn(System.out);
+                       throw e;
+               }
+
+               if (options.has(help)) {
+                       parser.printHelpOn(System.out);
+                       return;
+               }
+      
+               File inputFile = input.value(options);
+               if(!inputFile.exists()) {
+                       throw new FileNotFoundException("Could not find input file: " + inputFile.toString());
+               }
+               
+               File outputDir = null;
+               if (options.has(output)) {
+                       outputDir = output.value(options);
+                       if(!outputDir.exists()) {
+                               outputDir.mkdirs();
+                       }       
+               }
+               
+               boolean applyQuotesToAll = quoteAll.value(options);    
+    String nullText = writeNull.value(options);
+    
+               if (options.has(schema)) {
+                       schema(inputFile);
+               }
+               
+               if (null != outputDir) {
+                       if (options.has(table)){
+                               export(inputFile, table.value(options), options.has(withHeader), outputDir, csvPrefix.value(options), applyQuotesToAll, nullText);
+                       }
+                       else {
+                               exportAll(inputFile, options.has(withHeader), outputDir, csvPrefix.value(options), applyQuotesToAll, nullText);
+                       }       
+               }
+       }
+
+}
diff --git a/usda/data/access2csv/src/test/java/access2csv/DriverTest.java b/usda/data/access2csv/src/test/java/access2csv/DriverTest.java
new file mode 100644 (file)
index 0000000..a6c7d3f
--- /dev/null
@@ -0,0 +1,103 @@
+/**
+ * 
+ */
+package access2csv;
+
+import static org.junit.Assert.*;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.junit.rules.TemporaryFolder;
+
+/**
+ * Tests for {@link Driver}.
+ * 
+ * @author Peter Ansell p_ansell@yahoo.com
+ */
+public class DriverTest {
+
+       @Rule
+       public ExpectedException thrown = ExpectedException.none();
+
+       @Rule
+       public TemporaryFolder tempDir = new TemporaryFolder();
+
+       private File testDir;
+       
+       @Before
+       public void setUp() throws Exception {
+               testDir = tempDir.newFolder();
+               // TODO: Copy test file into testDir. Note, it will be deleted automatically by TemporaryFolder after each test method
+       }
+
+       /**
+        * Test method for {@link access2csv.Driver#export(com.healthmarketscience.jackcess.Database, java.lang.String, java.io.Writer, boolean)}.
+        */
+       @Ignore("TODO: Crerate sample file")
+       @Test
+       public final void testExportDatabaseStringWriterBoolean() throws Exception {
+               fail("Not yet implemented"); // TODO
+       }
+
+       /**
+        * Test method for {@link access2csv.Driver#export(java.lang.String, java.lang.String)}.
+        */
+       @Ignore("TODO: Crerate sample file")
+       @Test
+       public final void testExportStringString() throws Exception {
+               fail("Not yet implemented"); // TODO
+       }
+
+       /**
+        * Test method for {@link access2csv.Driver#schema(java.lang.String)}.
+        */
+       @Ignore("TODO: Crerate sample file")
+       @Test
+       public final void testSchema() throws Exception {
+               fail("Not yet implemented"); // TODO
+       }
+
+       /**
+        * Test method for {@link access2csv.Driver#exportAll(java.lang.String, boolean)}.
+        */
+       @Ignore("TODO: Crerate sample file")
+       @Test
+       public final void testExportAll() throws Exception {
+               fail("Not yet implemented"); // TODO
+       }
+
+       /**
+        * Test method for {@link access2csv.Driver#main(java.lang.String[])}.
+        */
+       @Test
+       public final void testMainHelp() throws Exception {
+               Driver.main(new String[] { "--help" });
+               Driver.main(new String[] { "-h" });
+       }
+
+       /**
+        * Test method for {@link access2csv.Driver#main(java.lang.String[])}.
+        */
+       @Test
+       public final void testMainSchemaMissingDatabase() throws Exception {
+               thrown.expect(FileNotFoundException.class);
+               Driver.main(new String[] { "--input", "does-not-exist.accdb", "--schema" , "--output", new File(testDir, "dir-does-not-exist").toString()});
+       }
+
+       /**
+        * Test method for {@link access2csv.Driver#main(java.lang.String[])}.
+        */
+       @Test
+       public final void testHeaderMissingDatabase() throws Exception {
+               thrown.expect(FileNotFoundException.class);
+               Driver.main(new String[] { "--input", "does-not-exist.accdb", "--with-header" , "--output", new File(testDir, "dir-does-not-exist").toString()});
+       }
+
+}
similarity index 100%
rename from data/dep-graph.yml
rename to usda/data/dep-graph.yml
similarity index 100%
rename from data/process.py
rename to usda/data/process.py
similarity index 100%
rename from data/setup.sh
rename to usda/data/setup.sh
similarity index 100%
rename from sql/format-sql.sh
rename to usda/format-sql.sh
similarity index 54%
rename from sql/import.sql
rename to usda/import.sql
index 8716ce4a8fbd886f873816739a2bf846408c8d85..e6e74d6cd0cb30cdea36868ed49cf1bc2e394d6d 100644 (file)
 
 .import '| tail -n +2 version.csv' version
 
-.import '| tail -n +2 ../data/nt/nutr_def.csv' nutr_def
-.import '| tail -n +2 ../data/nt/fdgrp.csv' fdgrp
-.import '| tail -n +2 ../data/nt/food_des.csv' food_des
+.import '| tail -n +2 ./data/nt/nutr_def.csv' nutr_def
+.import '| tail -n +2 ./data/nt/fdgrp.csv' fdgrp
+.import '| tail -n +2 ./data/nt/food_des.csv' food_des
 
 
-.import '| tail -n +2 ../data/nt/src_cd.csv' src_cd
-.import '| tail -n +2 ../data/nt/deriv_cd.csv' deriv_cd
-.import '| tail -n +2 ../data/nt/nut_data.csv' nut_data
+.import '| tail -n +2 ./data/nt/src_cd.csv' src_cd
+.import '| tail -n +2 ./data/nt/deriv_cd.csv' deriv_cd
+.import '| tail -n +2 ./data/nt/nut_data.csv' nut_data
 
 
-.import '| tail -n +2 ../data/nt/lang_desc.csv' lang_desc
-.import '| tail -n +2 ../data/nt/langual.csv' langual
+.import '| tail -n +2 ./data/nt/lang_desc.csv' lang_desc
+.import '| tail -n +2 ./data/nt/langual.csv' langual
 
-.import '| tail -n +2 ../data/nt/data_src.csv' data_src
-.import '| tail -n +2 ../data/nt/datsrcln.csv' datsrcln
+.import '| tail -n +2 ./data/nt/data_src.csv' data_src
+.import '| tail -n +2 ./data/nt/datsrcln.csv' datsrcln
 
-.import '| tail -n +2 ../data/nt/serv_desc.csv' serv_desc
-.import '| tail -n +2 ../data/nt/serving.csv' serving
+.import '| tail -n +2 ./data/nt/serv_desc.csv' serv_desc
+.import '| tail -n +2 ./data/nt/serving.csv' serving
 
-.import '| tail -n +2 ../data/nt/footnote.csv' footnote
+.import '| tail -n +2 ./data/nt/footnote.csv' footnote
 
 .header on
 .mode column
similarity index 100%
rename from sql/init.sql
rename to usda/init.sql
similarity index 100%
rename from sql/tables.sql
rename to usda/tables.sql