├── Explorer.ipynb ├── Explorer2.ipynb ├── FDC_API_Test.ipynb ├── LICENSE ├── README.md ├── SR_Food_Lookup.ipynb ├── convert_sr.py ├── daily_intake.csv ├── example.txt ├── fnb_dri_elements.csv ├── fnb_dri_macro.csv ├── fnb_dri_vitamins.csv ├── fnb_ul_elements.csv ├── fnb_ul_vitamins.csv ├── fndds_nutrients.csv ├── foods.csv ├── my_intake_requirements.csv ├── program.py ├── run.sh ├── test_log.csv ├── test_nutrient_profiles.csv └── to.do /Explorer.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 1, 6 | "id": "47c000f9", 7 | "metadata": {}, 8 | "outputs": [], 9 | "source": [ 10 | "import program\n", 11 | "import pulp as pl" 12 | ] 13 | }, 14 | { 15 | "cell_type": "code", 16 | "execution_count": 2, 17 | "id": "6e4fdeae", 18 | "metadata": {}, 19 | "outputs": [], 20 | "source": [ 21 | "problem = program.test()\n", 22 | "problem.solve()" 23 | ] 24 | }, 25 | { 26 | "cell_type": "code", 27 | "execution_count": 3, 28 | "id": "ca58c344", 29 | "metadata": {}, 30 | "outputs": [ 31 | { 32 | "data": { 33 | "text/html": [ 34 | "
\n", 35 | "\n", 48 | "\n", 49 | " \n", 50 | " \n", 51 | " \n", 52 | " \n", 53 | " \n", 54 | " \n", 55 | " \n", 56 | " \n", 57 | " \n", 58 | " \n", 59 | " \n", 60 | " \n", 61 | " \n", 62 | " \n", 63 | " \n", 64 | " \n", 65 | " \n", 66 | " \n", 67 | " \n", 68 | " \n", 69 | " \n", 70 | " \n", 71 | " \n", 72 | " \n", 73 | " \n", 74 | " \n", 75 | " \n", 76 | " \n", 77 | " \n", 78 | " \n", 79 | " \n", 80 | " \n", 81 | " \n", 82 | " \n", 83 | " \n", 84 | " \n", 85 | "
amount
name
Broccoli (Cooked)0.518573
Cooked Celery13.191981
Cooked Tomatoes21.014955
Cucumber6.096698
Dry Roasted Pistachio Nuts2.421314
White Button Mushrooms4.076494
\n", 86 | "
" 87 | ], 88 | "text/plain": [ 89 | " amount\n", 90 | "name \n", 91 | "Broccoli (Cooked) 0.518573\n", 92 | "Cooked Celery 13.191981\n", 93 | "Cooked Tomatoes 21.014955\n", 94 | "Cucumber 6.096698\n", 95 | "Dry Roasted Pistachio Nuts 2.421314\n", 96 | "White Button Mushrooms 4.076494" 97 | ] 98 | }, 99 | "execution_count": 3, 100 | "metadata": {}, 101 | "output_type": "execute_result" 102 | } 103 | ], 104 | "source": [ 105 | "problem.recipe" 106 | ] 107 | }, 108 | { 109 | "cell_type": "code", 110 | "execution_count": 4, 111 | "id": "d81552d7", 112 | "metadata": {}, 113 | "outputs": [ 114 | { 115 | "data": { 116 | "text/html": [ 117 | "
\n", 118 | "\n", 131 | "\n", 132 | " \n", 133 | " \n", 134 | " \n", 135 | " \n", 136 | " \n", 137 | " \n", 138 | " \n", 139 | " \n", 140 | " \n", 141 | " \n", 142 | " \n", 143 | " \n", 144 | " \n", 145 | " \n", 146 | " \n", 147 | " \n", 148 | " \n", 149 | " \n", 150 | " \n", 151 | " \n", 152 | " \n", 153 | " \n", 154 | " \n", 155 | " \n", 156 | " \n", 157 | " \n", 158 | " \n", 159 | " \n", 160 | " \n", 161 | " \n", 162 | " \n", 163 | " \n", 164 | " \n", 165 | " \n", 166 | " \n", 167 | " \n", 168 | " \n", 169 | " \n", 170 | " \n", 171 | " \n", 172 | " \n", 173 | " \n", 174 | " \n", 175 | " \n", 176 | " \n", 177 | " \n", 178 | " \n", 179 | " \n", 180 | " \n", 181 | " \n", 182 | " \n", 183 | " \n", 184 | " \n", 185 | " \n", 186 | " \n", 187 | " \n", 188 | " \n", 189 | " \n", 190 | " \n", 191 | " \n", 192 | " \n", 193 | " \n", 194 | " \n", 195 | " \n", 196 | " \n", 197 | " \n", 198 | " \n", 199 | " \n", 200 | " \n", 201 | " \n", 202 | " \n", 203 | " \n", 204 | " \n", 205 | " \n", 206 | " \n", 207 | " \n", 208 | " \n", 209 | " \n", 210 | " \n", 211 | " \n", 212 | " \n", 213 | " \n", 214 | " \n", 215 | " \n", 216 | " \n", 217 | " \n", 218 | " \n", 219 | " \n", 220 | " \n", 221 | " \n", 222 | " \n", 223 | " \n", 224 | " \n", 225 | " \n", 226 | " \n", 227 | " \n", 228 | " \n", 229 | " \n", 230 | " \n", 231 | " \n", 232 | " \n", 233 | " \n", 234 | " \n", 235 | " \n", 236 | " \n", 237 | " \n", 238 | " \n", 239 | " \n", 240 | " \n", 241 | " \n", 242 | " \n", 243 | " \n", 244 | " \n", 245 | " \n", 246 | " \n", 247 | " \n", 248 | " \n", 249 | " \n", 250 | " \n", 251 | " \n", 252 | " \n", 253 | " \n", 254 | " \n", 255 | " \n", 256 | " \n", 257 | " \n", 258 | " \n", 259 | " \n", 260 | " \n", 261 | " \n", 262 | " \n", 263 | " \n", 264 | " \n", 265 | " \n", 266 | " \n", 267 | " \n", 268 | " \n", 269 | " \n", 270 | " \n", 271 | " \n", 272 | " \n", 273 | " \n", 274 | " \n", 275 | " \n", 276 | " \n", 277 | " \n", 278 | " \n", 279 | " \n", 280 | " \n", 281 | " \n", 282 | " \n", 283 | " \n", 284 | " \n", 285 | " \n", 286 | " \n", 287 | " \n", 288 | " \n", 289 | " \n", 290 | " \n", 291 | " \n", 292 | " \n", 293 | " \n", 294 | " \n", 295 | " \n", 296 | " \n", 297 | " \n", 298 | " \n", 299 | " \n", 300 | " \n", 301 | " \n", 302 | " \n", 303 | " \n", 304 | " \n", 305 | " \n", 306 | " \n", 307 | " \n", 308 | " \n", 309 | " \n", 310 | " \n", 311 | " \n", 312 | " \n", 313 | " \n", 314 | " \n", 315 | " \n", 316 | " \n", 317 | " \n", 318 | " \n", 319 | " \n", 320 | " \n", 321 | " \n", 322 | " \n", 323 | " \n", 324 | " \n", 325 | " \n", 326 | " \n", 327 | " \n", 328 | " \n", 329 | " \n", 330 | " \n", 331 | " \n", 332 | " \n", 333 | " \n", 334 | " \n", 335 | " \n", 336 | " \n", 337 | " \n", 338 | " \n", 339 | " \n", 340 | " \n", 341 | " \n", 342 | " \n", 343 | " \n", 344 | " \n", 345 | " \n", 346 | " \n", 347 | " \n", 348 | " \n", 349 | " \n", 350 | " \n", 351 | " \n", 352 | "
minmaxintake
name
calcium_mg1000.02500.0{Almonds: 269.0, Almonds_Unsalted: 260.0, Appl...
calories_kcal1800.02200.0{Almonds: 579.0, Almonds_Unsalted: 607.0, Appl...
choline_mg550.03500.0{Almonds: 52.1, Almonds_Unsalted: 50.5, Apples...
copper_mg0.910.0{Almonds: 1.031, Almonds_Unsalted: 1.065999999...
fiber_g38.0NaN{Almonds: 12.5, Almonds_Unsalted: 10.6, Apples...
fluoride_mcg4.010.0{Apples: 3.3, Bananas: 2.2, Broccoli_(Cooked):...
folate_mcg400.01000.0{Almonds: 44.0, Almonds_Unsalted: 53.0, Apples...
histidine_mg_kg14.0NaN{Almonds: 539.0, Apples: 5.0, Baked_Potato_(No...
iron_mg8.045.0{Almonds: 3.71, Almonds_Unsalted: 3.62, Apples...
isoleucine_mg_kg19.0NaN{Almonds: 751.0, Apples: 6.0, Baked_Potato_(No...
leucine_mg_kg42.0NaN{Almonds: 1473.0, Apples: 13.0, Baked_Potato_(...
lysine_mg_kg38.0NaN{Almonds: 568.0, Apples: 12.0, Baked_Potato_(N...
magnesium_mg400.0NaN{Almonds: 270.0, Almonds_Unsalted: 271.0, Appl...
manganese_mg2.311.0{Almonds: 2.1790000000000003, Apples: 0.035, B...
methionine_and_cysteine_mg_kg19.0NaN{Almonds: 372.0, Apples: 2.0, Baked_Potato_(No...
niacin_mg16.035.0{Almonds: 3.618, Almonds_Unsalted: 3.528, Appl...
pantothenic_acid_mg5.0NaN{Almonds: 0.471, Apples: 0.061, Baked_Potato_(...
phenylalanine_and_tyrosine_mg_kg33.0NaN{Almonds: 1582.0, Apples: 7.0, Baked_Potato_(N...
phosphorus_mg700.04000.0{Almonds: 481.0, Almonds_Unsalted: 457.0, Appl...
potassium_mg3400.0NaN{Almonds: 733.0, Almonds_Unsalted: 692.0, Appl...
protein_g_kg0.8NaN{Almonds: 21.15, Almonds_Unsalted: 20.33, Appl...
riboflavin_mg1.3NaN{Almonds: 1.138, Almonds_Unsalted: 1.161, Appl...
selenium_mcg55.0400.0{Almonds: 4.1, Almonds_Unsalted: 1.9, Baked_Po...
sodium_mg1500.0NaN{Almonds: 1.0, Almonds_Unsalted: 3.0, Apples: ...
thiamin_mg1.2NaN{Almonds: 0.205, Almonds_Unsalted: 0.075, Appl...
threonine_mg_kg20.0NaN{Almonds: 601.0, Apples: 6.0, Baked_Potato_(No...
tryptophan_mg_kg5.0NaN{Almonds: 211.0, Apples: 1.0, Baked_Potato_(No...
valine_mg_kg24.0NaN{Almonds: 855.0, Apples: 12.0, Baked_Potato_(N...
vitamin_a_mcg900.03000.0{Apples: 3.0, Bananas: 3.0, Broccoli: 31.0, Br...
vitamin_b6_mg1.3100.0{Almonds: 0.1369999999999999, Almonds_Unsalted...
vitamin_c_mg90.02000.0{Apples: 4.6, Baked_Potato_(No_Skin): 12.8, Ba...
vitamin_e_mg15.01000.0{Almonds: 25.63, Almonds_Unsalted: 23.54, Appl...
vitamin_k_mcg120.0NaN{Almonds_Unsalted: 3.5, Apples: 2.2, Baked_Pot...
zinc_mg11.040.0{Almonds: 3.12, Almonds_Unsalted: 3.21, Apples...
\n", 353 | "
" 354 | ], 355 | "text/plain": [ 356 | " min max \\\n", 357 | "name \n", 358 | "calcium_mg 1000.0 2500.0 \n", 359 | "calories_kcal 1800.0 2200.0 \n", 360 | "choline_mg 550.0 3500.0 \n", 361 | "copper_mg 0.9 10.0 \n", 362 | "fiber_g 38.0 NaN \n", 363 | "fluoride_mcg 4.0 10.0 \n", 364 | "folate_mcg 400.0 1000.0 \n", 365 | "histidine_mg_kg 14.0 NaN \n", 366 | "iron_mg 8.0 45.0 \n", 367 | "isoleucine_mg_kg 19.0 NaN \n", 368 | "leucine_mg_kg 42.0 NaN \n", 369 | "lysine_mg_kg 38.0 NaN \n", 370 | "magnesium_mg 400.0 NaN \n", 371 | "manganese_mg 2.3 11.0 \n", 372 | "methionine_and_cysteine_mg_kg 19.0 NaN \n", 373 | "niacin_mg 16.0 35.0 \n", 374 | "pantothenic_acid_mg 5.0 NaN \n", 375 | "phenylalanine_and_tyrosine_mg_kg 33.0 NaN \n", 376 | "phosphorus_mg 700.0 4000.0 \n", 377 | "potassium_mg 3400.0 NaN \n", 378 | "protein_g_kg 0.8 NaN \n", 379 | "riboflavin_mg 1.3 NaN \n", 380 | "selenium_mcg 55.0 400.0 \n", 381 | "sodium_mg 1500.0 NaN \n", 382 | "thiamin_mg 1.2 NaN \n", 383 | "threonine_mg_kg 20.0 NaN \n", 384 | "tryptophan_mg_kg 5.0 NaN \n", 385 | "valine_mg_kg 24.0 NaN \n", 386 | "vitamin_a_mcg 900.0 3000.0 \n", 387 | "vitamin_b6_mg 1.3 100.0 \n", 388 | "vitamin_c_mg 90.0 2000.0 \n", 389 | "vitamin_e_mg 15.0 1000.0 \n", 390 | "vitamin_k_mcg 120.0 NaN \n", 391 | "zinc_mg 11.0 40.0 \n", 392 | "\n", 393 | " intake \n", 394 | "name \n", 395 | "calcium_mg {Almonds: 269.0, Almonds_Unsalted: 260.0, Appl... \n", 396 | "calories_kcal {Almonds: 579.0, Almonds_Unsalted: 607.0, Appl... \n", 397 | "choline_mg {Almonds: 52.1, Almonds_Unsalted: 50.5, Apples... \n", 398 | "copper_mg {Almonds: 1.031, Almonds_Unsalted: 1.065999999... \n", 399 | "fiber_g {Almonds: 12.5, Almonds_Unsalted: 10.6, Apples... \n", 400 | "fluoride_mcg {Apples: 3.3, Bananas: 2.2, Broccoli_(Cooked):... \n", 401 | "folate_mcg {Almonds: 44.0, Almonds_Unsalted: 53.0, Apples... \n", 402 | "histidine_mg_kg {Almonds: 539.0, Apples: 5.0, Baked_Potato_(No... \n", 403 | "iron_mg {Almonds: 3.71, Almonds_Unsalted: 3.62, Apples... \n", 404 | "isoleucine_mg_kg {Almonds: 751.0, Apples: 6.0, Baked_Potato_(No... \n", 405 | "leucine_mg_kg {Almonds: 1473.0, Apples: 13.0, Baked_Potato_(... \n", 406 | "lysine_mg_kg {Almonds: 568.0, Apples: 12.0, Baked_Potato_(N... \n", 407 | "magnesium_mg {Almonds: 270.0, Almonds_Unsalted: 271.0, Appl... \n", 408 | "manganese_mg {Almonds: 2.1790000000000003, Apples: 0.035, B... \n", 409 | "methionine_and_cysteine_mg_kg {Almonds: 372.0, Apples: 2.0, Baked_Potato_(No... \n", 410 | "niacin_mg {Almonds: 3.618, Almonds_Unsalted: 3.528, Appl... \n", 411 | "pantothenic_acid_mg {Almonds: 0.471, Apples: 0.061, Baked_Potato_(... \n", 412 | "phenylalanine_and_tyrosine_mg_kg {Almonds: 1582.0, Apples: 7.0, Baked_Potato_(N... \n", 413 | "phosphorus_mg {Almonds: 481.0, Almonds_Unsalted: 457.0, Appl... \n", 414 | "potassium_mg {Almonds: 733.0, Almonds_Unsalted: 692.0, Appl... \n", 415 | "protein_g_kg {Almonds: 21.15, Almonds_Unsalted: 20.33, Appl... \n", 416 | "riboflavin_mg {Almonds: 1.138, Almonds_Unsalted: 1.161, Appl... \n", 417 | "selenium_mcg {Almonds: 4.1, Almonds_Unsalted: 1.9, Baked_Po... \n", 418 | "sodium_mg {Almonds: 1.0, Almonds_Unsalted: 3.0, Apples: ... \n", 419 | "thiamin_mg {Almonds: 0.205, Almonds_Unsalted: 0.075, Appl... \n", 420 | "threonine_mg_kg {Almonds: 601.0, Apples: 6.0, Baked_Potato_(No... \n", 421 | "tryptophan_mg_kg {Almonds: 211.0, Apples: 1.0, Baked_Potato_(No... \n", 422 | "valine_mg_kg {Almonds: 855.0, Apples: 12.0, Baked_Potato_(N... \n", 423 | "vitamin_a_mcg {Apples: 3.0, Bananas: 3.0, Broccoli: 31.0, Br... \n", 424 | "vitamin_b6_mg {Almonds: 0.1369999999999999, Almonds_Unsalted... \n", 425 | "vitamin_c_mg {Apples: 4.6, Baked_Potato_(No_Skin): 12.8, Ba... \n", 426 | "vitamin_e_mg {Almonds: 25.63, Almonds_Unsalted: 23.54, Appl... \n", 427 | "vitamin_k_mcg {Almonds_Unsalted: 3.5, Apples: 2.2, Baked_Pot... \n", 428 | "zinc_mg {Almonds: 3.12, Almonds_Unsalted: 3.21, Apples... " 429 | ] 430 | }, 431 | "execution_count": 4, 432 | "metadata": {}, 433 | "output_type": "execute_result" 434 | } 435 | ], 436 | "source": [ 437 | "problem.nutrient_table" 438 | ] 439 | }, 440 | { 441 | "cell_type": "code", 442 | "execution_count": 5, 443 | "id": "a48bef6d", 444 | "metadata": {}, 445 | "outputs": [ 446 | { 447 | "data": { 448 | "text/html": [ 449 | "
\n", 450 | "\n", 463 | "\n", 464 | " \n", 465 | " \n", 466 | " \n", 467 | " \n", 468 | " \n", 469 | " \n", 470 | " \n", 471 | " \n", 472 | " \n", 473 | " \n", 474 | " \n", 475 | " \n", 476 | " \n", 477 | " \n", 478 | " \n", 479 | " \n", 480 | " \n", 481 | " \n", 482 | " \n", 483 | " \n", 484 | " \n", 485 | " \n", 486 | " \n", 487 | " \n", 488 | " \n", 489 | " \n", 490 | " \n", 491 | " \n", 492 | " \n", 493 | " \n", 494 | " \n", 495 | " \n", 496 | " \n", 497 | " \n", 498 | " \n", 499 | " \n", 500 | " \n", 501 | " \n", 502 | " \n", 503 | " \n", 504 | " \n", 505 | " \n", 506 | " \n", 507 | " \n", 508 | " \n", 509 | " \n", 510 | " \n", 511 | " \n", 512 | " \n", 513 | " \n", 514 | " \n", 515 | " \n", 516 | " \n", 517 | " \n", 518 | " \n", 519 | " \n", 520 | " \n", 521 | " \n", 522 | " \n", 523 | " \n", 524 | " \n", 525 | " \n", 526 | " \n", 527 | " \n", 528 | " \n", 529 | " \n", 530 | " \n", 531 | " \n", 532 | " \n", 533 | " \n", 534 | " \n", 535 | " \n", 536 | " \n", 537 | " \n", 538 | " \n", 539 | " \n", 540 | " \n", 541 | " \n", 542 | " \n", 543 | " \n", 544 | " \n", 545 | " \n", 546 | " \n", 547 | " \n", 548 | " \n", 549 | " \n", 550 | " \n", 551 | " \n", 552 | " \n", 553 | " \n", 554 | " \n", 555 | " \n", 556 | " \n", 557 | " \n", 558 | " \n", 559 | " \n", 560 | " \n", 561 | " \n", 562 | " \n", 563 | " \n", 564 | " \n", 565 | " \n", 566 | " \n", 567 | " \n", 568 | " \n", 569 | " \n", 570 | " \n", 571 | " \n", 572 | " \n", 573 | " \n", 574 | " \n", 575 | " \n", 576 | " \n", 577 | " \n", 578 | " \n", 579 | " \n", 580 | " \n", 581 | " \n", 582 | " \n", 583 | " \n", 584 | " \n", 585 | " \n", 586 | " \n", 587 | " \n", 588 | " \n", 589 | " \n", 590 | " \n", 591 | " \n", 592 | " \n", 593 | " \n", 594 | " \n", 595 | " \n", 596 | " \n", 597 | " \n", 598 | " \n", 599 | " \n", 600 | " \n", 601 | " \n", 602 | " \n", 603 | " \n", 604 | " \n", 605 | " \n", 606 | " \n", 607 | " \n", 608 | " \n", 609 | " \n", 610 | " \n", 611 | " \n", 612 | " \n", 613 | " \n", 614 | " \n", 615 | " \n", 616 | " \n", 617 | " \n", 618 | " \n", 619 | " \n", 620 | " \n", 621 | " \n", 622 | " \n", 623 | " \n", 624 | " \n", 625 | " \n", 626 | " \n", 627 | " \n", 628 | " \n", 629 | " \n", 630 | " \n", 631 | " \n", 632 | " \n", 633 | " \n", 634 | " \n", 635 | " \n", 636 | " \n", 637 | " \n", 638 | " \n", 639 | " \n", 640 | " \n", 641 | " \n", 642 | " \n", 643 | " \n", 644 | " \n", 645 | " \n", 646 | " \n", 647 | " \n", 648 | " \n", 649 | " \n", 650 | " \n", 651 | " \n", 652 | " \n", 653 | " \n", 654 | " \n", 655 | " \n", 656 | " \n", 657 | " \n", 658 | " \n", 659 | " \n", 660 | " \n", 661 | " \n", 662 | " \n", 663 | " \n", 664 | " \n", 665 | " \n", 666 | " \n", 667 | " \n", 668 | " \n", 669 | " \n", 670 | " \n", 671 | " \n", 672 | " \n", 673 | " \n", 674 | " \n", 675 | " \n", 676 | " \n", 677 | " \n", 678 | " \n", 679 | " \n", 680 | " \n", 681 | " \n", 682 | " \n", 683 | " \n", 684 | " \n", 685 | " \n", 686 | " \n", 687 | " \n", 688 | " \n", 689 | " \n", 690 | " \n", 691 | " \n", 692 | " \n", 693 | " \n", 694 | " \n", 695 | " \n", 696 | " \n", 697 | " \n", 698 | " \n", 699 | " \n", 700 | " \n", 701 | " \n", 702 | " \n", 703 | " \n", 704 | " \n", 705 | " \n", 706 | " \n", 707 | " \n", 708 | " \n", 709 | " \n", 710 | " \n", 711 | " \n", 712 | " \n", 713 | " \n", 714 | " \n", 715 | " \n", 716 | " \n", 717 | " \n", 718 | " \n", 719 | " \n", 720 | " \n", 721 | " \n", 722 | " \n", 723 | " \n", 724 | " \n", 725 | " \n", 726 | " \n", 727 | " \n", 728 | " \n", 729 | " \n", 730 | " \n", 731 | " \n", 732 | " \n", 733 | " \n", 734 | " \n", 735 | " \n", 736 | " \n", 737 | " \n", 738 | " \n", 739 | " \n", 740 | " \n", 741 | " \n", 742 | " \n", 743 | " \n", 744 | " \n", 745 | " \n", 746 | " \n", 747 | " \n", 748 | " \n", 749 | " \n", 750 | " \n", 751 | " \n", 752 | " \n", 753 | " \n", 754 | " \n", 755 | " \n", 756 | " \n", 757 | " \n", 758 | " \n", 759 | " \n", 760 | " \n", 761 | " \n", 762 | " \n", 763 | " \n", 764 | " \n", 765 | " \n", 766 | " \n", 767 | " \n", 768 | " \n", 769 | " \n", 770 | " \n", 771 | " \n", 772 | " \n", 773 | " \n", 774 | " \n", 775 | " \n", 776 | " \n", 777 | " \n", 778 | " \n", 779 | " \n", 780 | "
food_groupcalories_kcalfat_gprotein_g_kgcarbohydrate_gsugars_gfiber_gcholesterol_mgsaturated_fats_gcalcium_mg...alcohol_gcaffeine_mgtheobromine_mg200_calorie_weight_gphenylalanine_and_tyrosine_mg_kgmethionine_and_cysteine_mg_kgmaxcostamount_varamount
name
AlmondsNuts and Seeds57949.9321.1521.554.3512.50.03.802269.0...0.00.00.034.5421582.0372.0100001Almonds0.000000
Almonds UnsaltedNuts and Seeds60753.9620.3320.384.7110.60.04.380260.0...0.00.00.032.9490.00.0100001Almonds_Unsalted0.000000
ApplesFruits520.170.2613.8110.392.40.00.0286.0...0.00.00.0384.6157.02.0100001Apples0.000000
Baked Potato (No Skin)Vegetables930.101.9621.551.701.50.00.0265.0...0.00.00.0215.054160.056.0100001Baked_Potato_(No_Skin)0.000000
BananasFruits890.331.0922.8412.232.60.00.1125.0...0.00.00.0224.71958.017.0100001Bananas0.000000
..................................................................
WalnutsNuts and Seeds65465.2115.2313.712.616.70.06.12698.0...0.00.00.030.5811117.0444.0100001Walnuts0.000000
WatermelonFruits300.150.617.556.200.40.00.0167.0...0.00.00.0666.66727.08.0100001Watermelon0.000000
White Button MushroomsVegetables220.343.093.261.981.00.00.0503.0...0.00.00.0909.091129.043.0100001White_Button_Mushrooms4.076494
White RiceGrains and Pasta1300.282.6928.170.050.40.00.07710.0...0.00.00.0153.846234.0118.0100001White_Rice0.000000
ZucchiniVegetables170.321.213.112.501.00.00.08416.0...0.00.00.01176.47175.030.0100001Zucchini0.000000
\n", 781 | "

68 rows × 99 columns

\n", 782 | "
" 783 | ], 784 | "text/plain": [ 785 | " food_group calories_kcal fat_g protein_g_kg \\\n", 786 | "name \n", 787 | "Almonds Nuts and Seeds 579 49.93 21.15 \n", 788 | "Almonds Unsalted Nuts and Seeds 607 53.96 20.33 \n", 789 | "Apples Fruits 52 0.17 0.26 \n", 790 | "Baked Potato (No Skin) Vegetables 93 0.10 1.96 \n", 791 | "Bananas Fruits 89 0.33 1.09 \n", 792 | "... ... ... ... ... \n", 793 | "Walnuts Nuts and Seeds 654 65.21 15.23 \n", 794 | "Watermelon Fruits 30 0.15 0.61 \n", 795 | "White Button Mushrooms Vegetables 22 0.34 3.09 \n", 796 | "White Rice Grains and Pasta 130 0.28 2.69 \n", 797 | "Zucchini Vegetables 17 0.32 1.21 \n", 798 | "\n", 799 | " carbohydrate_g sugars_g fiber_g cholesterol_mg \\\n", 800 | "name \n", 801 | "Almonds 21.55 4.35 12.5 0.0 \n", 802 | "Almonds Unsalted 20.38 4.71 10.6 0.0 \n", 803 | "Apples 13.81 10.39 2.4 0.0 \n", 804 | "Baked Potato (No Skin) 21.55 1.70 1.5 0.0 \n", 805 | "Bananas 22.84 12.23 2.6 0.0 \n", 806 | "... ... ... ... ... \n", 807 | "Walnuts 13.71 2.61 6.7 0.0 \n", 808 | "Watermelon 7.55 6.20 0.4 0.0 \n", 809 | "White Button Mushrooms 3.26 1.98 1.0 0.0 \n", 810 | "White Rice 28.17 0.05 0.4 0.0 \n", 811 | "Zucchini 3.11 2.50 1.0 0.0 \n", 812 | "\n", 813 | " saturated_fats_g calcium_mg ... alcohol_g \\\n", 814 | "name ... \n", 815 | "Almonds 3.802 269.0 ... 0.0 \n", 816 | "Almonds Unsalted 4.380 260.0 ... 0.0 \n", 817 | "Apples 0.028 6.0 ... 0.0 \n", 818 | "Baked Potato (No Skin) 0.026 5.0 ... 0.0 \n", 819 | "Bananas 0.112 5.0 ... 0.0 \n", 820 | "... ... ... ... ... \n", 821 | "Walnuts 6.126 98.0 ... 0.0 \n", 822 | "Watermelon 0.016 7.0 ... 0.0 \n", 823 | "White Button Mushrooms 0.050 3.0 ... 0.0 \n", 824 | "White Rice 0.077 10.0 ... 0.0 \n", 825 | "Zucchini 0.084 16.0 ... 0.0 \n", 826 | "\n", 827 | " caffeine_mg theobromine_mg 200_calorie_weight_g \\\n", 828 | "name \n", 829 | "Almonds 0.0 0.0 34.542 \n", 830 | "Almonds Unsalted 0.0 0.0 32.949 \n", 831 | "Apples 0.0 0.0 384.615 \n", 832 | "Baked Potato (No Skin) 0.0 0.0 215.054 \n", 833 | "Bananas 0.0 0.0 224.719 \n", 834 | "... ... ... ... \n", 835 | "Walnuts 0.0 0.0 30.581 \n", 836 | "Watermelon 0.0 0.0 666.667 \n", 837 | "White Button Mushrooms 0.0 0.0 909.091 \n", 838 | "White Rice 0.0 0.0 153.846 \n", 839 | "Zucchini 0.0 0.0 1176.471 \n", 840 | "\n", 841 | " phenylalanine_and_tyrosine_mg_kg \\\n", 842 | "name \n", 843 | "Almonds 1582.0 \n", 844 | "Almonds Unsalted 0.0 \n", 845 | "Apples 7.0 \n", 846 | "Baked Potato (No Skin) 160.0 \n", 847 | "Bananas 58.0 \n", 848 | "... ... \n", 849 | "Walnuts 1117.0 \n", 850 | "Watermelon 27.0 \n", 851 | "White Button Mushrooms 129.0 \n", 852 | "White Rice 234.0 \n", 853 | "Zucchini 75.0 \n", 854 | "\n", 855 | " methionine_and_cysteine_mg_kg max cost \\\n", 856 | "name \n", 857 | "Almonds 372.0 10000 1 \n", 858 | "Almonds Unsalted 0.0 10000 1 \n", 859 | "Apples 2.0 10000 1 \n", 860 | "Baked Potato (No Skin) 56.0 10000 1 \n", 861 | "Bananas 17.0 10000 1 \n", 862 | "... ... ... ... \n", 863 | "Walnuts 444.0 10000 1 \n", 864 | "Watermelon 8.0 10000 1 \n", 865 | "White Button Mushrooms 43.0 10000 1 \n", 866 | "White Rice 118.0 10000 1 \n", 867 | "Zucchini 30.0 10000 1 \n", 868 | "\n", 869 | " amount_var amount \n", 870 | "name \n", 871 | "Almonds Almonds 0.000000 \n", 872 | "Almonds Unsalted Almonds_Unsalted 0.000000 \n", 873 | "Apples Apples 0.000000 \n", 874 | "Baked Potato (No Skin) Baked_Potato_(No_Skin) 0.000000 \n", 875 | "Bananas Bananas 0.000000 \n", 876 | "... ... ... \n", 877 | "Walnuts Walnuts 0.000000 \n", 878 | "Watermelon Watermelon 0.000000 \n", 879 | "White Button Mushrooms White_Button_Mushrooms 4.076494 \n", 880 | "White Rice White_Rice 0.000000 \n", 881 | "Zucchini Zucchini 0.000000 \n", 882 | "\n", 883 | "[68 rows x 99 columns]" 884 | ] 885 | }, 886 | "execution_count": 5, 887 | "metadata": {}, 888 | "output_type": "execute_result" 889 | } 890 | ], 891 | "source": [ 892 | "problem.food_table.df" 893 | ] 894 | }, 895 | { 896 | "cell_type": "code", 897 | "execution_count": 6, 898 | "id": "f1206e24", 899 | "metadata": {}, 900 | "outputs": [ 901 | { 902 | "data": { 903 | "text/plain": [ 904 | "['Broccoli (Cooked)',\n", 905 | " 'Cooked Celery',\n", 906 | " 'Cooked Tomatoes',\n", 907 | " 'Cucumber',\n", 908 | " 'Dry Roasted Pistachio Nuts',\n", 909 | " 'White Button Mushrooms']" 910 | ] 911 | }, 912 | "execution_count": 6, 913 | "metadata": {}, 914 | "output_type": "execute_result" 915 | } 916 | ], 917 | "source": [ 918 | "list(problem.recipe.index)" 919 | ] 920 | }, 921 | { 922 | "cell_type": "code", 923 | "execution_count": 7, 924 | "id": "ebba2300", 925 | "metadata": {}, 926 | "outputs": [ 927 | { 928 | "data": { 929 | "text/html": [ 930 | "
\n", 931 | "\n", 944 | "\n", 945 | " \n", 946 | " \n", 947 | " \n", 948 | " \n", 949 | " \n", 950 | " \n", 951 | " \n", 952 | " \n", 953 | " \n", 954 | " \n", 955 | " \n", 956 | " \n", 957 | " \n", 958 | " \n", 959 | " \n", 960 | " \n", 961 | " \n", 962 | " \n", 963 | " \n", 964 | " \n", 965 | " \n", 966 | " \n", 967 | " \n", 968 | " \n", 969 | " \n", 970 | " \n", 971 | " \n", 972 | " \n", 973 | " \n", 974 | " \n", 975 | " \n", 976 | " \n", 977 | " \n", 978 | " \n", 979 | " \n", 980 | " \n", 981 | " \n", 982 | " \n", 983 | " \n", 984 | " \n", 985 | " \n", 986 | " \n", 987 | " \n", 988 | " \n", 989 | " \n", 990 | " \n", 991 | " \n", 992 | " \n", 993 | " \n", 994 | " \n", 995 | " \n", 996 | " \n", 997 | " \n", 998 | " \n", 999 | " \n", 1000 | " \n", 1001 | " \n", 1002 | " \n", 1003 | " \n", 1004 | " \n", 1005 | " \n", 1006 | " \n", 1007 | " \n", 1008 | " \n", 1009 | " \n", 1010 | " \n", 1011 | " \n", 1012 | " \n", 1013 | " \n", 1014 | " \n", 1015 | " \n", 1016 | " \n", 1017 | " \n", 1018 | " \n", 1019 | " \n", 1020 | " \n", 1021 | " \n", 1022 | " \n", 1023 | " \n", 1024 | " \n", 1025 | " \n", 1026 | " \n", 1027 | " \n", 1028 | " \n", 1029 | " \n", 1030 | " \n", 1031 | " \n", 1032 | " \n", 1033 | " \n", 1034 | " \n", 1035 | " \n", 1036 | " \n", 1037 | " \n", 1038 | " \n", 1039 | " \n", 1040 | " \n", 1041 | " \n", 1042 | " \n", 1043 | " \n", 1044 | " \n", 1045 | " \n", 1046 | " \n", 1047 | " \n", 1048 | " \n", 1049 | " \n", 1050 | " \n", 1051 | " \n", 1052 | " \n", 1053 | " \n", 1054 | " \n", 1055 | " \n", 1056 | " \n", 1057 | " \n", 1058 | " \n", 1059 | " \n", 1060 | " \n", 1061 | " \n", 1062 | " \n", 1063 | " \n", 1064 | " \n", 1065 | " \n", 1066 | " \n", 1067 | " \n", 1068 | " \n", 1069 | " \n", 1070 | " \n", 1071 | " \n", 1072 | " \n", 1073 | " \n", 1074 | " \n", 1075 | " \n", 1076 | " \n", 1077 | " \n", 1078 | " \n", 1079 | " \n", 1080 | " \n", 1081 | " \n", 1082 | " \n", 1083 | " \n", 1084 | " \n", 1085 | " \n", 1086 | " \n", 1087 | " \n", 1088 | " \n", 1089 | " \n", 1090 | " \n", 1091 | " \n", 1092 | " \n", 1093 | " \n", 1094 | " \n", 1095 | " \n", 1096 | " \n", 1097 | " \n", 1098 | " \n", 1099 | " \n", 1100 | " \n", 1101 | " \n", 1102 | " \n", 1103 | " \n", 1104 | " \n", 1105 | " \n", 1106 | " \n", 1107 | " \n", 1108 | " \n", 1109 | " \n", 1110 | " \n", 1111 | " \n", 1112 | " \n", 1113 | " \n", 1114 | " \n", 1115 | " \n", 1116 | " \n", 1117 | " \n", 1118 | " \n", 1119 | " \n", 1120 | " \n", 1121 | " \n", 1122 | " \n", 1123 | " \n", 1124 | " \n", 1125 | " \n", 1126 | " \n", 1127 | " \n", 1128 | " \n", 1129 | " \n", 1130 | " \n", 1131 | " \n", 1132 | " \n", 1133 | " \n", 1134 | " \n", 1135 | " \n", 1136 | " \n", 1137 | " \n", 1138 | " \n", 1139 | " \n", 1140 | " \n", 1141 | "
food_groupcalories_kcalfat_gprotein_g_kgcarbohydrate_gsugars_gfiber_gcholesterol_mgsaturated_fats_gcalcium_mg...alcohol_gcaffeine_mgtheobromine_mg200_calorie_weight_gphenylalanine_and_tyrosine_mg_kgmethionine_and_cysteine_mg_kgmaxcostamount_varamount
name
Broccoli (Cooked)Vegetables350.412.387.181.393.30.00.07940.0...0.00.00.0571.429176.074.0100001Broccoli_(Cooked)0.518573
Cooked CeleryVegetables180.160.834.002.371.60.00.04042.0...0.00.00.01111.11135.012.0100001Cooked_Celery13.191981
Cooked TomatoesVegetables180.110.954.012.490.70.00.01511.0...0.00.00.01111.11146.023.0100001Cooked_Tomatoes21.014955
CucumberVegetables150.110.653.631.670.50.00.03716.0...0.00.00.01333.33330.010.0100001Cucumber6.096698
Dry Roasted Pistachio NutsNuts and Seeds57245.8221.0528.287.7410.30.05.645107.0...0.00.00.034.9651671.0680.0100001Dry_Roasted_Pistachio_Nuts2.421314
White Button MushroomsVegetables220.343.093.261.981.00.00.0503.0...0.00.00.0909.091129.043.0100001White_Button_Mushrooms4.076494
\n", 1142 | "

6 rows × 99 columns

\n", 1143 | "
" 1144 | ], 1145 | "text/plain": [ 1146 | " food_group calories_kcal fat_g \\\n", 1147 | "name \n", 1148 | "Broccoli (Cooked) Vegetables 35 0.41 \n", 1149 | "Cooked Celery Vegetables 18 0.16 \n", 1150 | "Cooked Tomatoes Vegetables 18 0.11 \n", 1151 | "Cucumber Vegetables 15 0.11 \n", 1152 | "Dry Roasted Pistachio Nuts Nuts and Seeds 572 45.82 \n", 1153 | "White Button Mushrooms Vegetables 22 0.34 \n", 1154 | "\n", 1155 | " protein_g_kg carbohydrate_g sugars_g fiber_g \\\n", 1156 | "name \n", 1157 | "Broccoli (Cooked) 2.38 7.18 1.39 3.3 \n", 1158 | "Cooked Celery 0.83 4.00 2.37 1.6 \n", 1159 | "Cooked Tomatoes 0.95 4.01 2.49 0.7 \n", 1160 | "Cucumber 0.65 3.63 1.67 0.5 \n", 1161 | "Dry Roasted Pistachio Nuts 21.05 28.28 7.74 10.3 \n", 1162 | "White Button Mushrooms 3.09 3.26 1.98 1.0 \n", 1163 | "\n", 1164 | " cholesterol_mg saturated_fats_g calcium_mg ... \\\n", 1165 | "name ... \n", 1166 | "Broccoli (Cooked) 0.0 0.079 40.0 ... \n", 1167 | "Cooked Celery 0.0 0.040 42.0 ... \n", 1168 | "Cooked Tomatoes 0.0 0.015 11.0 ... \n", 1169 | "Cucumber 0.0 0.037 16.0 ... \n", 1170 | "Dry Roasted Pistachio Nuts 0.0 5.645 107.0 ... \n", 1171 | "White Button Mushrooms 0.0 0.050 3.0 ... \n", 1172 | "\n", 1173 | " alcohol_g caffeine_mg theobromine_mg \\\n", 1174 | "name \n", 1175 | "Broccoli (Cooked) 0.0 0.0 0.0 \n", 1176 | "Cooked Celery 0.0 0.0 0.0 \n", 1177 | "Cooked Tomatoes 0.0 0.0 0.0 \n", 1178 | "Cucumber 0.0 0.0 0.0 \n", 1179 | "Dry Roasted Pistachio Nuts 0.0 0.0 0.0 \n", 1180 | "White Button Mushrooms 0.0 0.0 0.0 \n", 1181 | "\n", 1182 | " 200_calorie_weight_g \\\n", 1183 | "name \n", 1184 | "Broccoli (Cooked) 571.429 \n", 1185 | "Cooked Celery 1111.111 \n", 1186 | "Cooked Tomatoes 1111.111 \n", 1187 | "Cucumber 1333.333 \n", 1188 | "Dry Roasted Pistachio Nuts 34.965 \n", 1189 | "White Button Mushrooms 909.091 \n", 1190 | "\n", 1191 | " phenylalanine_and_tyrosine_mg_kg \\\n", 1192 | "name \n", 1193 | "Broccoli (Cooked) 176.0 \n", 1194 | "Cooked Celery 35.0 \n", 1195 | "Cooked Tomatoes 46.0 \n", 1196 | "Cucumber 30.0 \n", 1197 | "Dry Roasted Pistachio Nuts 1671.0 \n", 1198 | "White Button Mushrooms 129.0 \n", 1199 | "\n", 1200 | " methionine_and_cysteine_mg_kg max cost \\\n", 1201 | "name \n", 1202 | "Broccoli (Cooked) 74.0 10000 1 \n", 1203 | "Cooked Celery 12.0 10000 1 \n", 1204 | "Cooked Tomatoes 23.0 10000 1 \n", 1205 | "Cucumber 10.0 10000 1 \n", 1206 | "Dry Roasted Pistachio Nuts 680.0 10000 1 \n", 1207 | "White Button Mushrooms 43.0 10000 1 \n", 1208 | "\n", 1209 | " amount_var amount \n", 1210 | "name \n", 1211 | "Broccoli (Cooked) Broccoli_(Cooked) 0.518573 \n", 1212 | "Cooked Celery Cooked_Celery 13.191981 \n", 1213 | "Cooked Tomatoes Cooked_Tomatoes 21.014955 \n", 1214 | "Cucumber Cucumber 6.096698 \n", 1215 | "Dry Roasted Pistachio Nuts Dry_Roasted_Pistachio_Nuts 2.421314 \n", 1216 | "White Button Mushrooms White_Button_Mushrooms 4.076494 \n", 1217 | "\n", 1218 | "[6 rows x 99 columns]" 1219 | ] 1220 | }, 1221 | "execution_count": 7, 1222 | "metadata": {}, 1223 | "output_type": "execute_result" 1224 | } 1225 | ], 1226 | "source": [ 1227 | "problem.food_table.df[problem.food_table.df.index.isin(problem.recipe.index)]" 1228 | ] 1229 | }, 1230 | { 1231 | "cell_type": "code", 1232 | "execution_count": 8, 1233 | "id": "f1a5c0b5", 1234 | "metadata": {}, 1235 | "outputs": [], 1236 | "source": [ 1237 | "problem.nutrient_table['intake_value'] = problem.nutrient_matrix[problem.recipe.index] @ problem.recipe.amount" 1238 | ] 1239 | }, 1240 | { 1241 | "cell_type": "code", 1242 | "execution_count": 9, 1243 | "id": "88164ca3", 1244 | "metadata": {}, 1245 | "outputs": [ 1246 | { 1247 | "data": { 1248 | "text/html": [ 1249 | "
\n", 1250 | "\n", 1263 | "\n", 1264 | " \n", 1265 | " \n", 1266 | " \n", 1267 | " \n", 1268 | " \n", 1269 | " \n", 1270 | " \n", 1271 | " \n", 1272 | " \n", 1273 | " \n", 1274 | " \n", 1275 | " \n", 1276 | " \n", 1277 | " \n", 1278 | " \n", 1279 | " \n", 1280 | " \n", 1281 | " \n", 1282 | " \n", 1283 | " \n", 1284 | " \n", 1285 | " \n", 1286 | " \n", 1287 | " \n", 1288 | " \n", 1289 | " \n", 1290 | " \n", 1291 | " \n", 1292 | " \n", 1293 | " \n", 1294 | " \n", 1295 | " \n", 1296 | " \n", 1297 | " \n", 1298 | " \n", 1299 | " \n", 1300 | " \n", 1301 | " \n", 1302 | " \n", 1303 | " \n", 1304 | " \n", 1305 | " \n", 1306 | " \n", 1307 | " \n", 1308 | " \n", 1309 | " \n", 1310 | " \n", 1311 | " \n", 1312 | " \n", 1313 | " \n", 1314 | " \n", 1315 | " \n", 1316 | " \n", 1317 | " \n", 1318 | " \n", 1319 | " \n", 1320 | " \n", 1321 | " \n", 1322 | " \n", 1323 | " \n", 1324 | " \n", 1325 | " \n", 1326 | " \n", 1327 | " \n", 1328 | " \n", 1329 | " \n", 1330 | " \n", 1331 | " \n", 1332 | " \n", 1333 | " \n", 1334 | " \n", 1335 | " \n", 1336 | " \n", 1337 | " \n", 1338 | " \n", 1339 | " \n", 1340 | " \n", 1341 | " \n", 1342 | " \n", 1343 | " \n", 1344 | " \n", 1345 | " \n", 1346 | " \n", 1347 | " \n", 1348 | " \n", 1349 | " \n", 1350 | " \n", 1351 | " \n", 1352 | " \n", 1353 | " \n", 1354 | " \n", 1355 | " \n", 1356 | " \n", 1357 | " \n", 1358 | " \n", 1359 | " \n", 1360 | " \n", 1361 | " \n", 1362 | " \n", 1363 | " \n", 1364 | " \n", 1365 | " \n", 1366 | " \n", 1367 | " \n", 1368 | " \n", 1369 | " \n", 1370 | " \n", 1371 | " \n", 1372 | " \n", 1373 | " \n", 1374 | " \n", 1375 | " \n", 1376 | " \n", 1377 | " \n", 1378 | " \n", 1379 | " \n", 1380 | " \n", 1381 | " \n", 1382 | " \n", 1383 | " \n", 1384 | " \n", 1385 | " \n", 1386 | " \n", 1387 | " \n", 1388 | " \n", 1389 | " \n", 1390 | " \n", 1391 | " \n", 1392 | " \n", 1393 | " \n", 1394 | " \n", 1395 | " \n", 1396 | " \n", 1397 | " \n", 1398 | " \n", 1399 | " \n", 1400 | " \n", 1401 | " \n", 1402 | " \n", 1403 | " \n", 1404 | " \n", 1405 | " \n", 1406 | " \n", 1407 | " \n", 1408 | " \n", 1409 | " \n", 1410 | " \n", 1411 | " \n", 1412 | " \n", 1413 | " \n", 1414 | " \n", 1415 | " \n", 1416 | " \n", 1417 | " \n", 1418 | " \n", 1419 | " \n", 1420 | " \n", 1421 | " \n", 1422 | " \n", 1423 | " \n", 1424 | " \n", 1425 | " \n", 1426 | " \n", 1427 | " \n", 1428 | " \n", 1429 | " \n", 1430 | " \n", 1431 | " \n", 1432 | " \n", 1433 | " \n", 1434 | " \n", 1435 | " \n", 1436 | " \n", 1437 | " \n", 1438 | " \n", 1439 | " \n", 1440 | " \n", 1441 | " \n", 1442 | " \n", 1443 | " \n", 1444 | " \n", 1445 | " \n", 1446 | " \n", 1447 | " \n", 1448 | " \n", 1449 | " \n", 1450 | " \n", 1451 | " \n", 1452 | " \n", 1453 | " \n", 1454 | " \n", 1455 | " \n", 1456 | " \n", 1457 | " \n", 1458 | " \n", 1459 | " \n", 1460 | " \n", 1461 | " \n", 1462 | " \n", 1463 | " \n", 1464 | " \n", 1465 | " \n", 1466 | " \n", 1467 | " \n", 1468 | " \n", 1469 | " \n", 1470 | " \n", 1471 | " \n", 1472 | " \n", 1473 | " \n", 1474 | " \n", 1475 | " \n", 1476 | " \n", 1477 | " \n", 1478 | " \n", 1479 | " \n", 1480 | " \n", 1481 | " \n", 1482 | " \n", 1483 | " \n", 1484 | " \n", 1485 | " \n", 1486 | " \n", 1487 | " \n", 1488 | " \n", 1489 | " \n", 1490 | " \n", 1491 | " \n", 1492 | " \n", 1493 | " \n", 1494 | " \n", 1495 | " \n", 1496 | " \n", 1497 | " \n", 1498 | " \n", 1499 | " \n", 1500 | " \n", 1501 | " \n", 1502 | " \n", 1503 | " \n", 1504 | " \n", 1505 | " \n", 1506 | " \n", 1507 | " \n", 1508 | " \n", 1509 | " \n", 1510 | " \n", 1511 | " \n", 1512 | " \n", 1513 | " \n", 1514 | " \n", 1515 | " \n", 1516 | " \n", 1517 | " \n", 1518 | " \n", 1519 | " \n", 1520 | "
minmaxintakeintake_value
name
calcium_mg1000.02500.0{Almonds: 269.0, Almonds_Unsalted: 260.0, Appl...1174.827914
calories_kcal1800.02200.0{Almonds: 579.0, Almonds_Unsalted: 607.0, Appl...2200.000034
choline_mg550.03500.0{Almonds: 52.1, Almonds_Unsalted: 50.5, Apples...550.000006
copper_mg0.910.0{Almonds: 1.031, Almonds_Unsalted: 1.065999999...6.759715
fiber_g38.0NaN{Almonds: 12.5, Almonds_Unsalted: 10.6, Apples...69.593310
fluoride_mcg4.010.0{Apples: 3.3, Bananas: 2.2, Broccoli_(Cooked):...10.000000
folate_mcg400.01000.0{Almonds: 44.0, Almonds_Unsalted: 53.0, Apples...1000.000014
histidine_mg_kg14.0NaN{Almonds: 539.0, Apples: 5.0, Baked_Potato_(No...2142.327436
iron_mg8.045.0{Almonds: 3.71, Almonds_Unsalted: 3.62, Apples...33.681465
isoleucine_mg_kg19.0NaN{Almonds: 751.0, Apples: 6.0, Baked_Potato_(No...3678.939105
leucine_mg_kg42.0NaN{Almonds: 1473.0, Apples: 13.0, Baked_Potato_(...6131.985784
lysine_mg_kg38.0NaN{Almonds: 568.0, Apples: 12.0, Baked_Potato_(N...4814.037326
magnesium_mg400.0NaN{Almonds: 270.0, Almonds_Unsalted: 271.0, Appl...738.197184
manganese_mg2.311.0{Almonds: 2.1790000000000003, Apples: 0.035, B...7.388452
methionine_and_cysteine_mg_kg19.0NaN{Almonds: 372.0, Apples: 2.0, Baked_Potato_(No...2562.772116
niacin_mg16.035.0{Almonds: 3.618, Almonds_Unsalted: 3.528, Appl...35.000000
pantothenic_acid_mg5.0NaN{Almonds: 0.471, Apples: 0.061, Baked_Potato_(...16.135919
phenylalanine_and_tyrosine_mg_kg33.0NaN{Almonds: 1582.0, Apples: 7.0, Baked_Potato_(N...6274.461059
phosphorus_mg700.04000.0{Almonds: 481.0, Almonds_Unsalted: 457.0, Appl...2585.458343
potassium_mg3400.0NaN{Almonds: 733.0, Almonds_Unsalted: 692.0, Appl...13110.528043
protein_g_kg0.8NaN{Almonds: 21.15, Almonds_Unsalted: 20.33, Appl...99.675643
riboflavin_mg1.3NaN{Almonds: 1.138, Almonds_Unsalted: 1.161, Appl...3.856082
selenium_mcg55.0400.0{Almonds: 4.1, Almonds_Unsalted: 1.9, Baked_Po...88.482726
sodium_mg1500.0NaN{Almonds: 1.0, Almonds_Unsalted: 3.0, Apples: ...1500.000031
thiamin_mg1.2NaN{Almonds: 0.205, Almonds_Unsalted: 0.075, Appl...3.270244
threonine_mg_kg20.0NaN{Almonds: 601.0, Apples: 6.0, Baked_Potato_(No...3214.634927
tryptophan_mg_kg5.0NaN{Almonds: 211.0, Apples: 1.0, Baked_Potato_(No...1138.408060
valine_mg_kg24.0NaN{Almonds: 855.0, Apples: 12.0, Baked_Potato_(N...5313.991476
vitamin_a_mcg900.03000.0{Apples: 3.0, Bananas: 3.0, Broccoli: 31.0, Br...949.241139
vitamin_b6_mg1.3100.0{Almonds: 0.1369999999999999, Almonds_Unsalted...6.282944
vitamin_c_mg90.02000.0{Apples: 4.6, Baked_Potato_(No_Skin): 12.8, Ba...626.162795
vitamin_e_mg15.01000.0{Almonds: 25.63, Almonds_Unsalted: 23.54, Appl...22.615417
vitamin_k_mcg120.0NaN{Almonds_Unsalted: 3.5, Apples: 2.2, Baked_Pot...762.616630
zinc_mg11.040.0{Almonds: 3.12, Almonds_Unsalted: 3.21, Apples...14.027321
\n", 1521 | "
" 1522 | ], 1523 | "text/plain": [ 1524 | " min max \\\n", 1525 | "name \n", 1526 | "calcium_mg 1000.0 2500.0 \n", 1527 | "calories_kcal 1800.0 2200.0 \n", 1528 | "choline_mg 550.0 3500.0 \n", 1529 | "copper_mg 0.9 10.0 \n", 1530 | "fiber_g 38.0 NaN \n", 1531 | "fluoride_mcg 4.0 10.0 \n", 1532 | "folate_mcg 400.0 1000.0 \n", 1533 | "histidine_mg_kg 14.0 NaN \n", 1534 | "iron_mg 8.0 45.0 \n", 1535 | "isoleucine_mg_kg 19.0 NaN \n", 1536 | "leucine_mg_kg 42.0 NaN \n", 1537 | "lysine_mg_kg 38.0 NaN \n", 1538 | "magnesium_mg 400.0 NaN \n", 1539 | "manganese_mg 2.3 11.0 \n", 1540 | "methionine_and_cysteine_mg_kg 19.0 NaN \n", 1541 | "niacin_mg 16.0 35.0 \n", 1542 | "pantothenic_acid_mg 5.0 NaN \n", 1543 | "phenylalanine_and_tyrosine_mg_kg 33.0 NaN \n", 1544 | "phosphorus_mg 700.0 4000.0 \n", 1545 | "potassium_mg 3400.0 NaN \n", 1546 | "protein_g_kg 0.8 NaN \n", 1547 | "riboflavin_mg 1.3 NaN \n", 1548 | "selenium_mcg 55.0 400.0 \n", 1549 | "sodium_mg 1500.0 NaN \n", 1550 | "thiamin_mg 1.2 NaN \n", 1551 | "threonine_mg_kg 20.0 NaN \n", 1552 | "tryptophan_mg_kg 5.0 NaN \n", 1553 | "valine_mg_kg 24.0 NaN \n", 1554 | "vitamin_a_mcg 900.0 3000.0 \n", 1555 | "vitamin_b6_mg 1.3 100.0 \n", 1556 | "vitamin_c_mg 90.0 2000.0 \n", 1557 | "vitamin_e_mg 15.0 1000.0 \n", 1558 | "vitamin_k_mcg 120.0 NaN \n", 1559 | "zinc_mg 11.0 40.0 \n", 1560 | "\n", 1561 | " intake \\\n", 1562 | "name \n", 1563 | "calcium_mg {Almonds: 269.0, Almonds_Unsalted: 260.0, Appl... \n", 1564 | "calories_kcal {Almonds: 579.0, Almonds_Unsalted: 607.0, Appl... \n", 1565 | "choline_mg {Almonds: 52.1, Almonds_Unsalted: 50.5, Apples... \n", 1566 | "copper_mg {Almonds: 1.031, Almonds_Unsalted: 1.065999999... \n", 1567 | "fiber_g {Almonds: 12.5, Almonds_Unsalted: 10.6, Apples... \n", 1568 | "fluoride_mcg {Apples: 3.3, Bananas: 2.2, Broccoli_(Cooked):... \n", 1569 | "folate_mcg {Almonds: 44.0, Almonds_Unsalted: 53.0, Apples... \n", 1570 | "histidine_mg_kg {Almonds: 539.0, Apples: 5.0, Baked_Potato_(No... \n", 1571 | "iron_mg {Almonds: 3.71, Almonds_Unsalted: 3.62, Apples... \n", 1572 | "isoleucine_mg_kg {Almonds: 751.0, Apples: 6.0, Baked_Potato_(No... \n", 1573 | "leucine_mg_kg {Almonds: 1473.0, Apples: 13.0, Baked_Potato_(... \n", 1574 | "lysine_mg_kg {Almonds: 568.0, Apples: 12.0, Baked_Potato_(N... \n", 1575 | "magnesium_mg {Almonds: 270.0, Almonds_Unsalted: 271.0, Appl... \n", 1576 | "manganese_mg {Almonds: 2.1790000000000003, Apples: 0.035, B... \n", 1577 | "methionine_and_cysteine_mg_kg {Almonds: 372.0, Apples: 2.0, Baked_Potato_(No... \n", 1578 | "niacin_mg {Almonds: 3.618, Almonds_Unsalted: 3.528, Appl... \n", 1579 | "pantothenic_acid_mg {Almonds: 0.471, Apples: 0.061, Baked_Potato_(... \n", 1580 | "phenylalanine_and_tyrosine_mg_kg {Almonds: 1582.0, Apples: 7.0, Baked_Potato_(N... \n", 1581 | "phosphorus_mg {Almonds: 481.0, Almonds_Unsalted: 457.0, Appl... \n", 1582 | "potassium_mg {Almonds: 733.0, Almonds_Unsalted: 692.0, Appl... \n", 1583 | "protein_g_kg {Almonds: 21.15, Almonds_Unsalted: 20.33, Appl... \n", 1584 | "riboflavin_mg {Almonds: 1.138, Almonds_Unsalted: 1.161, Appl... \n", 1585 | "selenium_mcg {Almonds: 4.1, Almonds_Unsalted: 1.9, Baked_Po... \n", 1586 | "sodium_mg {Almonds: 1.0, Almonds_Unsalted: 3.0, Apples: ... \n", 1587 | "thiamin_mg {Almonds: 0.205, Almonds_Unsalted: 0.075, Appl... \n", 1588 | "threonine_mg_kg {Almonds: 601.0, Apples: 6.0, Baked_Potato_(No... \n", 1589 | "tryptophan_mg_kg {Almonds: 211.0, Apples: 1.0, Baked_Potato_(No... \n", 1590 | "valine_mg_kg {Almonds: 855.0, Apples: 12.0, Baked_Potato_(N... \n", 1591 | "vitamin_a_mcg {Apples: 3.0, Bananas: 3.0, Broccoli: 31.0, Br... \n", 1592 | "vitamin_b6_mg {Almonds: 0.1369999999999999, Almonds_Unsalted... \n", 1593 | "vitamin_c_mg {Apples: 4.6, Baked_Potato_(No_Skin): 12.8, Ba... \n", 1594 | "vitamin_e_mg {Almonds: 25.63, Almonds_Unsalted: 23.54, Appl... \n", 1595 | "vitamin_k_mcg {Almonds_Unsalted: 3.5, Apples: 2.2, Baked_Pot... \n", 1596 | "zinc_mg {Almonds: 3.12, Almonds_Unsalted: 3.21, Apples... \n", 1597 | "\n", 1598 | " intake_value \n", 1599 | "name \n", 1600 | "calcium_mg 1174.827914 \n", 1601 | "calories_kcal 2200.000034 \n", 1602 | "choline_mg 550.000006 \n", 1603 | "copper_mg 6.759715 \n", 1604 | "fiber_g 69.593310 \n", 1605 | "fluoride_mcg 10.000000 \n", 1606 | "folate_mcg 1000.000014 \n", 1607 | "histidine_mg_kg 2142.327436 \n", 1608 | "iron_mg 33.681465 \n", 1609 | "isoleucine_mg_kg 3678.939105 \n", 1610 | "leucine_mg_kg 6131.985784 \n", 1611 | "lysine_mg_kg 4814.037326 \n", 1612 | "magnesium_mg 738.197184 \n", 1613 | "manganese_mg 7.388452 \n", 1614 | "methionine_and_cysteine_mg_kg 2562.772116 \n", 1615 | "niacin_mg 35.000000 \n", 1616 | "pantothenic_acid_mg 16.135919 \n", 1617 | "phenylalanine_and_tyrosine_mg_kg 6274.461059 \n", 1618 | "phosphorus_mg 2585.458343 \n", 1619 | "potassium_mg 13110.528043 \n", 1620 | "protein_g_kg 99.675643 \n", 1621 | "riboflavin_mg 3.856082 \n", 1622 | "selenium_mcg 88.482726 \n", 1623 | "sodium_mg 1500.000031 \n", 1624 | "thiamin_mg 3.270244 \n", 1625 | "threonine_mg_kg 3214.634927 \n", 1626 | "tryptophan_mg_kg 1138.408060 \n", 1627 | "valine_mg_kg 5313.991476 \n", 1628 | "vitamin_a_mcg 949.241139 \n", 1629 | "vitamin_b6_mg 6.282944 \n", 1630 | "vitamin_c_mg 626.162795 \n", 1631 | "vitamin_e_mg 22.615417 \n", 1632 | "vitamin_k_mcg 762.616630 \n", 1633 | "zinc_mg 14.027321 " 1634 | ] 1635 | }, 1636 | "execution_count": 9, 1637 | "metadata": {}, 1638 | "output_type": "execute_result" 1639 | } 1640 | ], 1641 | "source": [ 1642 | "problem.nutrient_table" 1643 | ] 1644 | }, 1645 | { 1646 | "cell_type": "code", 1647 | "execution_count": 10, 1648 | "id": "edeb0e69", 1649 | "metadata": {}, 1650 | "outputs": [ 1651 | { 1652 | "data": { 1653 | "text/plain": [ 1654 | "1*Almonds + 1*Almonds_Unsalted + 1*Apples + 1*Baked_Potato_(No_Skin) + 1*Bananas + 1*Beans_Pinto_Mature_Seeds_Raw + 1*Boiled_Red_Kidney_Beans + 1*Broccoli + 1*Broccoli_(Cooked) + 1*Canola_Oil + 1*Carrots + 1*Cashews_(Raw) + 1*Cashews_Unsalted + 1*Celery + 1*Chia_Seeds + 1*Chickpeas_(Garbanzo_Beans)_(Cooked) + 1*Cooked_Carrots + 1*Cooked_Celery + 1*Cooked_Eggplant + 1*Cooked_Green_Bell_Peppers + 1*Cooked_Green_Peas + 1*Cooked_Oatmeal + 1*Cooked_Onions + 1*Cooked_Red_Kidney_Beans + 1*Cooked_Tomatoes + 1*Cooked_White_Button_Mushrooms + 1*Cooked_Zucchini + 1*Cucumber + 1*Cucumber_Raw + 1*Dates_(Deglet_Noor) + 1*Dried_Figs + 1*Dried_Sunflower_Seeds + 1*Dry_Roasted_Almonds + 1*Dry_Roasted_Pistachio_Nuts + 1*Dry_Roasted_Sunflower_Seeds + 1*Eggplant + 1*Flax_Seeds + 1*Grapes + 1*Green_Bell_Peppers + 1*Hazelnuts + 1*Hemp_Seeds + 1*Kidney_Beans + 1*Lentils_(Cooked) + 1*Medjool_Dates + 1*Onions + 1*Peanut_Butter_(Chunk_Style) + 1*Peas + 1*Pinto_Beans_(Cooked) + 1*Pistachio_Nuts + 1*Pistachio_Nuts_Unsalted + 1*Potatoes_Baked_Skin_Without_Salt + 1*Raw_Peanuts + 1*Red_Or_Green_Grapes_(European) + 1*Rice_Cooked_Nfs + 1*Rice_White_Cooked_Fat_Added_In_Cooking_Made_With_Oil + 1*Seeds_Sesame_Seeds_Whole_Dried + 1*Seeds_Sunflower_Seed_Kernels_Toasted_Without_Salt + 1*Sesame_Oil + 1*Sesame_Seeds_(Toasted) + 1*Sweet_Potato_Fries_From_Fresh_Fried + 1*Tomatoes + 1*Uncooked_Oats + 1*Unsalted_Peanut_Butter_(Smooth) + 1*Walnuts + 1*Watermelon + 1*White_Button_Mushrooms + 1*White_Rice + 1*Zucchini + 0" 1655 | ] 1656 | }, 1657 | "execution_count": 10, 1658 | "metadata": {}, 1659 | "output_type": "execute_result" 1660 | } 1661 | ], 1662 | "source": [ 1663 | "problem.cost" 1664 | ] 1665 | }, 1666 | { 1667 | "cell_type": "code", 1668 | "execution_count": 11, 1669 | "id": "166af31c", 1670 | "metadata": {}, 1671 | "outputs": [ 1672 | { 1673 | "data": { 1674 | "text/plain": [ 1675 | "47.32001572" 1676 | ] 1677 | }, 1678 | "execution_count": 11, 1679 | "metadata": {}, 1680 | "output_type": "execute_result" 1681 | } 1682 | ], 1683 | "source": [ 1684 | "pl.value(problem.cost)" 1685 | ] 1686 | }, 1687 | { 1688 | "cell_type": "code", 1689 | "execution_count": 12, 1690 | "id": "f676ac5c", 1691 | "metadata": {}, 1692 | "outputs": [], 1693 | "source": [ 1694 | "x = pl.LpVariable('something')" 1695 | ] 1696 | }, 1697 | { 1698 | "cell_type": "code", 1699 | "execution_count": 13, 1700 | "id": "8bc24b25", 1701 | "metadata": {}, 1702 | "outputs": [ 1703 | { 1704 | "data": { 1705 | "text/plain": [ 1706 | "something" 1707 | ] 1708 | }, 1709 | "execution_count": 13, 1710 | "metadata": {}, 1711 | "output_type": "execute_result" 1712 | } 1713 | ], 1714 | "source": [ 1715 | "x" 1716 | ] 1717 | }, 1718 | { 1719 | "cell_type": "code", 1720 | "execution_count": 14, 1721 | "id": "af899b1c", 1722 | "metadata": {}, 1723 | "outputs": [], 1724 | "source": [ 1725 | "pl.value(x)" 1726 | ] 1727 | }, 1728 | { 1729 | "cell_type": "code", 1730 | "execution_count": null, 1731 | "id": "bf5e497a", 1732 | "metadata": {}, 1733 | "outputs": [], 1734 | "source": [] 1735 | } 1736 | ], 1737 | "metadata": { 1738 | "kernelspec": { 1739 | "display_name": "Python 3", 1740 | "language": "python", 1741 | "name": "python3" 1742 | }, 1743 | "language_info": { 1744 | "codemirror_mode": { 1745 | "name": "ipython", 1746 | "version": 3 1747 | }, 1748 | "file_extension": ".py", 1749 | "mimetype": "text/x-python", 1750 | "name": "python", 1751 | "nbconvert_exporter": "python", 1752 | "pygments_lexer": "ipython3", 1753 | "version": "3.8.10" 1754 | } 1755 | }, 1756 | "nbformat": 4, 1757 | "nbformat_minor": 5 1758 | } 1759 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # mealsolver 2 | Logic-based meal optimizer 3 | 4 | # Running examples: 5 | Open any of the .ipynb files in Jupyter Notebook. 6 | 7 | # Nutrients list 8 | fndds_nutrients.csv comes from: 9 | * https://www.ars.usda.gov/ARSUserFiles/80400530/pdf/fndds/2017_2018_FNDDS_Doc.pdf 10 | ** appendix K 11 | 12 | fnb_dri_elements.csv comes from: 13 | * https://www.ncbi.nlm.nih.gov/books/NBK545442/table/appJ_tab3/?report=objectonly 14 | 15 | fnb_dri_vitamins.csv comes from: 16 | * https://www.ncbi.nlm.nih.gov/books/NBK56068/table/summarytables.t2/?report=objectonly 17 | 18 | fnb_dri_macro.csv comes from: 19 | * https://www.ncbi.nlm.nih.gov/books/NBK56068/table/summarytables.t4/?report=objectonly 20 | 21 | fnb_ul_vitamins.csv comes from: 22 | * https://www.ncbi.nlm.nih.gov/books/NBK56068/table/summarytables.t7/?report=objectonly 23 | 24 | fnb_ul_elements.csv comes from: 25 | * https://www.ncbi.nlm.nih.gov/books/NBK545442/table/appJ_tab9/?report=objectonly 26 | 27 | 28 | # Types of nutrient recommendations: 29 | Dietary Reference Intakes (DRI): 30 | * DRI is the general term for a set of reference values used to plan and assess nutrient intakes of healthy people. 31 | * https://ods.od.nih.gov/HealthInformation/nutrientrecommendations.aspx 32 | 33 | 34 | Recommended Dietary Allowance (RDA) 35 | * Average daily level of intake sufficient to meet the nutrient requirements of nearly all (97–98%) healthy individuals; often used to plan nutritionally adequate diets for individuals. 36 | * https://ods.od.nih.gov/HealthInformation/nutrientrecommendations.aspx 37 | 38 | 39 | Adequate Intake (AI): 40 | * Intake at this level is assumed to ensure nutritional adequacy; established when evidence is insufficient to develop an RDA. 41 | * https://ods.od.nih.gov/HealthInformation/nutrientrecommendations.aspx 42 | 43 | Estimated Average Requirements (EAR): 44 | * Average daily level of intake estimated to meet the requirements of 50% of healthy individuals; usually used to assess the nutrient intakes of groups of people and to plan nutritionally adequate diets for them; can also be used to assess the nutrient intakes of individuals. 45 | * https://ods.od.nih.gov/HealthInformation/nutrientrecommendations.aspx 46 | 47 | Tolerable Upper Intake Levels (UL) 48 | * Maximum daily intake unlikely to cause adverse health effects. 49 | * https://ods.od.nih.gov/HealthInformation/nutrientrecommendations.aspx 50 | 51 | 52 | Daily Value (DV): 53 | * Recommended intakes of nutrients vary by age and sex and are known as Recommended Dietary Allowances (RDAs) and Adequate Intakes (AIs). However, one value for each nutrient, known as the Daily Value (DV), is selected for the labels of dietary supplements and foods. A DV is often, but not always, similar to one’s RDA or AI for that nutrient. DVs were developed by the U.S. Food and Drug Administration (FDA) to help consumers determine the level of various nutrients in a standard serving of food in relation to their approximate requirement for it. The label actually provides the %DV so that you can see how much (what percentage) a serving of the product contributes to reaching the DV. 54 | * https://ods.od.nih.gov/HealthInformation/nutrientrecommendations.aspx 55 | -------------------------------------------------------------------------------- /convert_sr.py: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | 3 | def read_sr(): 4 | return pd.read_csv( 5 | "USDA_SR/NUTR_DEF.txt", 6 | delimiter = "^", 7 | quotechar = "~", 8 | names=[ 9 | "Nutr_No", 10 | "Units", 11 | "Tagname", 12 | "NutrDesc", 13 | "Num_Dec", 14 | "SR_Order" 15 | ] 16 | ) 17 | 18 | def convert_sr(): 19 | df = read_sr() 20 | df.to_csv("USDA_SR_Converted/nutrients.csv") 21 | -------------------------------------------------------------------------------- /daily_intake.csv: -------------------------------------------------------------------------------- 1 | name,min,max 2 | calories_kcal,1800.0,2200.0 3 | calcium_mg,1000.0,2500.0 4 | iron_mg,8.0,45.0 5 | manganese_mg,2.3,11.0 6 | phosphorus_mg,700.0,4000.0 7 | zinc_mg,11.0,40.0 8 | vitamin_b6_mg,1.3,100.0 9 | vitamin_c_mg,90.0,2000.0 10 | choline_mg,550.0,3500.0 11 | vitamin_e_mg,15.0,1000.0 12 | niacin_mg,16.0,35.0 13 | copper_mg,0.9,10.0 14 | fluoride_mcg,4.0,10.0 15 | iodine_mcg,150.0,1100.0 16 | molybdenum_mcg,45.0,2000.0 17 | chloride_g,2.3,3.6 18 | selenium_mcg,55.0,400.0 19 | folate_mcg,400.0,1000.0 20 | vitamin_a_mcg,900.0,3000.0 21 | vitamin_d_iu,600.0,4000.0 22 | chromium_mcg,35.0, 23 | magnesium_mg,400.0, 24 | potassium_mg,3400.0, 25 | sodium_mg,1500.0, 26 | biotin_mcg,30.0, 27 | vitamin_b12_mcg,2.4, 28 | vitamin_k_mcg,120.0, 29 | thiamin_mg,1.2, 30 | riboflavin_mg,1.3, 31 | pantothenic_acid_mg,5.0, 32 | alpha_linolenic_acid_g,1.6, 33 | linoleic_acid_g,17.0, 34 | histidine_mg_kg,14.0, 35 | isoleucine_mg_kg,19.0, 36 | leucine_mg_kg,42.0, 37 | lysine_mg_kg,38.0, 38 | methionine_and_cysteine_mg_kg,19.0, 39 | phenylalanine_and_tyrosine_mg_kg,33.0, 40 | threonine_mg_kg,20.0, 41 | tryptophan_mg_kg,5.0, 42 | valine_mg_kg,24.0, 43 | fiber_g,38.0, 44 | protein_g_kg,0.8, -------------------------------------------------------------------------------- /example.txt: -------------------------------------------------------------------------------- 1 | andrewdo@ai2:~/meal-planner/new$ python3 2 | Python 3.7.3 (default, Jul 25 2020, 13:03:44) 3 | [GCC 8.3.0] on linux 4 | Type "help", "copyright", "credits" or "license" for more information. 5 | >>> import program 6 | 1: calcium_mg: Optimal 7 | 2: calories_kcal: Optimal 8 | 3: choline_mg: Optimal 9 | 4: copper_mg: Optimal 10 | 5: fiber_g: Optimal 11 | 6: fluoride_mcg: Optimal 12 | 7: folate_mcg: Optimal 13 | 8: histidine_mg_kg: Optimal 14 | 9: iron_mg: Optimal 15 | 10: isoleucine_mg_kg: Optimal 16 | 11: leucine_mg_kg: Optimal 17 | 12: lysine_mg_kg: Optimal 18 | 13: magnesium_mg: Optimal 19 | 14: manganese_mg: Optimal 20 | 15: methionine_and_cysteine_mg_kg: Optimal 21 | 16: niacin_mg: Optimal 22 | 17: pantothenic_acid_mg: Optimal 23 | 18: phenylalanine_and_tyrosine_mg_kg: Optimal 24 | 19: phosphorus_mg: Optimal 25 | 20: potassium_mg: Optimal 26 | 21: protein_g_kg: Optimal 27 | 22: riboflavin_mg: Optimal 28 | 23: selenium_mcg: Optimal 29 | 24: sodium_mg: Optimal 30 | 25: thiamin_mg: Optimal 31 | 26: threonine_mg_kg: Optimal 32 | 27: tryptophan_mg_kg: Optimal 33 | 28: valine_mg_kg: Optimal 34 | 29: vitamin_a_mcg: Optimal 35 | 30: vitamin_b6_mg: Optimal 36 | 31: vitamin_c_mg: Optimal 37 | 32: vitamin_e_mg: Optimal 38 | 33: vitamin_k_mcg: Optimal 39 | >>> program.full_example() 40 | name amount 41 | 32 Dry Roasted Pistachio Nuts 2.421314 42 | 45 Broccoli (Cooked) 0.518573 43 | 49 Cooked Celery 13.191981 44 | 54 Cooked Tomatoes 21.014955 45 | 57 Cucumber 6.096698 46 | 66 White Button Mushrooms 4.076494 47 | >>> 48 | -------------------------------------------------------------------------------- /fnb_dri_elements.csv: -------------------------------------------------------------------------------- 1 | Life-Stage Group,Group,Calcium (mg/d),Chromium (μg/d),Copper (μg/d),Fluoride (mg/d),Iodine (μg/d),Iron (mg/d),Magnesium (mg/d),Manganese (mg/d),Molybdenum (μg/d),Phosphorus (mg/d),Selenium (μg/d),Zinc (mg/d),Potassium (mg/d),Sodium (mg/d),Chloride (g/d) 2 | 0–6 mo,Infants,200*a,0.2*,200*,0.01*,110*,0.27*,30*,0.003*,2*,100*,15*,2*,400*,110*,0.18* 3 | 7–12 mo,Infants,260*a,5.5*,220*,0.5*,130*,11,75*,0.6*,3*,275*,20*,3,860*,370*,0.57* 4 | 1–3 y,Children,700,11*,340,0.7*,90,7,80,1.2*,17,460,20,3,"2,000*",800*,1.5* 5 | 4–8 y,Children,1000,15*,440,1*,90,10,130,1.5*,22,500,30,5,"2,300*","1,000*",1.9* 6 | 9–13 y,Males,1300,25*,700,2*,120,8,240,1.9*,34,1250,40,8,"2,500*","1,200*",2.3* 7 | 14–18 y,Males,1300,35*,890,3*,150,11,410,2.2*,43,1250,55,11,"3,000*","1,500*",2.3* 8 | 19–30 y,Males,1000,35*,900,4*,150,8,400,2.3*,45,700,55,11,"3,400*","1,500*",2.3* 9 | 31–50 y,Males,1000,35*,900,4*,150,8,420,2.3*,45,700,55,11,"3,400*","1,500*",2.3* 10 | 51–70 y,Males,1000,30*,900,4*,150,8,420,2.3*,45,700,55,11,"3,400*","1,500*",2.0* 11 | > 70 y,Males,1200,30*,900,4*,150,8,420,2.3*,45,700,55,11,"3,400*","1,500*",1.8* 12 | 9–13 y,Females,1300,21*,700,2*,120,8,240,1.6*,34,1250,40,8,"2,300*","1,200*",2.3* 13 | 14–18 y,Females,1300,24*,890,3*,150,15,360,1.6*,43,1250,55,9,"2,300*","1,500*",2.3* 14 | 19–30 y,Females,1000,25*,900,3*,150,18,310,1.8*,45,700,55,8,"2,600*","1,500*",2.3* 15 | 31–50 y,Females,1000,25*,900,3*,150,18,320,1.8*,45,700,55,8,"2,600*","1,500*",2.3* 16 | 51–70 y,Females,1200,20*,900,3*,150,8,320,1.8*,45,700,55,8,"2,600*","1,500*",2.0* 17 | > 70 y,Females,1200,20*,900,3*,150,8,320,1.8*,45,700,55,8,"2,600*","1,500*",1.8* 18 | 14–18 y,"Females, pregnancy",1300,29*,1000,3*,220,27,400,2.0*,50,1250,60,12,"2,600*","1,500*",2.3* 19 | 19–30 y,"Females, pregnancy",1000,30*,1000,3*,220,27,350,2.0*,50,700,60,11,"2,900*","1,500*",2.3* 20 | 31–50 y,"Females, pregnancy",1000,30*,1000,3*,220,27,360,2.0*,50,700,60,11,"2,900*","1,500*",2.3* 21 | 14–18 y,"Females, lactation",1300,44*,1300,3*,290,10,360,2.6*,50,1250,70,13,"2,500*","1,500*",2.3* 22 | 19–30 y,"Females, lactation",1000,45*,1300,3*,290,9,310,2.6*,50,700,70,12,"2,800*","1,500*",2.3* 23 | 31–50 y,"Females, lactation",1000,45*,1300,3*,290,9,320,2.6*,50,700,70,12,"2,800*","1,500*",2.3* 24 | -------------------------------------------------------------------------------- /fnb_dri_macro.csv: -------------------------------------------------------------------------------- 1 | "Life Stage Group",Group,"Total Watera(L/d)","Carbohydrate (g/d)","Total Fiber(g/d)","Fat(g/d)","Linoleic Acid(g/d)","α-Linolenic Acid(g/d)","Proteinb(g/d)" 2 |  0–6 mo,Infants,0.7*,60*,ND,31*,4.4*,0.5*,9.1* 3 |  6–12 mo,Infants,0.8*,95*,ND,30*,4.6*,0.5*,11 4 |  1–3 y,Children,1.3*,130,19*,NDc,7*,0.7*,13 5 |  4–8 y,Children,1.7*,130,25*,ND,10*,0.9*,19 6 |  9–13 y,Males,2.4*,130,31*,ND,12*,1.2*,34 7 |  14–18 y,Males,3.3*,130,38*,ND,16*,1.6*,52 8 |  19–30 y,Males,3.7*,130,38*,ND,17*,1.6*,56 9 |  31–50 y,Males,3.7*,130,38*,ND,17*,1.6*,56 10 |  51–70 y,Males,3.7*,130,30*,ND,14*,1.6*,56 11 |  > 70 y,Males,3.7*,130,30*,ND,14*,1.6*,56 12 |  9–13 y,Females,2.1*,130,26*,ND,10*,1.0*,34 13 |  14–18 y,Females,2.3*,130,26*,ND,11*,1.1*,46 14 |  19–30 y,Females,2.7*,130,25*,ND,12*,1.1*,46 15 |  31–50 y,Females,2.7*,130,25*,ND,12*,1.1*,46 16 |  51–70 y,Females,2.7*,130,21*,ND,11*,1.1*,46 17 |  > 70 y,Females,2.7*,130,21*,ND,11*,1.1*,46 18 |  14–18 y,"Females, pregnancy",3.0*,175,28*,ND,13*,1.4*,71 19 |  19–30 y,"Females, pregnancy",3.0*,175,28*,ND,13*,1.4*,71 20 |  31–50 y,"Females, pregnancy",3.0*,175,28*,ND,13*,1.4*,71 21 |  14–18,"Females, lactation",3.8*,210,29*,ND,13*,1.3*,71 22 |  19–30 y,"Females, lactation",3.8*,210,29*,ND,13*,1.3*,71 23 |  31–50 y,"Females, lactation",3.8*,210,29*,ND,13*,1.3*,71 24 | -------------------------------------------------------------------------------- /fnb_dri_vitamins.csv: -------------------------------------------------------------------------------- 1 | "Life Stage Group",Group,"Vitamin A(μg/d)a","Vitamin C(mg/d)","Vitamin D(μg/d)b,c","Vitamin E(mg/d)d","Vitamin K(μg/d)","Thiamin(mg/d)","Riboflavin(mg/d)","Niacin(mg/d)e","Vitamin B6(mg/d)","Folate(μg/d)f","Vitamin B12(μg/d)","Pantothenic Acid(mg/d)","Biotin(μg/d)","Choline(mg/d)g" 2 |  0–6 mo,Infants,400*,40*,10*,4*,2.0*,0.2*,0.3*,2*,0.1*,65*,0.4*,1.7*,5*,125* 3 |  6–12 mo,Infants,500*,50*,10*,5*,2.5*,0.3*,0.4*,4*,0.3*,80*,0.5*,1.8*,6*,150* 4 |  1–3 y,Children,300,15,15,6,30*,0.5,0.5,6,0.5,150,0.9,2*,8*,200* 5 |  4–8 y,Children,400,25,15,7,55*,0.6,0.6,8,0.6,200,1.2,3*,12*,250* 6 |  9–13 y,Males,600,45,15,11,60*,0.9,0.9,12,1,300,1.8,4*,20*,375* 7 |  14–18 y,Males,900,75,15,15,75*,1.2,1.3,16,1.3,400,2.4,5*,25*,550* 8 |  19–30 y,Males,900,90,15,15,120*,1.2,1.3,16,1.3,400,2.4,5*,30*,550* 9 |  31–50 y,Males,900,90,15,15,120*,1.2,1.3,16,1.3,400,2.4,5*,30*,550* 10 |  51–70 y,Males,900,90,15,15,120*,1.2,1.3,16,1.7,400,2.4h,5*,30*,550* 11 |  > 70 y,Males,900,90,20,15,120*,1.2,1.3,16,1.7,400,2.4h,5*,30*,550* 12 |  9–13 y,Females,600,45,15,11,60*,0.9,0.9,12,1,300,1.8,4*,20*,375* 13 |  14–18 y,Females,700,65,15,15,75*,1,1,14,1.2,400i,2.4,5*,25*,400* 14 |  19–30 y,Females,700,75,15,15,90*,1.1,1.1,14,1.3,400i,2.4,5*,30*,425* 15 |  31–50 y,Females,700,75,15,15,90*,1.1,1.1,14,1.3,400i,2.4,5*,30*,425* 16 |  51–70 y,Females,700,75,15,15,90*,1.1,1.1,14,1.5,400,2.4h,5*,30*,425* 17 |  > 70 y,Females,700,75,20,15,90*,1.1,1.1,14,1.5,400,2.4h,5*,30*,425* 18 |  14–18 y,"Females, pregnancy",750,80,15,15,75*,1.4,1.4,18,1.9,600j,2.6,6*,30*,450* 19 |  19–30 y,"Females, pregnancy",770,85,15,15,90*,1.4,1.4,18,1.9,600j,2.6,6*,30*,450* 20 |  31–50 y,"Females, pregnancy",770,85,15,15,90*,1.4,1.4,18,1.9,600j,2.6,6*,30*,450* 21 |  14–18 y,"Females, lactation",1200,115,15,19,75*,1.4,1.6,17,2,500,2.8,7*,35*,550* 22 |  19–30 y,"Females, lactation",1300,120,15,19,90*,1.4,1.6,17,2,500,2.8,7*,35*,550* 23 |  31–50 y,"Females, lactation",1300,120,15,19,90*,1.4,1.6,17,2,500,2.8,7*,35*,550* 24 | -------------------------------------------------------------------------------- /fnb_ul_elements.csv: -------------------------------------------------------------------------------- 1 | Life-Stage Group,Group,Arsenica,Boron (mg/d),Calcium (mg/d),Chromium,Copper (μg/d),Fluoride (mg/d),Iodine (μg/d),Iron (mg/d),Magnesium (mg/d)b,Manganese (mg/d),Molybdenum (μg/d),Nickel (mg/d),Phosphorus (g/d),Potassium,Selenium (μg/d),Siliconc,Sulfate,Vanadium (mg/d)d,Zinc (mg/d),Sodiume,Chloride (g/d) 2 | 0–6 mo,Infants,NDf,ND,"1,000g",ND,ND,0.7,ND,40,ND,ND,ND,ND,ND,NDh,45,ND,ND,ND,4,NDh,ND 3 | 7–12 mo,Infants,ND,ND,"1,500g",ND,ND,0.9,ND,40,ND,ND,ND,ND,ND,NDh,60,ND,ND,ND,5,NDh,ND 4 | 1–3 y,Children,ND,3,2500,ND,1000,1.3,200,40,65,2,300,0.2,3,NDh,90,ND,ND,ND,7,NDh,2.3 5 | 4–8 y,Children,ND,6,2500,ND,3000,2.2,300,40,110,3,600,0.3,3,NDh,150,ND,ND,ND,12,NDh,2.9 6 | 9–13 y,Males,ND,11,3000,ND,5000,10,600,40,350,6,1100,0.6,4,NDh,280,ND,ND,ND,23,NDh,3.4 7 | 14–18 y,Males,ND,17,3 000,ND,8 000,10,900,45,350,9,1 700,1,4,NDh,400,ND,ND,ND,34,NDh,3.6 8 | 19–30 y,Males,ND,20,2500,ND,10000,10,1100,45,350,11,2000,1,4,NDh,400,ND,ND,1.8,40,NDh,3.6 9 | 31–50 y,Males,ND,20,2500,ND,10000,10,1100,45,350,11,2000,1,4,NDh,400,ND,ND,1.8,40,NDh,3.6 10 | 51–70 y,Males,ND,20,2000,ND,10000,10,1100,45,350,11,2000,1,4,NDh,400,ND,ND,1.8,40,NDh,3.6 11 | > 70 y,Males,ND,20,2000,ND,10000,10,1100,45,350,11,2000,1,3,NDh,400,ND,ND,1.8,40,NDh,3.6 12 | 9–13 y,Females,ND,11,3000,ND,5000,10,600,40,350,6,1100,0.6,4,NDh,280,ND,ND,ND,23,NDh,3.4 13 | 14–18 y,Females,ND,17,3000,ND,8000,10,900,45,350,9,1700,1,4,NDh,400,ND,ND,ND,34,NDh,3.6 14 | 19–30 y,Females,ND,20,2500,ND,10000,10,1100,45,350,11,2000,1,4,NDh,400,ND,ND,1.8,40,NDh,3.6 15 | 31–50 y,Females,ND,20,2500,ND,10000,10,1100,45,350,11,2000,1,4,NDh,400,ND,ND,1.8,40,NDh,3.6 16 | 51–70 y,Females,ND,20,2000,ND,10000,10,1100,45,350,11,2000,1,4,NDh,400,ND,ND,1.8,40,NDh,3.6 17 | > 70 y,Females,ND,20,2000,ND,10000,10,1100,45,350,11,2000,1,3,NDh,400,ND,ND,1.8,40,NDh,3.6 18 | 14–18 y,"Females, pregnancy",ND,17,3000,ND,8000,10,900,45,350,9,1700,1,3.5,NDh,400,ND,ND,ND,34,NDh,3.6 19 | 19–30 y,"Females, pregnancy",ND,20,2500,ND,10000,10,1100,45,350,11,2000,1,3.5,NDh,400,ND,ND,ND,40,NDh,3.6 20 | 31–50 y,"Females, pregnancy",ND,20,2500,ND,10000,10,1100,45,350,11,2000,1,3.5,NDh,400,ND,ND,ND,40,NDh,3.6 21 | 14–18 y,"Females, lactation",ND,17,3000,ND,8000,10,900,45,350,9,1700,1,4,NDh,400,ND,ND,ND,34,NDh,3.6 22 | 19–30 y,"Females, lactation",ND,20,2500,ND,10000,10,1100,45,350,11,2000,1,4,NDh,400,ND,ND,ND,40,NDh,3.6 23 | 31−50 y,"Females, lactation",ND,20,2500,ND,10000,10,1100,45,350,11,2000,1,4,NDh,400,ND,ND,ND,40,NDh,3.6 24 | -------------------------------------------------------------------------------- /fnb_ul_vitamins.csv: -------------------------------------------------------------------------------- 1 | "Life Stage Group",Group,"Vitamin A(μg/d)a","Vitamin C(mg/d)","Vitamin D(μg/d)","Vitamin E(mg/d)b,c",Vitamin K,Thiamin,Riboflavin,"Niacin(mg/d)c","Vitamin B6(mg/d)","Folate(μg/d)c",Vitamin B12,Pantothenic Acid,Biotin,"Choline(g/d)",Carotenoidsd 2 |  0–6 mo,Infants,600,NDe,25,ND,ND,ND,ND,ND,ND,ND,ND,ND,ND,ND,ND 3 |  6–12 mo,Infants,600,ND,38,ND,ND,ND,ND,ND,ND,ND,ND,ND,ND,ND,ND 4 |  1–3 y,Children,600,400,63,200,ND,ND,ND,10,30,300,ND,ND,ND,1,ND 5 |  4–8 y,Children,900,650,75,300,ND,ND,ND,15,40,400,ND,ND,ND,1,ND 6 |  9–13 y,Males,1700,1200,100,600,ND,ND,ND,20,60,600,ND,ND,ND,2,ND 7 |  14–18 y,Males,2800,1800,100,800,ND,ND,ND,30,80,800,ND,ND,ND,3,ND 8 |  19–30 y,Males,3000,2000,100,1000,ND,ND,ND,35,100,1000,ND,ND,ND,3.5,ND 9 |  31–50 y,Males,3000,2000,100,1000,ND,ND,ND,35,100,1000,ND,ND,ND,3.5,ND 10 |  51–70 y,Males,3000,2000,100,1000,ND,ND,ND,35,100,1000,ND,ND,ND,3.5,ND 11 |  > 70 y,Males,3000,2000,100,1000,ND,ND,ND,35,100,1000,ND,ND,ND,3.5,ND 12 |  9–13 y,Females,1700,1200,100,600,ND,ND,ND,20,60,600,ND,ND,ND,2,ND 13 |  14–18 y,Females,2800,1800,100,800,ND,ND,ND,30,80,800,ND,ND,ND,3,ND 14 |  19–30 y,Females,3000,2000,100,1000,ND,ND,ND,35,100,1000,ND,ND,ND,3.5,ND 15 |  31–50 y,Females,3000,2000,100,1000,ND,ND,ND,35,100,1000,ND,ND,ND,3.5,ND 16 |  51–70 y,Females,3000,2000,100,1000,ND,ND,ND,35,100,1000,ND,ND,ND,3.5,ND 17 |  > 70 y,Females,3000,2000,100,1000,ND,ND,ND,35,100,1000,ND,ND,ND,3.5,ND 18 |  14–18 y,"Females, pregnancy",2800,1800,100,800,ND,ND,ND,30,80,800,ND,ND,ND,3,ND 19 |  19–30 y,"Females, pregnancy",3000,2000,100,1000,ND,ND,ND,35,100,1000,ND,ND,ND,3.5,ND 20 |  31–50 y,"Females, pregnancy",3000,2000,100,1000,ND,ND,ND,35,100,1000,ND,ND,ND,3.5,ND 21 |  14–18 y,"Females, lactation",2800,1800,100,800,ND,ND,ND,30,80,800,ND,ND,ND,3,ND 22 |  19–30 y,"Females, lactation",3000,2000,100,1000,ND,ND,ND,35,100,1000,ND,ND,ND,3.5,ND 23 |  31–50 y,"Females, lactation",3000,2000,100,1000,ND,ND,ND,35,100,1000,ND,ND,ND,3.5,ND 24 | -------------------------------------------------------------------------------- /fndds_nutrients.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aindilis/mealsolver/7e7ef27d675f83ca3a6360a56a287ae2d044ae08/fndds_nutrients.csv -------------------------------------------------------------------------------- /foods.csv: -------------------------------------------------------------------------------- 1 | name,food_group,calories_kcal,fat_g,protein_g_kg,carbohydrate_g,sugars_g,fiber_g,cholesterol_mg,saturated_fats_g,calcium_mg,iron_mg,potassium_mg,magnesium_mg,vitamin_a_iu,vitamin_a_mcg,vitamin_c_mg,vitamin_b12_mcg,vitamin_d_mcg,vitamin_e_mg,added_sugar_g,net_carbs_g,water_g,omega_3s_mg,omega_6s_mg,pral_score,trans_fatty_acids_g,soluble_fiber_g,insoluble_fiber_g,sucrose_g,glucose_dextrose_g,fructose_g,lactose_g,maltose_g,galactose_g,starch_g,total_sugar_alcohols_g,phosphorus_mg,sodium_mg,zinc_mg,copper_mg,manganese_mg,selenium_mcg,fluoride_mcg,molybdenum_mcg,chlorine_mg,thiamin_mg,riboflavin_mg,niacin_mg,pantothenic_acid_mg,vitamin_b6_mg,biotin_mcg,folate_mcg,folic_acid_mcg,food_folate_mcg,folate_mcg_1,choline_mg,betaine_mg,retinol_mcg,carotene_beta_mcg,carotene_alpha_mcg,lycopene_mcg,lutein_and_zeaxanthin_mcg,vitamin_d2_mcg,vitamin_d3_mcg,vitamin_d_iu,vitamin_k_mcg,dihydrophylloquinone_mcg,menaquinone_4_mcg,fatty_acids_total_monounsaturated_mg,fatty_acids_total_polyunsaturated_mg,ala_mg,epa_mg,dpa_mg,dha_mg,tryptophan_mg_kg,threonine_mg_kg,isoleucine_mg_kg,leucine_mg_kg,lysine_mg_kg,valine_mg_kg,arginine_mg,histidine_mg_kg,alanine_mg,aspartic_acid_mg,glutamic_acid_mg,glycine_mg,proline_mg,serine_mg,hydroxyproline_mg,alcohol_g,caffeine_mg,theobromine_mg,200_calorie_weight_g,phenylalanine_and_tyrosine_mg_kg,methionine_and_cysteine_mg_kg 2 | Beans Pinto Mature Seeds Raw,Beans and Lentils,347,1.23,21.42,62.55,2.11,15.5,0.0,0.235,113.0,5.07,1393.0,176.0,0.0,0.0,6.3,0.0,0.0,0.21,,47.05,11.33,237.0,170.0,-9.787,0.0,,,1.98,0.13,0.0,0.0,0.0,0.0,34.17,,411.0,12.0,2.28,0.893,1.148,27.9,,,,0.713,0.212,1.1740000000000002,0.785,0.474,,525.0,0.0,525.0,525.0,66.2,0.4,0.0,0.0,0.0,0.0,0.0,,,0.0,5.6,0.0,,229.0,407.0,,0.0,0.0,0.0,237.0,810.0,871.0,1558.0,1356.0,998.0,1096.0,556.0,872.0,2268.0,3027.0,796.0,1072.0,1171.0,,0.0,0.0,0.0,57.637,1522.0,446.0 3 | Boiled Red Kidney Beans,Beans and Lentils,123,0.17,9.49,21.85,,9.3,0.0,0.024,44.0,2.77,378.0,42.0,3.0,0.0,1.2,0.0,0.0,,,12.55,66.99,57.0,36.0,0.252,0.0,,,,,,,,,,,142.0,5.0,0.9,0.262,0.255,1.2,,,,0.095,0.067,0.552,0.219,0.104,,74.0,0.0,74.0,74.0,,,0.0,,,,,,,0.0,,,,13.0,93.0,,,,,112.0,399.0,419.0,757.0,651.0,496.0,587.0,264.0,398.0,1148.0,1447.0,370.0,402.0,516.0,,,,,162.602,780.0,246.0 4 | Chickpeas (Garbanzo Beans) (Cooked),Beans and Lentils,164,2.59,8.86,27.42,4.8,7.6,0.0,0.269,49.0,2.89,291.0,48.0,27.0,1.0,1.3,0.0,0.0,0.35,,19.82,60.21,43.0,1113.0,2.518,0.0,,,,,,,,,,,168.0,7.0,1.53,0.35200000000000004,1.03,3.7,,,,0.116,0.063,0.526,0.28600000000000003,0.139,,172.0,0.0,172.0,172.0,42.8,,0.0,16.0,0.0,0.0,0.0,,,0.0,4.0,,,583.0,1156.0,,0.0,0.0,0.0,85.0,329.0,380.0,631.0,593.0,372.0,835.0,244.0,380.0,1042.0,1550.0,369.0,366.0,447.0,,0.0,0.0,0.0,121.951,695.0,235.0 5 | Cooked Red Kidney Beans,Beans and Lentils,127,0.5,8.67,22.8,0.32,7.4,0.0,0.07200000000000001,28.0,2.94,403.0,45.0,0.0,0.0,1.2,0.0,0.0,0.03,,15.4,66.94,168.0,107.0,-0.5489999999999999,0.0,,,,,,,,,,,142.0,2.0,1.07,0.242,0.477,1.2,,,,0.16,0.058,0.578,0.22,0.12,,130.0,0.0,130.0,130.0,30.5,,0.0,0.0,0.0,0.0,0.0,,,0.0,8.4,,,39.0,275.0,,0.0,0.0,0.0,103.0,365.0,383.0,693.0,595.0,454.0,537.0,242.0,364.0,1049.0,1323.0,339.0,368.0,472.0,,0.0,0.0,0.0,157.48,713.0,224.0 6 | Kidney Beans,Beans and Lentils,127,0.5,8.67,22.8,0.32,6.4,0.0,0.073,35.0,2.22,405.0,42.0,0.0,0.0,1.2,0.0,0.0,0.03,,16.4,66.94,170.0,108.0,-0.7509999999999999,0.0,,,,,,,,,,,138.0,1.0,1.0,0.21600000000000005,0.43,1.1,,,,0.16,0.058,0.578,0.22,0.12,,130.0,0.0,130.0,130.0,30.5,0.1,0.0,0.0,0.0,0.0,0.0,,,0.0,8.4,,,39.0,278.0,,0.0,0.0,0.0,104.0,319.0,410.0,736.0,607.0,500.0,475.0,238.0,394.0,1086.0,1393.0,351.0,496.0,544.0,,0.0,0.0,0.0,157.48,716.0,194.0 7 | Lentils (Cooked),Beans and Lentils,116,0.38,9.02,20.13,1.8,7.9,0.0,0.053,19.0,3.33,369.0,36.0,8.0,0.0,1.5,0.0,0.0,0.11,,12.23,69.64,37.0,137.0,2.1,0.0,,,,,,,,,,,180.0,2.0,1.27,0.251,0.494,2.8,,,,0.16899999999999998,0.073,1.06,0.638,0.17800000000000002,,181.0,0.0,181.0,181.0,32.7,,0.0,5.0,0.0,0.0,0.0,,,0.0,1.7,,,64.0,175.0,,0.0,0.0,0.0,81.0,323.0,390.0,654.0,630.0,448.0,697.0,254.0,377.0,998.0,1399.0,367.0,377.0,416.0,,0.0,0.0,0.0,172.41400000000004,686.0,195.0 8 | Peanut Butter (Chunk Style),Beans and Lentils,589,49.94,24.06,21.57,8.41,8.0,0.0,7.607,45.0,1.9,745.0,160.0,0.0,0.0,0.0,0.0,0.0,6.3,,13.57,1.14,78.0,13854.0,3.08,,,,4.19,4.22,0.0,0.0,0.0,0.0,4.93,,319.0,17.0,2.79,0.578,1.8,8.2,3.1,,,0.106,0.111,13.696,1.118,0.418,,92.0,0.0,92.0,92.0,61.3,1.0,0.0,0.0,0.0,0.0,0.0,,,0.0,0.5,0.5,,23123.0,13932.0,,0.0,0.0,0.0,228.0,518.0,608.0,1525.0,671.0,772.0,2731.0,550.0,903.0,3012.0,5023.0,1417.0,1389.0,1461.0,40.0,0.0,0.0,0.0,33.956,2003.0,488.0 9 | Pinto Beans (Cooked),Beans and Lentils,143,0.65,9.01,26.22,0.34,9.0,0.0,0.136,46.0,2.09,436.0,50.0,0.0,0.0,0.8,0.0,0.0,0.94,,17.22,62.95,137.0,98.0,-1.259,0.0,,,0.34,0.0,0.0,0.0,0.0,0.0,15.15,,147.0,1.0,0.98,0.219,0.453,6.2,2.2,,,0.193,0.062,0.318,0.21,0.229,,172.0,0.0,172.0,172.0,35.3,0.1,0.0,0.0,0.0,0.0,0.0,,,0.0,3.5,0.0,,133.0,235.0,,0.0,0.0,0.0,108.0,331.0,426.0,765.0,630.0,519.0,494.0,247.0,409.0,1128.0,1447.0,365.0,515.0,565.0,,0.0,0.0,0.0,139.86,744.0,201.0 10 | Raw Peanuts,Beans and Lentils,567,49.24,25.8,16.13,4.72,8.5,0.0,6.279,92.0,4.58,705.0,168.0,0.0,0.0,0.0,0.0,0.0,8.33,,7.63,6.5,3.0,15555.0,6.064,0.0,,,,,,,,,,,376.0,18.0,3.27,1.144,1.934,7.2,,,,0.64,0.135,12.066,1.767,0.348,,240.0,0.0,240.0,240.0,52.5,0.6,0.0,0.0,0.0,0.0,0.0,,,0.0,0.0,,,24426.0,15558.0,,0.0,0.0,0.0,250.0,883.0,907.0,1672.0,926.0,1082.0,3085.0,652.0,1025.0,3146.0,5390.0,1554.0,1138.0,1271.0,,0.0,0.0,0.0,35.273,2426.0,648.0 11 | Unsalted Peanut Butter (Smooth),Beans and Lentils,598,51.36,22.21,22.31,10.49,5.0,0.0,10.325,49.0,1.74,558.0,168.0,0.0,0.0,0.0,0.0,0.0,9.1,,17.31,1.23,37.0,12284.0,6.449,0.075,,,10.25,0.13,0.12,0.0,0.0,0.0,3.56,,335.0,17.0,2.51,0.422,1.665,4.1,,,,0.15,0.192,13.112,1.137,0.441,,87.0,0.0,87.0,87.0,63.0,0.8,0.0,0.0,0.0,0.0,0.0,,,0.0,0.3,,,25941.0,12535.0,27.0,0.0,0.0,0.0,231.0,525.0,616.0,1546.0,681.0,782.0,2768.0,557.0,916.0,3054.0,5092.0,1437.0,1408.0,1481.0,,0.0,0.0,0.0,33.445,2031.0,494.0 12 | Canola Oil,Fats and Oils,884,100.0,0.0,0.0,0.0,0.0,0.0,7.365,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,17.46,,0.0,0.0,9137.0,19005.0,0.0,0.395,,,,,,,,,,,0.0,0.0,0.0,0.0,0.0,0.0,,,,0.0,0.0,0.0,0.0,0.0,,0.0,0.0,0.0,0.0,0.2,0.0,0.0,0.0,0.0,0.0,0.0,,,0.0,71.3,0.0,0.0,63276.0,28142.0,9137.0,0.0,0.0,0.0,,,,,,,,,,,,,,,,0.0,0.0,0.0,22.624,0.0,0.0 13 | Sesame Oil,Fats and Oils,884,100.0,0.0,0.0,0.0,0.0,0.0,14.2,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.4,,0.0,0.0,300.0,41300.0,0.0,,,,,,,,,,,,0.0,0.0,0.0,0.0,,0.0,,,,0.0,0.0,0.0,0.0,0.0,,0.0,0.0,0.0,0.0,0.2,,0.0,0.0,0.0,0.0,0.0,,,0.0,13.6,,,39700.0,41700.0,,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,,0.0,0.0,0.0,22.624,0.0,0.0 14 | Apples,Fruits,52,0.17,0.26,13.81,10.39,2.4,0.0,0.028,6.0,0.12,107.0,5.0,54.0,3.0,4.6,0.0,0.0,0.18,,11.41,85.56,9.0,43.0,-1.933,0.0,,,2.07,2.43,5.9,0.0,0.0,0.0,0.05,,11.0,1.0,0.04,0.027000000000000003,0.035,0.0,3.3,,,0.017,0.026,0.091,0.061,0.041,,3.0,0.0,3.0,3.0,3.4,0.1,0.0,27.0,0.0,0.0,29.0,,,0.0,2.2,0.0,,7.0,51.0,,0.0,0.0,0.0,1.0,6.0,6.0,13.0,12.0,12.0,6.0,5.0,11.0,70.0,25.0,9.0,6.0,10.0,,0.0,0.0,0.0,384.615,7.0,2.0 15 | Bananas,Fruits,89,0.33,1.09,22.84,12.23,2.6,0.0,0.112,5.0,0.26,358.0,27.0,64.0,3.0,8.7,0.0,0.0,0.1,,20.24,74.91,27.0,46.0,-6.981,0.0,,,2.39,4.98,4.85,0.0,0.01,0.0,5.38,,22.0,1.0,0.15,0.078,0.27,1.0,2.2,,,0.031,0.073,0.665,0.334,0.3670000000000001,,20.0,0.0,20.0,20.0,9.8,0.1,0.0,26.0,25.0,0.0,22.0,,,0.0,0.5,0.0,,32.0,73.0,,0.0,0.0,0.0,9.0,28.0,28.0,68.0,50.0,47.0,49.0,77.0,40.0,124.0,152.0,38.0,28.0,40.0,,0.0,0.0,0.0,224.719,58.0,17.0 16 | Dates (Deglet Noor),Fruits,282,0.39,2.45,75.03,63.35,8.0,0.0,0.032,39.0,1.02,656.0,43.0,10.0,0.0,0.4,0.0,0.0,0.05,,67.03,20.53,3.0,16.0,-11.985,0.0,,,23.84,19.87,19.56,0.0,0.12,0.0,,,62.0,2.0,0.29,0.206,0.262,3.0,,,,0.052000000000000005,0.066,1.274,0.589,0.165,,19.0,0.0,19.0,19.0,6.3,0.4,0.0,6.0,0.0,0.0,75.0,,,0.0,2.7,0.0,,36.0,19.0,,0.0,0.0,0.0,12.0,43.0,49.0,84.0,66.0,71.0,136.0,32.0,83.0,213.0,359.0,101.0,130.0,57.0,,0.0,0.0,0.0,70.922,65.0,89.0 17 | Dried Figs,Fruits,249,0.93,3.3,63.87,47.92,9.8,0.0,0.14400000000000002,162.0,2.03,680.0,68.0,10.0,0.0,1.2,0.0,0.0,0.35,,54.07,30.05,0.0,345.0,-14.146,,,,0.07,24.79,22.93,0.0,0.0,0.13,5.07,,67.0,10.0,0.55,0.287,0.51,0.6,,,,0.085,0.08199999999999999,0.619,0.434,0.106,,9.0,0.0,9.0,9.0,15.8,0.7,0.0,6.0,0.0,0.0,32.0,,,0.0,15.6,0.0,,159.0,345.0,,0.0,0.0,0.0,20.0,85.0,89.0,128.0,88.0,122.0,77.0,37.0,134.0,645.0,295.0,108.0,610.0,128.0,,0.0,0.0,0.0,80.321,117.0,70.0 18 | Grapes,Fruits,67,0.35,0.63,17.15,16.25,0.9,0.0,0.114,14.0,0.29,191.0,5.0,100.0,5.0,4.0,0.0,0.0,0.19,,16.25,81.3,24.0,79.0,-3.665,0.0,,,,,,,,,,,10.0,2.0,0.04,0.04,0.718,0.1,,,,0.092,0.057,0.3,0.024,0.11,,4.0,0.0,4.0,4.0,5.6,,0.0,59.0,1.0,0.0,72.0,,,0.0,14.6,,,14.0,102.0,,0.0,0.0,0.0,3.0,17.0,5.0,13.0,14.0,17.0,46.0,23.0,26.0,77.0,131.0,19.0,21.0,30.0,,0.0,0.0,0.0,298.507,24.0,31.0 19 | Medjool Dates,Fruits,277,0.15,1.81,74.97,66.47,6.7,,,64.0,0.9,696.0,54.0,149.0,7.0,0.0,,0.0,,,68.27,21.32,,,-13.757,0.0,,,0.53,33.68,31.95,0.0,0.3,0.0,,,62.0,1.0,0.44,0.362,0.29600000000000004,,,,,0.05,0.06,1.61,0.805,0.249,,15.0,0.0,15.0,15.0,9.9,0.4,,89.0,0.0,0.0,23.0,,,0.0,2.7,0.0,,,,,,,,7.0,42.0,45.0,82.0,54.0,66.0,60.0,29.0,78.0,220.0,265.0,90.0,111.0,62.0,,,,,72.202,64.0,63.0 20 | Red Or Green Grapes (European),Fruits,69,0.16,0.72,18.1,15.48,0.9,0.0,0.054000000000000006,10.0,0.36,191.0,7.0,66.0,3.0,3.2,0.0,0.0,0.19,,17.2,80.54,11.0,37.0,-3.2510000000000003,0.0,,,0.15,7.2,8.13,0.0,0.0,0.0,0.0,,20.0,2.0,0.07,0.127,0.071,0.1,7.8,,,0.069,0.07,0.188,0.05,0.086,,2.0,0.0,2.0,2.0,5.6,0.1,0.0,39.0,1.0,0.0,72.0,,,0.0,14.6,0.0,,7.0,48.0,,0.0,0.0,0.0,11.0,22.0,11.0,22.0,27.0,22.0,130.0,22.0,22.0,38.0,81.0,16.0,80.0,22.0,,0.0,0.0,0.0,289.855,29.0,19.0 21 | Watermelon,Fruits,30,0.15,0.61,7.55,6.2,0.4,0.0,0.016,7.0,0.24,112.0,10.0,569.0,28.0,8.1,0.0,0.0,0.05,,7.15,91.45,0.0,50.0,-2.011,0.0,,,1.21,1.58,3.36,0.0,0.06,0.0,0.0,,11.0,1.0,0.1,0.042,0.038,0.4,1.5,,,0.033,0.021,0.17800000000000002,0.221,0.045,,3.0,0.0,3.0,3.0,4.1,0.3,0.0,303.0,0.0,4532.0,8.0,,,0.0,0.1,0.0,,37.0,50.0,,0.0,0.0,0.0,7.0,27.0,19.0,18.0,62.0,16.0,59.0,6.0,17.0,39.0,63.0,10.0,24.0,16.0,,0.0,0.0,0.0,666.6669999999998,27.0,8.0 22 | Cooked Oatmeal,Grains and Pasta,71,1.52,2.54,12.0,0.27,1.7,0.0,0.31,9.0,0.9,70.0,27.0,0.0,0.0,0.0,0.0,0.0,0.08,,10.3,83.61,18.0,541.0,1.79,0.001,,,0.25,0.0,0.0,0.0,0.0,0.02,11.6,,77.0,4.0,1.0,0.07400000000000001,0.58,5.4,71.6,,,0.076,0.016,0.225,0.311,0.005,,6.0,0.0,6.0,6.0,7.4,3.1,0.0,0.0,0.0,0.0,180.0,,,0.0,0.3,0.0,,435.0,559.0,18.0,0.0,0.0,0.0,40.0,96.0,116.0,216.0,135.0,160.0,167.0,54.0,124.0,302.0,623.0,147.0,96.0,151.0,,0.0,0.0,0.0,281.69,243.0,143.0 23 | Rice Cooked Nfs,Grains and Pasta,129,0.28,2.67,27.99,0.05,0.4,0.0,0.077,10.0,1.2,35.0,12.0,,0.0,0.0,0.0,0.0,0.04,,27.59,68.01,13.0,62.0,1.715,,,,,,,,,,,,43.0,245.0,0.49,0.069,,7.5,,,,0.162,0.013,1.467,,0.092,,58.0,55.0,3.0,96.0,2.1,,0.0,0.0,0.0,0.0,0.0,,,,0.0,,,87.0,76.0,,0.0,0.0,0.0,,,,,,,,,,,,,,,,0.0,0.0,0.0,155.039,0.0,0.0 24 | Rice White Cooked Fat Added In Cooking Made With Oil,Grains and Pasta,150,3.05,2.6,27.22,0.05,0.4,0.0,0.454,10.0,1.17,34.0,12.0,,0.0,0.0,0.0,0.0,0.36,,26.82,66.12,153.0,1063.0,1.665,,,,,,,,,,,,42.0,238.0,0.47,0.067,,7.2,,,,0.157,0.013,1.426,,0.09,,56.0,53.0,3.0,94.0,2.0,,0.0,0.0,0.0,0.0,0.0,,,,3.3,,,1248.0,1217.0,,0.0,0.0,0.0,,,,,,,,,,,,,,,,0.0,0.0,0.0,133.333,0.0,0.0 25 | Uncooked Oats,Grains and Pasta,389,6.9,16.89,66.27,,10.6,0.0,1.217,54.0,4.72,429.0,177.0,0.0,0.0,0.0,0.0,0.0,,,55.67,8.22,111.0,2424.0,13.218,,,,,,,,,,,,523.0,2.0,3.97,0.626,4.916,,,,,0.763,0.139,0.961,1.349,0.119,,56.0,0.0,56.0,56.0,,,0.0,,,,,,,0.0,,,,2178.0,2535.0,,,,,234.0,575.0,694.0,1284.0,701.0,937.0,1192.0,405.0,881.0,1448.0,3712.0,841.0,934.0,750.0,,0.0,,,51.414,1468.0,720.0 26 | White Rice,Grains and Pasta,130,0.28,2.69,28.17,0.05,0.4,0.0,0.077,10.0,1.2,35.0,12.0,0.0,0.0,0.0,0.0,0.0,0.04,,27.77,68.44,13.0,62.0,1.725,,,,,,,,,,,,43.0,1.0,0.49,0.069,0.472,7.5,41.1,,,0.163,0.013,1.476,0.39,0.093,,58.0,55.0,3.0,97.0,2.1,0.3,0.0,0.0,0.0,0.0,0.0,,,0.0,0.0,,,88.0,76.0,,0.0,0.0,0.0,31.0,96.0,116.0,222.0,97.0,164.0,224.0,63.0,156.0,253.0,524.0,122.0,127.0,141.0,,0.0,0.0,0.0,153.846,234.0,118.0 27 | Almonds,Nuts and Seeds,579,49.93,21.15,21.55,4.35,12.5,0.0,3.802,269.0,3.71,733.0,270.0,2.0,0.0,0.0,0.0,0.0,25.63,,9.05,4.41,3.0,12328.0,2.096,0.015,,,3.95,0.17,0.11,0.0,0.04,0.07,0.72,,481.0,1.0,3.12,1.031,2.1790000000000003,4.1,,,,0.205,1.138,3.618,0.471,0.13699999999999998,,44.0,0.0,44.0,44.0,52.1,0.5,0.0,1.0,0.0,0.0,1.0,,,0.0,0.0,0.0,,31551.0,12329.0,3.0,0.0,0.0,0.0,211.0,601.0,751.0,1473.0,568.0,855.0,2465.0,539.0,999.0,2639.0,6206.0,1429.0,969.0,912.0,,0.0,0.0,0.0,34.542,1582.0,372.0 28 | Almonds Unsalted,Nuts and Seeds,607,53.96,20.33,20.38,4.71,10.6,0.0,4.38,260.0,3.62,692.0,271.0,,0.0,0.0,0.0,0.0,23.54,,9.78,2.34,162.0,13640.0,1.7619999999999998,,,,,,,,,,,,457.0,3.0,3.21,1.0659999999999998,,1.9,,,,0.075,1.161,3.528,,0.132,,53.0,0.0,53.0,53.0,50.5,,0.0,1.0,0.0,0.0,1.0,,,,3.5,,,33340.0,13802.0,,0.0,0.0,0.0,,,,,,,,,,,,,,,,0.0,0.0,0.0,32.949,0.0,0.0 29 | Cashews (Raw),Nuts and Seeds,553,43.85,18.22,30.19,5.91,3.3,0.0,7.782999999999999,37.0,6.68,660.0,292.0,0.0,0.0,0.5,0.0,0.0,0.9,,26.89,5.2,62.0,7782.0,8.782,,,,5.81,0.05,0.05,0.0,0.0,0.0,23.49,,593.0,12.0,5.78,2.195,1.655,19.9,,,,0.423,0.058,1.062,0.8640000000000001,0.417,,25.0,0.0,25.0,25.0,,,0.0,0.0,0.0,0.0,22.0,,,0.0,34.1,,,23797.0,7845.0,,0.0,0.0,0.0,287.0,688.0,789.0,1472.0,928.0,1094.0,2123.0,456.0,837.0,1795.0,4506.0,937.0,812.0,1079.0,,,,,36.166,1459.0,755.0 30 | Cashews Unsalted,Nuts and Seeds,583,47.96,14.85,31.71,4.86,2.9,0.0,9.293,44.0,5.82,548.0,252.0,,0.0,0.0,0.0,0.0,1.24,,28.81,1.65,308.0,8514.0,6.089,,,,,,,,,,,,475.0,16.0,5.43,2.153,,11.3,,,,0.194,0.194,1.358,,0.248,,67.0,0.0,67.0,67.0,59.2,,0.0,0.0,0.0,0.0,22.0,,,,37.2,,,27754.0,8837.0,,0.0,0.0,0.0,,,,,,,,,,,,,,,,0.0,0.0,0.0,34.305,0.0,0.0 31 | Chia Seeds,Nuts and Seeds,486,30.74,16.54,42.12,,34.4,0.0,3.33,631.0,7.72,407.0,335.0,54.0,,1.6,0.0,,0.5,,7.72,5.8,17830.0,5835.0,14.323,0.14,,,,,,,,,,,860.0,16.0,4.58,0.924,2.7230000000000003,55.2,,,,0.62,0.17,8.83,,,,49.0,,49.0,,,,,,,,,,,,,,,2309.0,23665.0,17830.0,,,,436.0,709.0,801.0,1371.0,970.0,950.0,2143.0,531.0,1044.0,1689.0,3500.0,943.0,776.0,1049.0,,,,,41.152,1579.0,995.0 32 | Dried Sunflower Seeds,Nuts and Seeds,584,51.46,20.78,20.0,2.62,8.6,0.0,4.455,78.0,5.25,645.0,325.0,50.0,3.0,1.4,0.0,0.0,35.17,,11.4,4.73,28.0,23050.0,11.431,,,,2.5,,,,,,,,660.0,9.0,5.0,1.8,1.95,53.0,,,,1.48,0.355,8.335,1.13,1.345,,227.0,0.0,227.0,227.0,55.1,35.4,0.0,30.0,0.0,0.0,0.0,,,0.0,0.0,0.0,0.0,18528.0,23137.0,,14.0,0.0,0.0,348.0,928.0,1139.0,1659.0,937.0,1315.0,2403.0,632.0,1117.0,2446.0,5579.0,1461.0,1182.0,1075.0,,0.0,0.0,0.0,34.247,1835.0,945.0 33 | Dry Roasted Almonds,Nuts and Seeds,598,52.54,20.96,21.01,4.86,10.9,0.0,4.092,268.0,3.73,713.0,279.0,1.0,0.0,0.0,0.0,0.0,23.9,,10.11,2.41,6.0,12945.0,1.831,0.006999999999999999,,,4.75,0.01,0.01,0.0,0.09,0.0,0.73,,471.0,3.0,3.31,1.099,2.232,2.0,,,,0.077,1.197,3.637,0.321,0.136,,55.0,0.0,55.0,55.0,52.1,,0.0,1.0,0.0,0.0,1.0,,,0.0,0.0,,,33076.0,12955.0,6.0,0.0,0.0,0.0,209.0,595.0,745.0,1461.0,563.0,848.0,2444.0,534.0,991.0,2616.0,6153.0,1417.0,961.0,904.0,40.0,0.0,0.0,0.0,33.445,1568.0,369.0 34 | Dry Roasted Pistachio Nuts,Nuts and Seeds,572,45.82,21.05,28.28,7.74,10.3,0.0,5.645,107.0,4.03,1007.0,109.0,266.0,13.0,3.0,0.0,0.0,2.17,,17.98,1.85,212.0,13125.0,2.162,0.0,,,7.09,0.25,0.22,0.0,0.13,0.05,1.38,,469.0,6.0,2.34,1.293,1.243,10.0,,,,0.695,0.234,1.3730000000000002,0.513,1.122,,51.0,0.0,51.0,51.0,71.4,0.8,0.0,159.0,0.0,0.0,1160.0,,,0.0,13.2,0.0,,24534.0,13346.0,212.0,0.0,0.0,0.0,262.0,714.0,957.0,1675.0,1189.0,1305.0,2228.0,535.0,1016.0,1968.0,4490.0,1054.0,980.0,1340.0,96.0,0.0,0.0,0.0,34.965,1671.0,680.0 35 | Dry Roasted Sunflower Seeds,Nuts and Seeds,582,49.8,19.33,24.07,2.73,11.1,0.0,5.2189999999999985,70.0,3.8,850.0,129.0,9.0,0.0,1.4,0.0,0.0,26.1,,12.97,1.2,69.0,32782.0,29.969,,,,,,,,,,,,1155.0,3.0,5.29,1.83,2.11,79.3,,,,0.106,0.246,7.042000000000002,7.042000000000002,0.804,,237.0,0.0,237.0,237.0,55.1,,0.0,5.0,0.0,0.0,0.0,,,0.0,2.7,,,9505.0,32884.0,,0.0,0.0,0.0,295.0,788.0,967.0,1408.0,795.0,1116.0,2039.0,536.0,948.0,2076.0,4735.0,1240.0,1003.0,912.0,,0.0,0.0,0.0,34.364000000000004,1557.0,803.0 36 | Flax Seeds,Nuts and Seeds,534,42.16,18.29,28.88,1.55,27.3,0.0,3.663,255.0,5.73,813.0,392.0,0.0,0.0,0.6,0.0,0.0,0.31,,1.58,6.96,22813.0,5910.0,1.937,,,,1.15,0.4,0.0,0.0,0.0,0.0,,,642.0,30.0,4.34,1.22,2.482,25.4,,,,1.644,0.161,3.08,0.985,0.473,,87.0,0.0,87.0,87.0,78.7,3.1,0.0,0.0,0.0,0.0,651.0,,,0.0,4.3,0.0,,7527.0,28730.0,,0.0,0.0,0.0,297.0,766.0,896.0,1235.0,862.0,1072.0,1925.0,472.0,925.0,2046.0,4039.0,1248.0,806.0,970.0,175.0,0.0,0.0,0.0,37.453,1450.0,710.0 37 | Hazelnuts,Nuts and Seeds,628,60.75,14.95,16.7,4.34,9.7,0.0,4.464,114.0,4.7,680.0,163.0,20.0,1.0,6.3,0.0,0.0,15.03,,7.0,5.31,87.0,7833.0,-2.061,,,,4.2,0.07,0.07,0.0,0.0,,0.48,,290.0,0.0,2.45,1.725,6.175,2.4,,,,0.643,0.113,1.8,0.918,0.563,,113.0,0.0,113.0,113.0,45.6,0.4,0.0,11.0,3.0,0.0,92.0,,,0.0,14.2,0.0,,45652.0,7920.0,,0.0,0.0,0.0,193.0,497.0,545.0,1063.0,420.0,701.0,2211.0,432.0,730.0,1679.0,3710.0,724.0,561.0,735.0,,0.0,0.0,0.0,31.847,1025.0,498.0 38 | Hemp Seeds,Nuts and Seeds,553,48.75,31.56,8.67,1.5,4.0,0.0,4.6,70.0,7.95,1200.0,700.0,11.0,1.0,0.5,,,0.8,,4.67,4.96,9301.0,29001.0,31.874,0.0,,,0.85,0.2,0.31,0.07,0.07,,,,1650.0,5.0,9.9,1.6,7.6,,,,,1.275,0.285,9.2,,0.6,,110.0,0.0,110.0,110.0,,,,7.0,,,,,,,,,,5400.0,38100.0,8684.0,,,,369.0,1269.0,1286.0,2163.0,1276.0,1777.0,4550.0,969.0,1528.0,3662.0,6269.0,1611.0,1597.0,1713.0,,,,,36.166,2710.0,1605.0 39 | Pistachio Nuts,Nuts and Seeds,560,45.32,20.16,27.17,7.66,10.6,0.0,5.907,105.0,3.92,1025.0,121.0,516.0,26.0,5.6,0.0,0.0,2.86,,16.57,4.37,289.0,14091.0,1.834,0.0,,,6.87,0.32,0.24,0.0,0.17,,1.67,,490.0,1.0,2.2,1.3,1.2,7.0,3.4,,,0.87,0.16,1.3,0.52,1.7,,51.0,0.0,51.0,51.0,,,0.0,305.0,10.0,,2903.0,,,0.0,,,,23257.0,14380.0,,0.0,0.0,0.0,251.0,684.0,917.0,1604.0,1138.0,1249.0,2134.0,512.0,973.0,1884.0,4300.0,1009.0,938.0,1283.0,,0.0,0.0,0.0,35.714,1601.0,652.0 40 | Pistachio Nuts Unsalted,Nuts and Seeds,581,47.44,20.42,27.43,7.51,10.0,0.0,5.886,104.0,3.91,977.0,106.0,,13.0,2.9,0.0,0.0,2.46,,17.43,1.79,358.0,13815.0,2.086,,,,,,,,,,,,455.0,6.0,2.27,1.254,,9.7,,,,0.674,0.227,1.332,,1.088,,49.0,0.0,49.0,49.0,69.3,,0.0,154.0,0.0,0.0,1125.0,,,,16.3,,,25054.0,14181.0,,0.0,0.0,0.0,,,,,,,,,,,,,,,,0.0,0.0,0.0,34.423,0.0,0.0 41 | Seeds Sesame Seeds Whole Dried,Nuts and Seeds,573,49.67,17.73,23.45,0.3,11.8,0.0,6.957000000000002,975.0,14.55,468.0,351.0,9.0,0.0,0.0,0.0,0.0,0.25,,11.65,4.69,376.0,21375.0,0.18,,,,,,,,,,,,629.0,11.0,7.75,4.082,2.46,34.4,,,,0.7909999999999999,0.247,4.515,0.05,0.79,,97.0,0.0,97.0,97.0,25.6,,0.0,5.0,0.0,0.0,0.0,,,0.0,0.0,,,18759.0,21773.0,,0.0,0.0,0.0,388.0,736.0,763.0,1358.0,569.0,990.0,2630.0,522.0,927.0,1646.0,3955.0,1215.0,810.0,967.0,,0.0,0.0,0.0,34.904,1683.0,944.0 42 | Seeds Sunflower Seed Kernels Toasted Without Salt,Nuts and Seeds,619,56.8,17.21,20.59,,11.5,0.0,5.9529999999999985,57.0,6.81,491.0,129.0,0.0,0.0,1.4,0.0,0.0,,,9.09,1.0,79.0,37390.0,36.785,,,,,,,,,,,,1158.0,3.0,5.3,1.834,2.114,,,,,0.325,0.285,4.198,7.056,0.805,,238.0,0.0,238.0,238.0,,,0.0,,,,,,,0.0,,,,10841.0,37507.0,,,,,263.0,702.0,861.0,1254.0,708.0,994.0,1816.0,477.0,844.0,1848.0,4216.0,1104.0,893.0,812.0,,,,,32.31,1386.0,715.0 43 | Sesame Seeds (Toasted),Nuts and Seeds,565,48.0,16.96,25.74,,14.0,0.0,6.722,989.0,14.76,475.0,356.0,9.0,0.0,0.0,0.0,0.0,,,11.74,3.3,363.0,20654.0,-0.326,,,,,,,,,,,,638.0,11.0,7.16,2.47,2.496,34.4,,,,0.8029999999999999,0.251,4.581,0.051,0.802,,98.0,0.0,98.0,98.0,,,0.0,,,,,,,0.0,,,,18127.0,21039.0,,,,,371.0,704.0,730.0,1299.0,544.0,947.0,2515.0,499.0,886.0,1574.0,3782.0,1162.0,774.0,925.0,,,,,35.398,1609.0,902.0 44 | Walnuts,Nuts and Seeds,654,65.21,15.23,13.71,2.61,6.7,0.0,6.126,98.0,2.91,441.0,158.0,20.0,1.0,1.3,0.0,0.0,0.7,,7.01,4.07,9080.0,38093.0,5.53,,,,2.43,0.08,0.09,0.0,0.0,,0.06,,346.0,2.0,3.09,1.586,3.414,4.9,,,,0.341,0.15,1.125,0.57,0.537,,98.0,0.0,98.0,98.0,39.2,0.3,0.0,12.0,0.0,0.0,9.0,,,0.0,2.7,0.0,,8933.0,47174.0,,0.0,0.0,0.0,170.0,596.0,625.0,1170.0,424.0,753.0,2278.0,391.0,696.0,1829.0,2816.0,816.0,706.0,934.0,,0.0,0.0,0.0,30.581,1117.0,444.0 45 | Baked Potato (No Skin),Vegetables,93,0.1,1.96,21.55,1.7,1.5,0.0,0.026,5.0,0.35,391.0,25.0,0.0,0.0,12.8,0.0,0.0,0.04,,20.05,75.42,10.0,32.0,-6.162000000000001,0.0,,,,,,,,,,,50.0,5.0,0.29,0.215,0.161,0.3,,,,0.105,0.021,1.395,0.555,0.301,,9.0,0.0,9.0,9.0,14.5,0.2,0.0,0.0,0.0,0.0,0.0,,,0.0,0.3,,,2.0,43.0,,0.0,0.0,0.0,30.0,71.0,80.0,118.0,119.0,110.0,90.0,43.0,60.0,479.0,328.0,58.0,70.0,85.0,,0.0,0.0,0.0,215.054,160.0,56.0 46 | Broccoli,Vegetables,34,0.37,2.82,6.64,1.7,2.6,0.0,0.114,47.0,0.73,316.0,21.0,623.0,31.0,89.2,0.0,0.0,0.78,,4.04,89.3,63.0,49.0,-4.007,0.0,,,0.1,0.49,0.68,0.21,0.21,0.0,0.0,,66.0,33.0,0.41,0.049,0.21,2.5,,,,0.071,0.117,0.639,0.573,0.175,,63.0,0.0,63.0,63.0,18.7,0.1,0.0,361.0,25.0,0.0,1403.0,,,0.0,101.6,0.0,,31.0,112.0,,0.0,0.0,0.0,33.0,88.0,79.0,129.0,135.0,125.0,191.0,59.0,104.0,325.0,542.0,89.0,110.0,121.0,,0.0,0.0,0.0,588.235,167.0,66.0 47 | Broccoli (Cooked),Vegetables,35,0.41,2.38,7.18,1.39,3.3,0.0,0.079,40.0,0.67,293.0,21.0,1548.0,77.0,64.9,0.0,0.0,1.45,,3.88,89.25,119.0,51.0,-3.609,0.0,,,0.08,0.49,0.74,0.0,0.0,0.0,0.0,,67.0,41.0,0.45,0.061,0.194,1.6,4.0,,,0.063,0.123,0.5529999999999999,0.616,0.2,,108.0,0.0,108.0,108.0,40.1,0.1,0.0,929.0,0.0,0.0,1080.0,,,0.0,141.1,0.0,,40.0,170.0,,0.0,0.0,0.0,34.0,96.0,92.0,147.0,155.0,138.0,200.0,63.0,114.0,329.0,549.0,101.0,111.0,129.0,,0.0,0.0,0.0,571.429,176.0,74.0 48 | Carrots,Vegetables,41,0.24,0.93,9.58,4.74,2.8,0.0,0.032,33.0,0.3,320.0,12.0,16706.0,835.0,5.9,0.0,0.0,0.66,,6.78,88.29,2.0,100.0,-5.746,0.0,,,3.59,0.59,0.55,0.0,0.0,0.0,1.43,,35.0,69.0,0.24,0.045,0.14300000000000002,0.1,3.2,,,0.066,0.058,0.983,0.273,0.138,,19.0,0.0,19.0,19.0,8.8,0.4,0.0,8285.0,3477.0,1.0,256.0,,,0.0,13.2,0.0,,12.0,102.0,,0.0,0.0,0.0,12.0,191.0,77.0,102.0,101.0,69.0,91.0,40.0,113.0,190.0,366.0,47.0,54.0,54.0,,0.0,0.0,0.0,487.805,104.0,103.0 49 | Celery,Vegetables,14,0.17,0.69,2.97,1.34,1.6,0.0,0.042,40.0,0.2,260.0,11.0,449.0,22.0,3.1,0.0,0.0,0.27,,1.37,95.43,0.0,79.0,-5.069,0.0,,,0.08,0.4,0.37,0.0,0.0,0.48,0.0,,24.0,80.0,0.13,0.035,0.103,0.4,4.0,,,0.021,0.057,0.32,0.246,0.07400000000000001,,36.0,0.0,36.0,36.0,6.1,0.1,0.0,270.0,0.0,0.0,283.0,,,0.0,29.3,0.0,,32.0,79.0,,0.0,0.0,0.0,9.0,20.0,21.0,32.0,27.0,27.0,20.0,12.0,23.0,117.0,90.0,21.0,18.0,20.0,,0.0,0.0,0.0,1428.571,29.0,9.0 50 | Cooked Carrots,Vegetables,35,0.18,0.76,8.22,3.45,3.0,0.0,0.03,30.0,0.34,235.0,10.0,17033.0,852.0,3.6,0.0,0.0,1.03,,5.22,90.17,1.0,87.0,-4.129,0.0,,,2.7,0.4,0.36,0.0,0.0,0.0,0.17,,30.0,58.0,0.2,0.017,0.155,0.7,47.5,,,0.066,0.044,0.645,0.232,0.153,,14.0,0.0,14.0,14.0,8.8,0.1,0.0,8332.0,3776.0,0.0,687.0,,,0.0,13.7,0.0,,6.0,89.0,,0.0,0.0,0.0,10.0,157.0,63.0,84.0,83.0,56.0,75.0,33.0,93.0,156.0,301.0,38.0,44.0,44.0,,0.0,0.0,0.0,571.429,85.0,85.0 51 | Cooked Celery,Vegetables,18,0.16,0.83,4.0,2.37,1.6,0.0,0.04,42.0,0.42,284.0,12.0,521.0,26.0,6.1,0.0,0.0,0.35,,2.4,94.11,0.0,75.0,-5.522,0.0,,,0.14,0.71,0.66,0.0,0.0,0.85,,,25.0,91.0,0.14,0.036000000000000004,0.106,1.0,,,,0.023,0.07,0.3720000000000001,0.317,0.086,,33.0,0.0,33.0,33.0,7.9,,0.0,313.0,0.0,0.0,329.0,,,0.0,37.8,,,30.0,75.0,,0.0,0.0,0.0,11.0,24.0,25.0,39.0,32.0,33.0,24.0,14.0,27.0,141.0,107.0,26.0,22.0,24.0,,0.0,0.0,0.0,1111.111,35.0,12.0 52 | Cooked Eggplant,Vegetables,35,0.23,0.83,8.73,3.2,2.5,0.0,0.044,6.0,0.25,123.0,11.0,37.0,2.0,1.3,0.0,0.0,0.41,,6.23,89.67,15.0,78.0,-2.001,0.0,,,,,,,,,,,15.0,1.0,0.12,0.059,0.113,0.1,,,,0.076,0.02,0.6,0.075,0.086,,14.0,0.0,14.0,14.0,9.4,,0.0,22.0,0.0,0.0,0.0,,,0.0,2.9,,,20.0,93.0,,0.0,0.0,0.0,8.0,30.0,36.0,52.0,39.0,43.0,46.0,19.0,42.0,134.0,152.0,33.0,34.0,34.0,,0.0,0.0,0.0,571.429,57.0,13.0 53 | Cooked Green Bell Peppers,Vegetables,28,0.2,0.92,6.7,3.19,1.2,0.0,0.029,9.0,0.46,166.0,10.0,468.0,23.0,74.4,0.0,0.0,0.5,,5.5,91.87,10.0,96.0,-2.766,0.0,,,0.15,1.55,1.5,0.0,0.0,0.0,,,18.0,2.0,0.12,0.065,0.115,0.3,,,,0.059,0.03,0.477,0.079,0.233,,16.0,0.0,16.0,16.0,7.4,,0.0,264.0,26.0,0.0,431.0,,,0.0,9.8,,,13.0,106.0,,0.0,0.0,0.0,12.0,34.0,30.0,48.0,41.0,39.0,44.0,19.0,38.0,132.0,122.0,34.0,40.0,37.0,,0.0,0.0,0.0,714.2860000000002,48.0,29.0 54 | Cooked Green Peas,Vegetables,84,0.22,5.36,15.63,5.93,5.5,0.0,0.039,27.0,1.54,271.0,39.0,801.0,40.0,14.2,0.0,0.0,0.14,,10.13,77.87,19.0,82.0,-0.139,0.0,,,5.22,0.13,0.41,0.0,0.18,0.0,,,117.0,3.0,1.19,0.173,0.525,1.9,,,,0.259,0.149,2.021,0.153,0.21600000000000005,,63.0,0.0,63.0,63.0,29.7,0.2,0.0,470.0,22.0,0.0,2593.0,,,0.0,25.9,,,19.0,102.0,,0.0,0.0,0.0,37.0,201.0,193.0,320.0,314.0,232.0,423.0,105.0,237.0,490.0,733.0,182.0,171.0,179.0,,0.0,0.0,0.0,238.095,310.0,113.0 55 | Cooked Onions,Vegetables,44,0.19,1.36,10.15,4.73,1.4,0.0,0.031,22.0,0.24,166.0,11.0,2.0,0.0,5.2,0.0,0.0,0.02,,8.75,87.86,4.0,70.0,-2.117,0.0,,,1.1,2.19,1.44,0.0,0.0,0.0,,,35.0,3.0,0.21,0.067,0.153,0.6,,,,0.042,0.023,0.165,0.113,0.129,,15.0,0.0,15.0,15.0,6.8,,0.0,1.0,0.0,0.0,4.0,,,0.0,0.5,,,27.0,73.0,,0.0,0.0,0.0,20.0,33.0,48.0,48.0,65.0,31.0,183.0,22.0,38.0,74.0,220.0,57.0,42.0,40.0,,0.0,0.0,0.0,454.545,69.0,35.0 56 | Cooked Tomatoes,Vegetables,18,0.11,0.95,4.01,2.49,0.7,0.0,0.015,11.0,0.68,218.0,9.0,489.0,24.0,22.8,0.0,0.0,0.56,,3.31,94.34,2.0,42.0,-3.478,0.0,,,0.0,1.18,1.31,0.0,0.0,0.0,,,28.0,11.0,0.14,0.075,0.105,0.5,,,,0.036000000000000004,0.022,0.532,0.129,0.079,,13.0,0.0,13.0,13.0,6.9,,0.0,293.0,0.0,3041.0,94.0,,,0.0,2.8,0.0,,16.0,44.0,,0.0,0.0,0.0,8.0,27.0,26.0,39.0,39.0,27.0,26.0,16.0,30.0,148.0,393.0,26.0,20.0,28.0,,0.0,0.0,0.0,1111.111,46.0,23.0 57 | Cooked White Button Mushrooms,Vegetables,28,0.47,2.17,5.29,2.34,2.2,0.0,0.061,6.0,1.74,356.0,12.0,0.0,0.0,4.0,0.0,0.2,0.01,,3.09,91.08,1.0,179.0,-3.623,0.0,,,,,,,,,,,87.0,2.0,0.87,0.504,0.115,11.9,,,,0.073,0.3,4.46,2.16,0.095,,18.0,0.0,18.0,18.0,20.4,,0.0,0.0,0.0,0.0,0.0,0.2,0.0,8.0,0.0,,,8.0,183.0,,0.0,0.0,0.0,24.0,75.0,53.0,84.0,75.0,163.0,55.0,40.0,140.0,137.0,240.0,64.0,53.0,66.0,,0.0,0.0,0.0,714.2860000000002,91.0,31.0 58 | Cooked Zucchini,Vegetables,15,0.36,1.14,2.69,1.71,1.0,0.0,0.07200000000000001,18.0,0.37,264.0,19.0,1117.0,56.0,12.9,0.0,0.0,0.12,,1.69,95.22,94.0,58.0,-4.377,0.0,,,,,,,,,0.0,,37.0,3.0,0.33,0.052000000000000005,0.173,0.2,,,,0.035,0.024,0.51,0.28800000000000003,0.08,,28.0,0.0,28.0,28.0,9.4,0.3,0.0,670.0,0.0,0.0,1150.0,,,0.0,4.2,,,29.0,151.0,,0.0,0.0,0.0,6.0,15.0,23.0,37.0,35.0,29.0,27.0,14.0,33.0,78.0,68.0,24.0,20.0,26.0,,0.0,0.0,0.0,1333.333,39.0,16.0 59 | Cucumber,Vegetables,15,0.11,0.65,3.63,1.67,0.5,0.0,0.037000000000000005,16.0,0.28,147.0,13.0,105.0,5.0,2.8,0.0,0.0,0.03,,3.13,95.23,5.0,28.0,-2.445,0.0,,,0.03,0.76,0.87,0.0,0.01,0.0,0.83,,24.0,2.0,0.2,0.041,0.079,0.3,1.3,,,0.027000000000000003,0.033,0.098,0.259,0.04,,7.0,0.0,7.0,7.0,6.0,0.1,0.0,45.0,11.0,0.0,23.0,,,0.0,16.4,0.0,,5.0,32.0,,0.0,0.0,0.0,5.0,19.0,21.0,29.0,29.0,22.0,44.0,10.0,24.0,41.0,196.0,24.0,15.0,20.0,,0.0,0.0,0.0,1333.333,30.0,10.0 60 | Cucumber Raw,Vegetables,12,0.16,0.59,2.16,1.38,0.7,0.0,0.013,14.0,0.22,136.0,12.0,,4.0,3.2,0.0,0.0,0.03,,1.46,96.73,2.0,2.0,-2.301,,,,,,,,,,,,21.0,2.0,0.17,0.071,,0.1,,,,0.031,0.025,0.037000000000000005,,0.051,,14.0,0.0,14.0,14.0,5.7,,0.0,31.0,8.0,0.0,16.0,,,,7.2,,,2.0,3.0,,0.0,0.0,0.0,,,,,,,,,,,,,,,,0.0,0.0,0.0,1666.667,0.0,0.0 61 | Eggplant,Vegetables,25,0.18,0.98,5.88,3.53,3.0,0.0,0.034,9.0,0.23,229.0,14.0,23.0,1.0,2.2,0.0,0.0,0.3,,2.88,92.3,13.0,63.0,-3.949,0.0,,,0.26,1.58,1.54,,,,,,24.0,2.0,0.16,0.081,0.232,0.3,,,,0.039,0.037000000000000005,0.649,0.281,0.084,,22.0,0.0,22.0,22.0,6.9,,0.0,14.0,0.0,0.0,36.0,,,0.0,3.5,,,16.0,76.0,,0.0,0.0,0.0,9.0,37.0,45.0,64.0,47.0,53.0,57.0,23.0,51.0,164.0,186.0,41.0,43.0,42.0,,0.0,0.0,0.0,800.0,70.0,17.0 62 | Green Bell Peppers,Vegetables,20,0.17,0.86,4.64,2.4,1.7,0.0,0.058,10.0,0.34,175.0,10.0,370.0,18.0,80.4,0.0,0.0,0.37,,2.94,93.89,8.0,54.0,-2.924,0.0,,,0.11,1.16,1.12,0.0,0.0,0.0,0.0,,20.0,3.0,0.13,0.066,0.122,0.0,2.0,,,0.057,0.028,0.48,0.099,0.224,,10.0,0.0,10.0,10.0,5.5,0.1,0.0,208.0,21.0,0.0,341.0,,,0.0,7.4,0.0,,8.0,62.0,,0.0,0.0,0.0,12.0,36.0,24.0,36.0,39.0,36.0,27.0,10.0,36.0,208.0,194.0,30.0,24.0,54.0,,0.0,0.0,0.0,1000.0,104.0,19.0 63 | Onions,Vegetables,40,0.1,1.1,9.34,4.24,1.7,0.0,0.042,23.0,0.21,146.0,10.0,2.0,0.0,7.4,0.0,0.0,0.02,,7.64,89.11,4.0,13.0,-2.031,0.0,,,0.99,1.97,1.29,0.0,0.0,0.0,0.0,,29.0,4.0,0.17,0.039,0.129,0.5,1.1,,,0.046,0.027000000000000003,0.116,0.123,0.12,,19.0,0.0,19.0,19.0,6.1,0.1,0.0,1.0,0.0,0.0,4.0,,,0.0,0.4,0.0,,13.0,17.0,,0.0,0.0,0.0,14.0,21.0,14.0,25.0,39.0,21.0,104.0,14.0,21.0,91.0,258.0,25.0,12.0,21.0,,0.0,0.0,0.0,500.0,39.0,6.0 64 | Peas,Vegetables,81,0.4,5.42,14.45,5.67,5.7,0.0,0.071,25.0,1.47,244.0,33.0,765.0,38.0,40.0,0.0,0.0,0.13,,8.75,78.86,35.0,152.0,0.311,0.0,,,4.99,0.12,0.39,0.0,0.17,0.0,,,108.0,5.0,1.24,0.17600000000000002,0.41,1.8,,,,0.266,0.132,2.09,0.104,0.16899999999999998,,65.0,0.0,65.0,65.0,28.4,0.2,0.0,449.0,21.0,0.0,2477.0,,,0.0,24.8,,,35.0,187.0,,0.0,0.0,0.0,37.0,203.0,195.0,323.0,317.0,235.0,428.0,107.0,240.0,496.0,741.0,184.0,173.0,181.0,,0.0,0.0,0.0,246.914,314.0,114.0 65 | Potatoes Baked Skin Without Salt,Vegetables,198,0.1,4.29,46.06,1.4,7.9,0.0,0.026,34.0,7.04,573.0,43.0,10.0,1.0,13.5,0.0,0.0,0.04,,38.16,47.31,10.0,32.0,-7.824,0.0,,,,,,,,,,,101.0,21.0,0.49,0.8170000000000001,0.616,0.7,,,,0.122,0.106,3.065,0.857,0.614,,22.0,0.0,22.0,22.0,31.0,0.5,0.0,6.0,0.0,0.0,30.0,,,0.0,1.7,,,2.0,43.0,,0.0,0.0,0.0,,,,,,,,,,,,,,,,0.0,0.0,0.0,101.01,0.0,0.0 66 | Sweet Potato Fries From Fresh Fried,Vegetables,193,13.13,1.74,17.95,5.62,2.9,0.0,1.823,33.0,0.62,412.0,23.0,,833.0,17.0,0.0,0.0,2.14,,15.05,65.67,664.0,4773.0,-7.136,,,,,,,,,,,,47.0,166.0,0.28,0.14,,0.2,,,,0.093,0.092,1.289,,0.248,,5.0,0.0,5.0,5.0,11.4,,0.0,9973.0,37.0,0.0,0.0,,,,17.3,,,5446.0,5434.0,,0.0,0.0,0.0,,,,,,,,,,,,,,,,0.0,0.0,0.0,103.627,0.0,0.0 67 | Tomatoes,Vegetables,18,0.2,0.88,3.89,2.63,1.2,0.0,0.028,10.0,0.27,237.0,11.0,833.0,42.0,13.7,0.0,0.0,0.54,,2.69,94.52,3.0,80.0,-4.101,0.0,,,0.0,1.25,1.37,0.0,0.0,0.0,0.0,,24.0,5.0,0.17,0.059,0.114,0.0,2.3,,,0.037000000000000005,0.019,0.594,0.08900000000000001,0.08,,15.0,0.0,15.0,15.0,6.7,0.1,0.0,449.0,101.0,2573.0,123.0,,,0.0,7.9,0.0,,31.0,83.0,,0.0,0.0,0.0,6.0,27.0,18.0,25.0,27.0,18.0,21.0,14.0,27.0,135.0,431.0,19.0,15.0,26.0,,0.0,0.0,0.0,1111.111,41.0,15.0 68 | White Button Mushrooms,Vegetables,22,0.34,3.09,3.26,1.98,1.0,0.0,0.05,3.0,0.5,318.0,9.0,0.0,0.0,2.1,0.04,0.2,0.01,,2.26,92.45,0.0,160.0,-2.289,0.0,,,0.0,1.48,0.17,0.0,0.0,0.0,0.0,,86.0,5.0,0.52,0.318,0.047,9.3,,,,0.081,0.402,3.607,1.497,0.104,,17.0,0.0,17.0,17.0,17.3,9.4,0.0,0.0,0.0,0.0,0.0,0.2,0.0,7.0,0.0,1.0,0.0,0.0,160.0,,0.0,0.0,0.0,35.0,107.0,76.0,120.0,107.0,232.0,78.0,57.0,199.0,195.0,343.0,92.0,76.0,94.0,,0.0,0.0,0.0,909.091,129.0,43.0 69 | Zucchini,Vegetables,17,0.32,1.21,3.11,2.5,1.0,0.0,0.084,16.0,0.37,261.0,18.0,200.0,10.0,17.9,0.0,0.0,0.12,,2.11,94.79,61.0,30.0,-4.19,0.0,,,0.05,1.07,1.38,0.0,0.0,0.0,0.0,,38.0,8.0,0.32,0.053,0.177,0.2,,,,0.045,0.094,0.451,0.204,0.163,,24.0,0.0,24.0,24.0,9.5,,0.0,120.0,0.0,0.0,2125.0,,,0.0,4.3,,,11.0,91.0,61.0,0.0,0.0,0.0,10.0,29.0,44.0,71.0,67.0,54.0,51.0,26.0,63.0,147.0,129.0,46.0,37.0,49.0,,0.0,0.0,0.0,1176.471,75.0,30.0 -------------------------------------------------------------------------------- /my_intake_requirements.csv: -------------------------------------------------------------------------------- 1 | "name","internal_id","fdc_id","unit","min","upper_limit" 2 | "Calories",1,,,, 3 | "Water",2,255,,, 4 | "Protein",3,203,"g",100,200 5 | "Carbs",4,205,"g",, 6 | "Dietary fiber",5,,,, 7 | "Soluble fiber",6,,,, 8 | "Insoluble fiber",7,,,, 9 | "Total sugars",8,,,, 10 | "Added sugars",9,,,, 11 | "Fat",10,204,"g",, 12 | "Saturated fat",11,606,,, 13 | "Trans fat",12,605,,, 14 | "Polyunsaturated fat",13,646,,, 15 | "Monounsaturated fat",14,645,,, 16 | "Cholesterol",15,601,,, 17 | "Vitamin A, IU",16,318,"ug",900,3000 18 | "Vitamin A, RAE",17,320,,, 19 | "Vitamin C",18,401,"mg",,2000 20 | "Vitamin D",19,324,"ug",15,100 21 | "Vitamin D2",20,325,,, 22 | "Vitamin D3",21,326,,, 23 | "Vitamin E",22,323,"mg",15,1000 24 | "Vitamin K",23,,"ug",120, 25 | "Vitamin K1 (phylloquinone)",24,430,,, 26 | "Vitamin K2, MK-4 (menaquinone-4)",25,428,,, 27 | "Niacin",26,406,"mg",16,35 28 | "Riboflavin",27,405,"mg",1.3, 29 | "Thiamin",28,404,"mg",1.2, 30 | "Vitamin B6",29,415,"mg",1.3,100 31 | "DFE, Dietary folate equivalents",30,435,,, 32 | "Folate",31,417,"ug",400,1000 33 | "Folic Acid",32,431,,, 34 | "Methylated folate",33,,,, 35 | "Vitamin B12",34,418,"ug",2.4, 36 | "Pantothenic acid",35,410,"mg",5, 37 | "Biotin",36,,"ug",30, 38 | "Choline",37,421,"mg",550,3500 39 | "Carotenoids",38,,,, 40 | "Calcium",39,301,"mg",1000,2500 41 | "Chromium",40,,"ug",35, 42 | "Copper",41,312,"ug",900,10000 43 | "Fluoride",42,313,"mg",4,10 44 | "Iodine",43,,"mg",8,1100 45 | "Iron",44,303,"mg",,45 46 | "Magnesium",45,304,"mg",420, 47 | "Magnesium (from pharmocological agents)",46,,"mg",,350 48 | "Manganese",47,315,"mg",2.3,11 49 | "Molybdenum",48,,"ug",45,2000 50 | "Nickel",49,,"mg",,1 51 | "Phosphorus",50,305,"mg",700,4000 52 | "Potassium",51,306,"mg",3400, 53 | "Selenium",52,317,"ug",55,400 54 | "Zinc",53,309,"mg",11, 55 | "Sodium",54,307,"mg",1500, 56 | "Chloride",55,,"g",2.3,3.6 57 | "Arsenic",56,,,, 58 | "Boron",57,,"mg",,20 59 | "Silicon",58,,,, 60 | "Sulfate",59,,,, 61 | "Vanadium",60,,"mg",,1.8 62 | "Mercury",61,,,, 63 | "Omega 3 fatty acids",62,,,, 64 | "Omega 6 fatty acids",63,,,, 65 | "Caffeine",64,262,,, 66 | "Alcohol",65,221,,, 67 | -------------------------------------------------------------------------------- /program.py: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | import pulp as pl 3 | 4 | class NutrientRequirements: 5 | def __init__(self, csv, unnecessary = []): 6 | self.df = pd.read_csv(csv) \ 7 | .sort_values(by='name') \ 8 | .set_index('name') 9 | 10 | self.unnecessary = unnecessary 11 | 12 | def parse_units(self): 13 | pass 14 | 15 | class FoodNutrients: 16 | def __init__(self,csv): 17 | self.df = pd.read_csv(csv) \ 18 | .sort_values(by='name') \ 19 | .set_index('name') \ 20 | .fillna(0) 21 | self.df['max'] = 10000 # for now, let's say max value is 1kg for all foods 22 | self.df['cost'] = 1 23 | self.df['amount_var'] = self.df.apply( 24 | lambda food: pl.LpVariable(food.name, 0, food['max']), 25 | axis=1 26 | ) 27 | 28 | def missing_nutrients(self): 29 | non_nutrient_columns = ['name', 'food_group'] 30 | return { 31 | nutrient 32 | for nutrient in self.df 33 | if nutrient not in non_nutrient_columns 34 | and (self.df[nutrient] == 0).all() 35 | } 36 | 37 | class Log: 38 | def __init__(self,csv): 39 | self.df = pd.read_csv(csv) 40 | 41 | class Problem: 42 | def __init__(self, nutrient_table, food_table): 43 | self.excluded = nutrient_table.unnecessary | food_table.missing_nutrients() 44 | self.included = set(nutrient_table.df.index) - self.excluded 45 | self.nutrient_table = nutrient_table.df[nutrient_table.df.index.isin(self.included)].copy() 46 | self.food_table = food_table 47 | self.nutrient_matrix = self.food_table.df[self.included].T 48 | self.add_constraints() 49 | 50 | def add_constraints(self): 51 | self.prob = pl.LpProblem("meal_planner", pl.LpMinimize) 52 | 53 | N = self.nutrient_matrix 54 | f = self.food_table.df['amount_var'] 55 | c = self.food_table.df['cost'] 56 | 57 | # @ is Pandas operator for matrix multiplication / dot product 58 | self.nutrient_table['intake'] = N @ f 59 | self.cost = c @ f 60 | 61 | # constraints: 62 | # should be basically just: 63 | # daily['intake'] >= daily['min'] 64 | # daily['intake'] <= daily['max'] 65 | 66 | # or: 67 | # daily['min'] <= N @ f <= daily['max'] 68 | # minimize(c @ f) 69 | for min_val, max_val, intake in self.nutrient_table.values.tolist(): 70 | self.prob += intake >= min_val 71 | 72 | # if we could do inf for max_val then we wouldn't need the conditional 73 | if not pd.isna(max_val): 74 | self.prob += intake <= max_val 75 | 76 | # objective: 77 | self.prob += self.cost 78 | 79 | def solve(self): 80 | status = self.prob.solve(pl.PULP_CBC_CMD(msg=0)) 81 | foods_df = self.food_table.df 82 | foods_df['amount'] = foods_df.apply( 83 | lambda food: pl.value(food['amount_var']), 84 | axis = 1 85 | ) 86 | included = foods_df[foods_df['amount'] > 0] 87 | self.recipe = included[['amount']].copy() 88 | 89 | 90 | def test(): 91 | nutrient_table = NutrientRequirements( 92 | 'daily_intake.csv', 93 | { 94 | "chromium_mcg", 95 | "linoleic_acid_g", 96 | "iodine_mcg", 97 | "alpha_linolenic_acid_g", 98 | "chloride_g", 99 | "vitamin_b12_mcg", 100 | "vitamin_d_iu" 101 | } 102 | ) 103 | food_table = FoodNutrients('foods.csv') 104 | return Problem(nutrient_table, food_table) 105 | 106 | def test2(): 107 | return Log('test_log.csv').df 108 | 109 | 110 | def test3(): 111 | return pd.read_csv("test_nutrient_profiles.csv") 112 | -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | python3 -c 'import program; program.full_example()' 4 | -------------------------------------------------------------------------------- /test_log.csv: -------------------------------------------------------------------------------- 1 | "date","meal","food","id","unit","amount","servings" 2 | 08/01/21,"breakfast","eggs",4,"egg",2,2 3 | 08/01/21,"breakfast","banana",10,"banana",1,1 4 | 08/01/21,"breakfast","oatmeal",13,"packet",1,1 5 | 08/01/21,"breakfast","honey nut cheerios",30,"bowl",1,1 6 | 08/01/21,"breakfast","whole milk",3,"bowl",1,1 7 | 08/01/21,"breakfast","coffee, nguyen, light roast",33,"mug",1,1 8 | 08/01/21,"lunch","hummus",28,"serving",1,1 9 | 08/01/21,"lunch","pita chips",29,"cracker",12,2 10 | 08/01/21,"Lunch 2","bran flakes",35,"bowl",1,1 11 | 08/01/21,"Lunch 2","Milk, 2%",31,"bowl",1,1 12 | 08/01/21,"dinner","pork fried rice, The Orient",36,"container",0.5,0.5 13 | 08/01/21,"dinner","avocado roll, The Orient",21,"roll",1,1 14 | 08/01/21,"dinner","pepsi",37,"can",1,1 15 | 08/01/21,"dinner","dogfish head 60 minute ipa",38,"can",2,2 16 | 08/01/21,"dinner","tea",39,"mug",1,1 17 | 08/02/21,"breakfast","eggs",4,"egg",2,2 18 | 08/02/21,"breakfast","banana",10,"banana",1,1 19 | 08/02/21,"breakfast","honey nut cheerios",30,"bowl",1,1 20 | 08/02/21,"breakfast","whole milk",3,"bowl",1,1 21 | 08/02/21,"breakfast","brownie",40,"piece",1,1 22 | 08/02/21,"breakfast","coffee, nguyen, dark roast",34,"mug",1,1 23 | 08/02/21,"lunch","pork fried rice, The Orient",36,"container",0.5,0.5 24 | 08/02/21,"dinner","broccoli",15,"cup",2,2 25 | 08/02/21,"dinner","white rice",17,"cup",0.5,1 26 | 08/02/21,"dinner","teriyaki chicken",43,"oz",4,1 27 | 08/02/21,"dinner","coffee, nguyen, dark roast",34,"mug",1,1 28 | 08/02/21,"dessert","blueberry scone, Ashley",53,"scone",1,1 29 | 08/02/21,"dessert","coffee, nguyen, dark roast",34,"mug",1,1 30 | 08/03/21,"breakfast","french toast, home",54,"slice",4,4 31 | 08/03/21,"breakfast","eggs",4,"egg",2,2 32 | 08/03/21,"breakfast","coffee, nguyen, dark roast",34,"mug",1,1 33 | 08/03/21,"lunch","Strawberries (in smoothie)",55,"cup",1,1 34 | 08/03/21,"lunch","banana (in smoothie)",10,"banana",1,1 35 | 08/03/21,"lunch","honey nut cheerios",30,"bowl",1,1 36 | 08/03/21,"lunch","whole milk",3,"bowl",1,1 37 | 08/03/21,"lunch","tostitos, hint of lime",60,"servings",2,2 38 | 08/03/21,"lunch","salsa",61,"servings",1,1 39 | 08/03/21,"lunch","guacamole",22,"servings",1,1 40 | 08/03/21,"dinner","barbacoa quesadilla, chipotle",56,"quesadilla",0.25,0.25 41 | 08/03/21,"dinner","steak taco, chipotle",57,"taco",1,1 42 | 08/03/21,"dinner","beer, dogfishead 60 minute ipa",38,"can",1,1 43 | 08/03/21,"dinner","beer, flying dog",58,"bottle",1,1 44 | 08/03/21,"dessert","brownie, neighbor",40,"piece",1,1 45 | 08/03/21,"dessert","ice cream, vanilla, breyer’s",59,"scoop",1,1 46 | 08/04/21,"breakfast","honey nut cheerios",30,"bowl",1,1 47 | 08/04/21,"breakfast","whole milk",3,"bowl",1,1 48 | 08/04/21,"breakfast","coffee, nguyen, dark roast",34,"mug",1,1 49 | 08/04/21,"lunch","eggs",4,"egg",2,2 50 | 08/04/21,"lunch","tostitos, hint of lime",60,"servings",1,1 51 | 08/04/21,"lunch","salsa",61,"servings",1,1 52 | -------------------------------------------------------------------------------- /test_nutrient_profiles.csv: -------------------------------------------------------------------------------- 1 | "id","food","unit","serving size","Weight","Volume","Calories","Water","Protein","Carbs","Dietary fiber","Soluble fiber","Insoluble fiber","Total sugars","Added sugars","Total fat","Saturated fat","Trans fat","Polyunsaturated fat","Monounsaturated fat","Cholesterol","Vitamin A","Vitamin C","Vitamin D","Vitamin E","Vitamin K","Vitamin K1","Vitamin K2, MK-4","Niacin","Riboflavin","Thiamin","Vitamin B6","DFE (Dietary folate equivalents)","Folate","Folic Acid","Methylated folate","Vitamin B12","Pantothenic acid","Biotin","Choline","Carotenoids","Calcium","Chromium","Copper","Fluoride","Iodine","Iron","Magnesium","Manganese","Molybdenum","Nickel","Phosphorus","Potassium","Selenium","Zinc","Sodium","Chloride","Arsenic","Boron","Silicon","Sulfate","Vanadium","Omega-3","Caffeine","Alcohol","Mercury" 2 | 1,"Strawberry & banana blend","cup",1.25,,,80,,1,22,4,,,11,0,0,0,0,,,0,,46,0,,,,,,,,,,,,,,,,,,20,,,,,0.6,,,,,,340,,,0,,,,,,,,,, 3 | 2,"chobani oat milk","cup",1,,,,,2,11,2,,,7,7,6,0,0,,,0,135,,3,,,,,,,,,,,,,,,,,,313,,,,,,,,,,,360,,,100,,,,,,,,,, 4 | 3,"whole milk, horizon organic, organic grassfed","cup",1,,,,,8,13,0,,,12,0,9,5,0,0,2.5,35,90,,2.5,,,,,,0.5,,,,,,,1.3,,,,,330,,,,,,,,,,250,430,,,,,,,,,,,,, 5 | 4,"eggs, large, grade A, whole, organic, pete & gerry’s, Kurtz Farm","egg",1,,,70,,6,0,0,,,0,0,5,1.5,0,,,185,,,1,,,,,,,,,,,,,,,,,,30,,,,,0.9,,,,,,70,,,70,,,,,,,70,,, 6 | 5,"martin’s potato bread","slice",1,32,,90,,3,15,1,,,3,2,1.5,0,0,,,0,,,0,,,,,1,0.1,0.1,,49,,,,,,,,,53,,,,,1,,,,,,59,,,105,,,,,,,,,, 7 | 6,"turkey, sliced",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 8 | 7,"ritz crackers","cracker",5,,,80,,,10,0,,,1,1,4.5,1,0,,,0,,,0,,,,,,,,,,,,,,,,,,20,,,,,0.5,,,,,,10,,,130,,,,,,,,,, 9 | 8,"peanut butter, creamy, jif","tbsp",2,,,190,,7,8,2,,,3,2,16,3.5,0,,,0,,,0,2,,,,30,,,,,,,,,,,,,17,,,,,1,,,,,,185,,,140,,,,,,,,,, 10 | 9,"wise guys cheese steak",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 11 | 10,"banana, Chiquita","banana",1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 12 | 11,"Strawberry & mango blend","cup",1,,,70,,1,17,2,,,13,0,0,0,0,,,0,,56,0,,,,,,,,,,,,,,,,,,20,,,,,0.5,,,,,,190,,,,,,,,,,,,, 13 | 12,"Cran-blackberry juice, ocean spray","cup",1,,,100,,0,27,,,,25,24,0,,,,,,,90,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,5,,,,,,,,,, 14 | 13,"oatmeal, instant, Quaker, maple & brown sugar","packet",1,43,,160,,4,33,3,1,,12,12,2,0.5,0,0.5,1,0,,,0,,,,,,,,,,,,,,,,,,20,,,,,1.1,,,,,,110,,,260,,,,,,,,,, 15 | 14,"oatmeal, instant, Quaker, bluberry strawberry","packet",1,39,,140,,4,29,3,1,,8,7,2,0.5,0,0.5,1,0,,,0,,,,,,,,,,,,,,,,,,20,,,,,1.2,,,,,,130,,,120,,,,,,,,,, 16 | 15,"broccoli, Good & Gather","cup",1,85,,30,,3,4,2,,,1,0,0,0,0,,,0,,,0,,,,,,,,,,,,,,,,,,41,,,,,6,,,,,,276,,,25,,,,,,,,,, 17 | 16,"brussels sprouts",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 18 | 17,"white rice",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 19 | 18,"potatoes, mini red",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 20 | 19,"salmon",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 21 | 20,"avocado",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 22 | 21,"avocado roll, The Orient",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 23 | 22,"guacamole",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 24 | 23,"lime juice",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 25 | 24,"lime",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 26 | 25,"ground turkey",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 27 | 26,"flour tortilla, Mission","tortilla",1,49,,140,,4,24,1,,,2,1,3,1,0,,,0,,,0,,,,,,,,,,,,,,,,,,90,,,,,2,,,,,,50,,,410,,,,,,,,,, 28 | 27,"black beans",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 29 | 28,"hummus, Good & Gather, Roasted Artichoke & Spinach","tbsp",2,30,,80,,2,5,1,,,1,0,6,0.5,0,,,0,,,0.00%,,,,,,,,,,,,,,,,,,2.00%,,,,,6.00%,,,,,,2.00%,,,140,,,,,,,,,, 30 | 29,"pita crackers, sea salt","cracker",6,15,,70,,1,11,,,,,,2.5,0,0,1,1,0,,,0,,,,,,,,,,,,,,,,,,0,,,,,0.5,,,,,,20,,,140,,,,,,,,,, 31 | 30,"honey nut cheerios","cup",1,37,,140,,3,30,3,,,12,12,2,0,0,0.5,0.5,0,10.00%,10.00%,2,,,,,10.00%,10.00%,20.00%,20.00%,,20.00%,45,,20.00%,,,,,130,,,,,3.6,8.00%,,,,8.00%,150,,20.00%,210,,,,,,,,,, 32 | 31,"2% milk",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 33 | 32,"french toast",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 34 | 33,"coffee, nguyen, light roast",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 35 | 34,"coffee, nguyen, dark roast",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 36 | 35,"bran flakes",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 37 | 36,"pork fried rice, The Orient",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 38 | 37,"pepsi",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 39 | 38,"beer, dogfishhead, 60 minute IPA",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 40 | 39,"tea, mint (brand?)",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 41 | 40,"brownie (brand?)",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 42 | 41,"olive oil, California Olive Ranch, extra virgin, everyday blend, cold pressed",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 43 | 42,"chicken breast, thin sliced, Perdue Fresh Cuts","oz",4,112,,120,,25,0,0,,,0,,2,0,0,,,80,0.00%,0.00%,,,,,,,,,,,,,,,,,,,0.00%,,,,,2.00%,,,,,,,,,75,,,,,,,,,, 44 | 43,"teriyaki chicken, Megan’s recipe","oz",4,112,,120,,25,0,0,,,0,,2,0,0,,,80,0.00%,0.00%,,,,,,,,,,,,,,,,,,,0.00%,,,,,2.00%,,,,,,,,,75,,,,,,,,,, 45 | 44,"teriyaki sauce, Veri Veri",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 46 | 45,"salt",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 47 | 46,"garlic powder",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 48 | 47,"onion powder",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 49 | 48,"cumin",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 50 | 49,"smoked paprika",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 51 | 50,"pepper",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 52 | 51,"chipotle powder",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 53 | 52,"shishito peppers",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 54 | 53,"blueberry scone, Ashley","scone",1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 55 | 54,"french toast, my recipe","slice",1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 56 | 55,"strawberries","cup",1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 57 | 56,"barbacoa quesadilla, chipotle",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 58 | 57,"steak taco, chipotle",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 59 | 58,"beer, flying dog",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 60 | 59,"ice cream, vanilla, breyer’s",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 61 | 60,"Tortilla chips, tostitos, hint of lime","chips",6,28,,150,,2,18,1,,,"<1g",,7,1,0,,,0,,,0,,,,,,,,,,,,,,,,,,30,,,,,0.3,,,,,,40,,,130,,,,,,,,,, 62 | 61,"salsa, medium, green mountain gringo","tbsp",2,31,,10,,0,2,1,,,1,0,0,0,0,,,0,,,0.00%,,,,,,,,,,,,,,,,,,11,,,,,0,,,,,,107,,,80,,,,,,,,,, 63 | -------------------------------------------------------------------------------- /to.do: -------------------------------------------------------------------------------- 1 | # incorporate recipes 2 | # use official sources for daily nutrient requirements 3 | # use official sources for food-nutrient database 4 | # incorporate units 5 | # * minimum units, i.e. foods/ingredients should be treated as having 6 | # finite granularity; can't arbitrarily subdivide, ex. you might include 7 | # half a grapefruit in a recipe but nobody's doing 0.3423232344 of a grapefruit 8 | --------------------------------------------------------------------------------