# west-african-foods
Structured nutrition data for West African foods — with the aliases, household
portions and recipe compositions that a food composition table does not give you.
Built on the **FAO/INFOODS Food Composition Table for Western Africa (WAFCT
2019)**, but not a spreadsheet-to-JSON dump. The value is in the layer on top.
```bash
npm install @west-african-foods/core @west-african-foods/data-wafct
```
```js
import { createFoodDb } from "@west-african-foods/core";
import dataset from "@west-african-foods/data-wafct";
const food = createFoodDb(dataset);
food.search("akara");
food.nutrients("akara", { grams: 180 });
food.convertPortion("egusi-soup", "ladle", 2);
food.calculateRecipe([
{ food: "white-rice-cooked", grams: 300 },
{ food: "tomato-stew", grams: 120 },
]);
```
> **Licence, up front:** the code is MIT; the **data is CC BY-NC-SA 3.0 IGO and
> is not free for commercial use**. This is a real constraint, not boilerplate.
> Read DATA-LICENSE.md before you ship anything.
---
## Why this exists
WAFCT 2019 is an excellent table — 1 028 foods, 57 components, four years of
work by INFOODS researchers across Africa. It is also, as published, difficult
to build a product on:
- It is an Excel workbook, not an API.
- Foods are named botanically. It lists *"Cassava, grated, from fermented white
cassava, toasted without oil (white gari)"*. Your users type **"garri"**.
- **The dishes people actually eat are largely missing.** There is no Nigerian
jollof rice, no egusi soup, no akara, no waakye, no suya, no thieboudienne.
The dish coverage skews hard to one country: 104 entries are marked Burkina
Faso, against 25 for Nigeria and 21 for Ghana.
- Values carry meaning that a naive parse destroys. `[0.2]` is a *calculated*
value, `tr` is a trace, and an empty cell means **no data** — which is not
the same as zero, though a lot of software treats it that way.
This project addresses each of those.
## What it adds on top of FAO
**Regional aliases.** 201 ali …