Skip to content

About

Static data assets for the NutriLog app: ANSES-CIQUAL food table (Licence Ouverte) and an Open Food Facts slice (ODbL v1.0).

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

nutriapp-data

Static data assets for the NutriLog nutrition tracking app. No application code lives here.

The app has no backend: it stores everything in on-device SQLite and runs search and macro aggregation there. The only thing it fetches from the network is the data below, published here as release assets.

Assets

Fetched from /releases/latest/download/, so the URL is stable across data rebuilds:

File What it is
ciqual.json ANSES-CIQUAL food composition table, deduplicated and renamed
off_fr.db SQLite slice of the Open Food Facts database (French products, most-scanned first)
version.json Build hashes, row counts, and the provenance of both datasets

version.json carries the source, licence and URL for each dataset, so an asset separated from this README still says where it came from.

Provenance and licence

The two datasets are under different licences and are deliberately kept as separate files. Merging them into a single database would extend ODbL's share-alike to the CIQUAL data, which its own licence never required.

off_fr.db — ODbL v1.0

Derived from the Open Food Facts database, which is made available under the Open Database License (ODbL) v1.0. This derived database, and tools/build_off_slice.py which produces it, are published under the same licence — see LICENSE.

Contains 200,000 products, selected by scan popularity, with rows dropped where the nutrition values contradict themselves.

ciqual.json — Licence Ouverte / Open Licence

Derived from the ANSES-CIQUAL French food composition table, Ciqual 2020, published by ANSES under the Licence Ouverte / Open Licence. Source: https://ciqual.anses.fr

The data has been modified: deduplicated by food code, columns renamed to the application's own names, and missing values normalised.

Neither dataset is endorsed by, nor produced in association with, ANSES or Open Food Facts.

Rebuilding

tools/ holds the script that builds the Open Food Facts slice, published because ODbL requires it. It needs the upstream dump first (~7.7 GB, downloaded once):

curl -L -C - -o ~/data/openfoodfacts/food.parquet \
  https://huggingface.co/datasets/openfoodfacts/product-database/resolve/main/food.parquet

python tools/build_off_slice.py --self-check
python tools/build_off_slice.py --top 200000

Requires Python 3.13 with duckdb.

About

Static data assets for the NutriLog app: ANSES-CIQUAL food table (Licence Ouverte) and an Open Food Facts slice (ODbL v1.0).

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages