thali is an R package for the Indian Food Composition Tables (IFCT) 2017, published by the National Institute of Nutrition (NIN), ICMR, Hyderabad. The data covers 528 Indian foods across 12 nutrient categories.
Named after the thali, the Indian platter that puts a whole meal on one plate.
Installation
# install.packages("remotes")
remotes::install_github("saketkc/thali")What’s in the data
| Table | Content | Foods |
|---|---|---|
thali_proximate |
Protein, fat, carbs, fibre, energy | 528 |
thali_vitamins_water |
B1–B9, vitamin C | 529 |
thali_vitamins_fat |
Tocopherols, vitamin K, retinol, vitamin D | 528 |
thali_carotenoids |
Lutein, zeaxanthin, carotenes, lycopene | 329 |
thali_minerals |
Ca, Fe, Mg, P, K, Na, Zn, Se, and 12 trace elements | 528 |
thali_sugars |
Starch, fructose, glucose, sucrose, maltose | 314 |
thali_fatty_acids |
Individual saturated and monounsaturated FAs | 505 |
thali_amino_acids |
10 essential + 8 non-essential amino acids | 411 |
thali_organic_acids |
Oxalate, citric, malic, tartaric, and others | 195 |
thali_polyphenols |
33 compounds across phenolic acids, flavones, catechins | 252 |
thali_oligosaccharides |
Raffinose, stachyose, phytosterols, phytic acid, saponins | 186 |
thali_edible_oils |
Fatty acid % of 13 Indian oils and fats | 13 |
Every table has a matching _se counterpart (e.g. thali_proximate_se) with standard errors, NA where not reported.
Quick start
library(thali)
# Search for a food item
search_food("dal")
# Get its amino acid profile
get_nutrition("Bengal gram", table = "amino_acids")
# All nutrients for one food
food_profile("Egg")
# Compose a meal and scale by portion weight
meal <- compose_meal(c(
"Rice" = 150,
"Bengal gram" = 100,
"Spinach" = 80,
"Milk" = 100
))
meal$proximateVisualisation
# Nutrient fingerprint radar: one panel per category
thali_plot(c("Rice" = 150, "Bengal gram" = 100, "Spinach" = 80, "Milk" = 100))
# Overlay two meals for comparison
thali_plot(list(
"Rice-based" = c("Rice" = 150, "Bengal gram" = 100, "Spinach" = 80),
"Wheat-based" = c("Wheat flour" = 150, "Red gram" = 100, "Spinach" = 80)
))
# Top-20 iron sources among leafy vegetables
plot_ranked(
table = "minerals",
nutrient = "Iron_Fe(mg)",
se_table = thali_minerals_se,
food_group = "Green Leafy Vegetables"
)
# PCA of amino acid profiles
pca <- run_pca("amino_acids")
plot_pca(pca, title = "Amino acid profiles: IFCT 2017")Sampling regions
NIN/ICMR sampled foods across six geographical regions. thali_regions maps each region to its compositing centre and constituent states. decode_region() converts a state name to its region.
thali_regions
decode_region(c("Kerala", "Punjab", "Assam"))
# [1] "South" "North" "Northeast"Reference
National Institute of Nutrition, ICMR (2017). Indian Food Composition Tables 2017. NIN, Hyderabad. https://www.nin.res.in/ebooks/IFCT2017.pdf