Download dataset-metadata.json from EduDevCommons/global-packaged-food: direct link, hf CLI and curl.
- Browser
- Download file 23.2 kB
-
https://huggingface.co/datasets/EduDevCommons/global-packaged-food/resolve/main/dataset-metadata.json
- Command line
-
hf download hf://datasets/EduDevCommons/global-packaged-food/dataset-metadata.json
-
curl -L -o dataset-metadata.json https://huggingface.co/datasets/EduDevCommons/global-packaged-food/resolve/main/dataset-metadata.json
23.2 kB
| { | |
| "title": "Global Packaged Food", | |
| "id": "samyakrajbayar/global-packaged-food", | |
| "subtitle": "16,091 grocery products with Nutri-Score, NOVA, nutrients and additives", | |
| "description": "# Global Packaged Food\n\n**Subtitle:** 16,091 grocery products with Nutri-Score, NOVA, nutrients and additives\n\n**Tags:** `food`, `nutrition`, `health`, `tabular`\n\n**Dataset File:** `food_products.csv` (18,638 rows, 67 columns, 15.6 MB)\n\n**Provenance & Source:** Open Food Facts Database (openfoodfacts.org)\n\n**Expected Update Frequency:** `annually`\n\n---\n\n## \ud83d\udcd6 Description\n\n### Packaged food, label by label\n\nOpen Food Facts is a crowd-sourced database of barcoded food products from around the world. This\nsnapshot samples **16,091 products** across 36 grocery categories and extracts\n**67 parameters** per product, from the ingredient list to the Nutri-Score.\n\nColumns span:\n- **Product identity** \u2014 barcode, name, generic name, brands, categories and category tags, quantity,\n serving size, packaging and packaging tags.\n- **Where and how it is sold** \u2014 countries and country tags, stores, manufacturing places, origins,\n label and certification tags.\n- **Ingredients** \u2014 ingredient text and count, allergen count, additive tags and count, palm-oil flag.\n- **Nutrition per 100 g** \u2014 energy, fat, saturated fat, carbohydrates, sugars, added sugars, fibre,\n protein, salt and sodium.\n- **Scores** \u2014 Nutri-Score grade and score, Eco-Score grade and score, NOVA processing group, plus\n derived ultra-processed / processed / unprocessed flags.\n- **Derived nutrition** \u2014 energy shares from sugar, fat and protein; high-sugar, high-salt, high-fat,\n high-fibre and high-protein flags; nutrition completeness percentage.\n- **Diet flags** \u2014 organic, vegan, vegetarian, gluten-free, beverage and snack indicators.\n\n**7,257 products (45.1%)** are NOVA group 4 (ultra-processed) and **16,090**\nhave a Nutri-Score, so the file supports both nutrition science and label-regulation analysis.\n\n## \ud83e\uddfe Columns (67)\n\n`code`, `product_name`, `generic_name`, `brands`, `brand_count`, `categories`, `categories_tags`, `category_count`, `countries`, `countries_tags`, `country_count`, `quantity`, `product_quantity_g`, `serving_size`, `packaging`, `packaging_tags`, `labels`, `labels_tags`, `allergens`, `allergen_count`, `additives_tags`, `additive_count`, `ingredients_text`, `ingredient_count`, `image_url`, `nutriscore_grade`, `nutriscore_score`, `ecoscore_grade`, `ecoscore_score`, `nova_group`, `manufacturing_places`, `stores`, `origins`, `lang`, `energy_kcal_100g`, `fat_100g`, `saturated_fat_100g`, `carbohydrates_100g`, `sugars_100g`, `added_sugars_100g`, `fiber_100g`, `proteins_100g`, `salt_100g`, `sodium_100g`, `is_ultra_processed`, `is_processed`, `is_unprocessed`, `has_nutriscore`, `has_ecoscore`, `is_organic`, `is_vegan`, `is_vegetarian`, `is_gluten_free`, `contains_palm_oil`, `is_beverage`, `is_snack`, `sugar_energy_pct`, `fat_energy_pct`, `protein_energy_pct`, `is_high_sugar`, `is_high_salt`, `is_high_fat`, `is_high_fiber`, `is_high_protein`, `nutrition_fields_present`, `nutrition_completeness_pct`, `label_count`\n\n## \ud83d\udca1 Ideas for using this data\n\n1. **Nutri-Score versus NOVA** \u2014 do ultra-processed products always score badly? Cross-tabulate the two systems.\n2. **Sugar in disguise** \u2014 sugar energy share by category; find products where sugar provides most of the calories.\n3. **Category nutrition profiles** \u2014 median sugar/salt/fat per category, with confidence intervals.\n4. **Additive load** \u2014 which categories carry the most E-numbers, and does additive count predict Nutri-Score?\n5. **Label claims** \u2014 organic, vegan and gluten-free prevalence by country and category.\n6. **Country comparison** \u2014 average Nutri-Score by country tag; is the same product formulated differently?\n7. **Front-of-pack images** \u2014 the `image_url` column makes this a ready-made image-classification manifest.\n8. **Missingness** \u2014 nutrition completeness varies by category and country; quantify the bias before modelling.\n9. **Ingredient text NLP** \u2014 extract ingredient names and build a co-occurrence network of the food supply.\n\n## \ud83d\udcc1 Files\n\n| File | What it is |\n|---|---|\n| `food_products.csv` | 16,091 food products x 67 parameters. |\n| `data_dictionary.csv` | Column / type / description for every field. |\n| `notebook.ipynb` | Starter notebook: Nutri-Score, nutrients, categories, labels. |\n| `dataset-metadata.json` | Kaggle API metadata. |\n| `about.md` | Plain-text About block. |\n\n## \ud83c\udff7\ufe0f Tags\n\n`food`, `nutrition`, `health`, `open-food-facts`, `groceries`, `diet`, `nutriscore`, `tabular`, `consumer`, `europe`\n\n## \ud83d\udd17 Provenance\n\n- **Source:** **Open Food Facts** search API v2\n (`https://world.openfoodfacts.org/api/v2/search`), category queries with an explicit field list.\n- **Sampling:** the first five pages of 100 products in each of 36 grocery categories, deduplicated by\n barcode \u2014 a category-stratified sample, not a random sample of the 3-million-product database.\n- **Upstream:** crowd-sourced labels, ingredient lists and nutrition tables, with Nutri-Score,\n Eco-Score and NOVA values computed by Open Food Facts where enough data exists.\n- **Derived columns:** brand/category/country/allergen/additive counts, diet and processing flags,\n energy shares, nutrient-threshold flags, nutrition completeness.\n- **Snapshot date:** 21 November 2026.\n\n## \ud83d\udd04 Update frequency\n\n**Continuous upstream; snapshot here.** Open Food Facts is edited daily by volunteers. Re-run `scripts/29_food.py` for a new sample.\n\n## \u26a0\ufe0f Caveats\n\n- Crowd-sourced data: values are only as good as the volunteer who entered them, and coverage is heavily European.\n- Nutrition values are per 100 g as declared; missing values are left blank rather than imputed.\n- Nutri-Score and NOVA are only present for a minority of products and use different algorithms over time.\n- `product_quantity_g` is parsed from a free-text field and fails for multi-packs and non-gram units.\n- The sample is category-stratified (five pages per category), so it is not representative of the whole database.\n- Ingredient text is truncated at 800 characters in this extract.\n- Some records are duplicates or retired products that remain in the database.\n\n## \ud83d\udcdc Licence\n\nOpen Database License (ODbL 1.0) \u2014 Open Food Facts contributors. Share-alike and attribution apply to derived databases.\n\n### \ud83d\udccb Column Definitions & File Header\n\n| # | Column Name | Data Type | Description |\n|---|---|---|---|\n| 1 | `code` | `number` | Open Food Facts barcode (EAN/UPC). |\n| 2 | `product_name` | `string` | Product name as entered. |\n| 3 | `generic_name` | `string` | Generic product name. |\n| 4 | `brands` | `string` | Brand(s), comma-separated. |\n| 5 | `brand_count` | `number` | Number of brands listed. |\n| 6 | `categories` | `string` | Human-readable category path. |\n| 7 | `categories_tags` | `string` | Normalised category tags (semicolon-joined). |\n| 8 | `category_count` | `number` | Number of category tags. |\n| 9 | `countries` | `string` | Countries where the product is sold. |\n| 10 | `countries_tags` | `string` | Normalised country tags. |\n| 11 | `country_count` | `number` | Number of countries. |\n| 12 | `quantity` | `string` | Net quantity as printed (free text). |\n| 13 | `product_quantity_g` | `number` | Net quantity parsed to grams where possible. |\n| 14 | `serving_size` | `string` | Serving size as printed. |\n| 15 | `packaging` | `string` | Packaging description. |\n| 16 | `packaging_tags` | `string` | Normalised packaging tags. |\n| 17 | `labels` | `string` | Labels and certifications as printed. |\n| 18 | `labels_tags` | `string` | Normalised label tags. |\n| 19 | `allergens` | `string` | Allergens as printed. |\n| 20 | `allergen_count` | `number` | Number of allergen tags. |\n| 21 | `additives_tags` | `string` | Normalised additive tags (E-numbers). |\n| 22 | `additive_count` | `number` | Number of additives. |\n| 23 | `ingredients_text` | `string` | Ingredient list (truncated to 800 characters). |\n| 24 | `ingredient_count` | `number` | Comma-separated ingredient count. |\n| 25 | `image_url` | `string` | Front-of-pack image URL. |\n| 26 | `nutriscore_grade` | `string` | Nutri-Score letter (a-e), where computed. |\n| 27 | `nutriscore_score` | `number` | Nutri-Score numeric score (lower is better). |\n| 28 | `ecoscore_grade` | `string` | Eco-Score letter (a-e), where computed. |\n| 29 | `ecoscore_score` | `number` | Eco-Score numeric score. |\n| 30 | `nova_group` | `number` | NOVA processing group 1-4. |\n| 31 | `manufacturing_places` | `string` | Manufacturing locations as declared. |\n| 32 | `stores` | `string` | Retail chains listed. |\n| 33 | `origins` | `string` | Country of origin as declared. |\n| 34 | `lang` | `string` | Language of the record. |\n| 35 | `energy_kcal_100g` | `number` | Energy per 100 g in kcal. |\n| 36 | `fat_100g` | `number` | Fat per 100 g (g). |\n| 37 | `saturated_fat_100g` | `number` | Saturated fat per 100 g (g). |\n| 38 | `carbohydrates_100g` | `number` | Carbohydrates per 100 g (g). |\n| 39 | `sugars_100g` | `number` | Sugars per 100 g (g). |\n| 40 | `added_sugars_100g` | `number` | Added sugars per 100 g (g), where declared. |\n| 41 | `fiber_100g` | `number` | Fibre per 100 g (g). |\n| 42 | `proteins_100g` | `number` | Protein per 100 g (g). |\n| 43 | `salt_100g` | `number` | Salt per 100 g (g). |\n| 44 | `sodium_100g` | `number` | Sodium per 100 g (g). |\n| 45 | `is_ultra_processed` | `boolean` | true when NOVA group is 4. |\n| 46 | `is_processed` | `boolean` | true when NOVA group is 3. |\n| 47 | `is_unprocessed` | `boolean` | true when NOVA group is 1. |\n| 48 | `has_nutriscore` | `boolean` | true when a Nutri-Score grade exists. |\n| 49 | `has_ecoscore` | `boolean` | true when an Eco-Score grade exists. |\n| 50 | `is_organic` | `boolean` | true when an organic label is present. |\n| 51 | `is_vegan` | `boolean` | true when a vegan label is present. |\n| 52 | `is_vegetarian` | `boolean` | true when a vegetarian label is present. |\n| 53 | `is_gluten_free` | `boolean` | true when a gluten-free label is present. |\n| 54 | `contains_palm_oil` | `boolean` | true when the ingredients mention palm oil. |\n| 55 | `is_beverage` | `boolean` | true when the category indicates a drink. |\n| 56 | `is_snack` | `boolean` | true when the category indicates a snack or biscuit. |\n| 57 | `sugar_energy_pct` | `number` | Share of energy from sugars (sugars x 4 / kcal x 100). |\n| 58 | `fat_energy_pct` | `number` | Share of energy from fat (fat x 9 / kcal x 100). |\n| 59 | `protein_energy_pct` | `number` | Share of energy from protein (protein x 4 / kcal x 100). |\n| 60 | `is_high_sugar` | `boolean` | true when sugars exceed 22.5 g/100 g. |\n| 61 | `is_high_salt` | `boolean` | true when salt exceeds 1.5 g/100 g. |\n| 62 | `is_high_fat` | `boolean` | true when fat exceeds 17.5 g/100 g. |\n| 63 | `is_high_fiber` | `boolean` | true when fibre exceeds 6 g/100 g. |\n| 64 | `is_high_protein` | `boolean` | true when protein exceeds 20 g/100 g. |\n| 65 | `nutrition_fields_present` | `number` | How many of the ten core nutrient fields are filled. |\n| 66 | `nutrition_completeness_pct` | `number` | Nutrition fields present as a percentage of ten. |\n| 67 | `label_count` | `number` | Number of label tags. |\n\n\n\n---\n\n## \ud83c\udf1f Support & Community\nIf you find this dataset valuable for your research, portfolio, or machine learning projects, **please give it an upvote (\ud83d\udc4d) on Kaggle!**\nFeedback, questions, and notebook submissions are warmly welcomed in the Discussions tab.\n", | |
| "isPrivate": false, | |
| "licenses": [ | |
| { | |
| "name": "ODbL-1.0" | |
| } | |
| ], | |
| "keywords": [ | |
| "food", | |
| "nutrition", | |
| "health", | |
| "tabular" | |
| ], | |
| "resources": [ | |
| { | |
| "path": "food_products.csv", | |
| "description": "Primary dataset file containing 18,638 records across 67 parameters.", | |
| "schema": { | |
| "fields": [ | |
| { | |
| "name": "code", | |
| "type": "number", | |
| "description": "Open Food Facts barcode (EAN/UPC)." | |
| }, | |
| { | |
| "name": "product_name", | |
| "type": "string", | |
| "description": "Product name as entered." | |
| }, | |
| { | |
| "name": "generic_name", | |
| "type": "string", | |
| "description": "Generic product name." | |
| }, | |
| { | |
| "name": "brands", | |
| "type": "string", | |
| "description": "Brand(s), comma-separated." | |
| }, | |
| { | |
| "name": "brand_count", | |
| "type": "number", | |
| "description": "Number of brands listed." | |
| }, | |
| { | |
| "name": "categories", | |
| "type": "string", | |
| "description": "Human-readable category path." | |
| }, | |
| { | |
| "name": "categories_tags", | |
| "type": "string", | |
| "description": "Normalised category tags (semicolon-joined)." | |
| }, | |
| { | |
| "name": "category_count", | |
| "type": "number", | |
| "description": "Number of category tags." | |
| }, | |
| { | |
| "name": "countries", | |
| "type": "string", | |
| "description": "Countries where the product is sold." | |
| }, | |
| { | |
| "name": "countries_tags", | |
| "type": "string", | |
| "description": "Normalised country tags." | |
| }, | |
| { | |
| "name": "country_count", | |
| "type": "number", | |
| "description": "Number of countries." | |
| }, | |
| { | |
| "name": "quantity", | |
| "type": "string", | |
| "description": "Net quantity as printed (free text)." | |
| }, | |
| { | |
| "name": "product_quantity_g", | |
| "type": "number", | |
| "description": "Net quantity parsed to grams where possible." | |
| }, | |
| { | |
| "name": "serving_size", | |
| "type": "string", | |
| "description": "Serving size as printed." | |
| }, | |
| { | |
| "name": "packaging", | |
| "type": "string", | |
| "description": "Packaging description." | |
| }, | |
| { | |
| "name": "packaging_tags", | |
| "type": "string", | |
| "description": "Normalised packaging tags." | |
| }, | |
| { | |
| "name": "labels", | |
| "type": "string", | |
| "description": "Labels and certifications as printed." | |
| }, | |
| { | |
| "name": "labels_tags", | |
| "type": "string", | |
| "description": "Normalised label tags." | |
| }, | |
| { | |
| "name": "allergens", | |
| "type": "string", | |
| "description": "Allergens as printed." | |
| }, | |
| { | |
| "name": "allergen_count", | |
| "type": "number", | |
| "description": "Number of allergen tags." | |
| }, | |
| { | |
| "name": "additives_tags", | |
| "type": "string", | |
| "description": "Normalised additive tags (E-numbers)." | |
| }, | |
| { | |
| "name": "additive_count", | |
| "type": "number", | |
| "description": "Number of additives." | |
| }, | |
| { | |
| "name": "ingredients_text", | |
| "type": "string", | |
| "description": "Ingredient list (truncated to 800 characters)." | |
| }, | |
| { | |
| "name": "ingredient_count", | |
| "type": "number", | |
| "description": "Comma-separated ingredient count." | |
| }, | |
| { | |
| "name": "image_url", | |
| "type": "string", | |
| "description": "Front-of-pack image URL." | |
| }, | |
| { | |
| "name": "nutriscore_grade", | |
| "type": "string", | |
| "description": "Nutri-Score letter (a-e), where computed." | |
| }, | |
| { | |
| "name": "nutriscore_score", | |
| "type": "number", | |
| "description": "Nutri-Score numeric score (lower is better)." | |
| }, | |
| { | |
| "name": "ecoscore_grade", | |
| "type": "string", | |
| "description": "Eco-Score letter (a-e), where computed." | |
| }, | |
| { | |
| "name": "ecoscore_score", | |
| "type": "number", | |
| "description": "Eco-Score numeric score." | |
| }, | |
| { | |
| "name": "nova_group", | |
| "type": "number", | |
| "description": "NOVA processing group 1-4." | |
| }, | |
| { | |
| "name": "manufacturing_places", | |
| "type": "string", | |
| "description": "Manufacturing locations as declared." | |
| }, | |
| { | |
| "name": "stores", | |
| "type": "string", | |
| "description": "Retail chains listed." | |
| }, | |
| { | |
| "name": "origins", | |
| "type": "string", | |
| "description": "Country of origin as declared." | |
| }, | |
| { | |
| "name": "lang", | |
| "type": "string", | |
| "description": "Language of the record." | |
| }, | |
| { | |
| "name": "energy_kcal_100g", | |
| "type": "number", | |
| "description": "Energy per 100 g in kcal." | |
| }, | |
| { | |
| "name": "fat_100g", | |
| "type": "number", | |
| "description": "Fat per 100 g (g)." | |
| }, | |
| { | |
| "name": "saturated_fat_100g", | |
| "type": "number", | |
| "description": "Saturated fat per 100 g (g)." | |
| }, | |
| { | |
| "name": "carbohydrates_100g", | |
| "type": "number", | |
| "description": "Carbohydrates per 100 g (g)." | |
| }, | |
| { | |
| "name": "sugars_100g", | |
| "type": "number", | |
| "description": "Sugars per 100 g (g)." | |
| }, | |
| { | |
| "name": "added_sugars_100g", | |
| "type": "number", | |
| "description": "Added sugars per 100 g (g), where declared." | |
| }, | |
| { | |
| "name": "fiber_100g", | |
| "type": "number", | |
| "description": "Fibre per 100 g (g)." | |
| }, | |
| { | |
| "name": "proteins_100g", | |
| "type": "number", | |
| "description": "Protein per 100 g (g)." | |
| }, | |
| { | |
| "name": "salt_100g", | |
| "type": "number", | |
| "description": "Salt per 100 g (g)." | |
| }, | |
| { | |
| "name": "sodium_100g", | |
| "type": "number", | |
| "description": "Sodium per 100 g (g)." | |
| }, | |
| { | |
| "name": "is_ultra_processed", | |
| "type": "boolean", | |
| "description": "true when NOVA group is 4." | |
| }, | |
| { | |
| "name": "is_processed", | |
| "type": "boolean", | |
| "description": "true when NOVA group is 3." | |
| }, | |
| { | |
| "name": "is_unprocessed", | |
| "type": "boolean", | |
| "description": "true when NOVA group is 1." | |
| }, | |
| { | |
| "name": "has_nutriscore", | |
| "type": "boolean", | |
| "description": "true when a Nutri-Score grade exists." | |
| }, | |
| { | |
| "name": "has_ecoscore", | |
| "type": "boolean", | |
| "description": "true when an Eco-Score grade exists." | |
| }, | |
| { | |
| "name": "is_organic", | |
| "type": "boolean", | |
| "description": "true when an organic label is present." | |
| }, | |
| { | |
| "name": "is_vegan", | |
| "type": "boolean", | |
| "description": "true when a vegan label is present." | |
| }, | |
| { | |
| "name": "is_vegetarian", | |
| "type": "boolean", | |
| "description": "true when a vegetarian label is present." | |
| }, | |
| { | |
| "name": "is_gluten_free", | |
| "type": "boolean", | |
| "description": "true when a gluten-free label is present." | |
| }, | |
| { | |
| "name": "contains_palm_oil", | |
| "type": "boolean", | |
| "description": "true when the ingredients mention palm oil." | |
| }, | |
| { | |
| "name": "is_beverage", | |
| "type": "boolean", | |
| "description": "true when the category indicates a drink." | |
| }, | |
| { | |
| "name": "is_snack", | |
| "type": "boolean", | |
| "description": "true when the category indicates a snack or biscuit." | |
| }, | |
| { | |
| "name": "sugar_energy_pct", | |
| "type": "number", | |
| "description": "Share of energy from sugars (sugars x 4 / kcal x 100)." | |
| }, | |
| { | |
| "name": "fat_energy_pct", | |
| "type": "number", | |
| "description": "Share of energy from fat (fat x 9 / kcal x 100)." | |
| }, | |
| { | |
| "name": "protein_energy_pct", | |
| "type": "number", | |
| "description": "Share of energy from protein (protein x 4 / kcal x 100)." | |
| }, | |
| { | |
| "name": "is_high_sugar", | |
| "type": "boolean", | |
| "description": "true when sugars exceed 22.5 g/100 g." | |
| }, | |
| { | |
| "name": "is_high_salt", | |
| "type": "boolean", | |
| "description": "true when salt exceeds 1.5 g/100 g." | |
| }, | |
| { | |
| "name": "is_high_fat", | |
| "type": "boolean", | |
| "description": "true when fat exceeds 17.5 g/100 g." | |
| }, | |
| { | |
| "name": "is_high_fiber", | |
| "type": "boolean", | |
| "description": "true when fibre exceeds 6 g/100 g." | |
| }, | |
| { | |
| "name": "is_high_protein", | |
| "type": "boolean", | |
| "description": "true when protein exceeds 20 g/100 g." | |
| }, | |
| { | |
| "name": "nutrition_fields_present", | |
| "type": "number", | |
| "description": "How many of the ten core nutrient fields are filled." | |
| }, | |
| { | |
| "name": "nutrition_completeness_pct", | |
| "type": "number", | |
| "description": "Nutrition fields present as a percentage of ten." | |
| }, | |
| { | |
| "name": "label_count", | |
| "type": "number", | |
| "description": "Number of label tags." | |
| } | |
| ] | |
| } | |
| }, | |
| { | |
| "path": "data_dictionary.csv", | |
| "description": "Field-level data dictionary detailing column names, data types, and semantic definitions." | |
| }, | |
| { | |
| "path": "notebook.ipynb", | |
| "description": "Jupyter starter notebook providing exploratory data analysis." | |
| } | |
| ] | |
| } |