{
  "format": "dataset-manifest/1",
  "slug": "ai-powered-recipe-ingredient-substitution-tool",
  "version": 1,
  "seed": "ai-powered-recipe-ingredient-substitution-tool:1",
  "spec": {
    "format": "dataset/1",
    "slug": "ai-powered-recipe-ingredient-substitution-tool",
    "name": "Ingredient Substitution Insights",
    "tagline": "Ingredient substitutions, user preferences, and trends in allergen information for restaurant chefs and recipes.",
    "description": "Chefs in restaurants constantly adapt their recipes based on ingredient availability and customer preferences. In this dynamic environment, the ability to identify suitable ingredient substitutes is crucial for maintaining menu integrity and customer satisfaction. This operation involves analyzing various aspects of ingredients, their alternatives, and how they align with diners' dietary needs and culinary trends.\n\nThe dataset includes several interrelated tables that provide a comprehensive view of ingredient substitutions. The 'ingredients' table lists various ingredients used in recipes, detailing their attributes. Each ingredient can be linked to potential 'substitutions' that chefs can use when the original item is unavailable. This connection enables users to explore different options depending on taste profiles and nutritional content. The 'user_preferences' table captures the preferences of customers, allowing chefs to tailor substitutions to meet specific dietary needs or desires, such as avoiding allergens or adhering to popular trends. \n\nThe 'usage_statistics' table tracks how frequently specific substitutions are employed, highlighting patterns in chef behavior and ingredient availability. This data can reveal popular choices among users and the most commonly substituted items. The 'trends' table monitors the changing landscape of ingredient preferences over time, providing insights into evolving culinary trends. Finally, the 'allergens' table flags ingredients that may pose health risks to certain diners, which is essential for ensuring safety and compliance with dietary restrictions.\n\nThis synthetic dataset is an excellent resource for honing your data analysis skills. You can explore questions like which ingredients are most frequently substituted, what trends emerge over time regarding ingredient choices, and how user preferences correlate with dietary restrictions. Utilizing this data will allow you to practice joins, aggregations, and data visualization techniques, making it a versatile tool for aspiring data professionals.",
    "domain": "restaurants",
    "shape": "time-series",
    "useCases": [
      "analytics-demo",
      "bi-dashboards"
    ],
    "keywords": [
      "ingredient substitution",
      "recipe adaptation",
      "culinary trends",
      "restaurants",
      "data insights",
      "food preferences",
      "nutritional information"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "ingredients": {
        "description": "This table contains a list of ingredients, including common and rare items. Each ingredient is linked to its nutritional information and potential substitutes.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each ingredient."
          },
          "name": {
            "kind": "fullName",
            "description": "The name of the ingredient."
          },
          "nutritional_info": {
            "kind": "json",
            "template": {
              "calories": {
                "kind": "decimal",
                "min": 0,
                "max": 500,
                "scale": 2,
                "description": "Calories per serving."
              },
              "fat": {
                "kind": "decimal",
                "min": 0,
                "max": 100,
                "scale": 2,
                "description": "Fat content in grams."
              },
              "carbohydrates": {
                "kind": "decimal",
                "min": 0,
                "max": 200,
                "scale": 2,
                "description": "Carbohydrates content in grams."
              },
              "protein": {
                "kind": "decimal",
                "min": 0,
                "max": 100,
                "scale": 2,
                "description": "Protein content in grams."
              },
              "allergens": {
                "kind": "words",
                "description": "Common allergens associated with the ingredient."
              }
            },
            "description": "Nutritional information and allergens associated with the ingredient.",
            "nullable": true
          },
          "is_common": {
            "kind": "bool",
            "trueRate": 0.7,
            "description": "Indicates if the ingredient is commonly used."
          }
        }
      },
      "substitutions": {
        "description": "This table captures the relationships between ingredients and their potential substitutes, allowing chefs to explore alternatives.",
        "rows": 300,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each substitution entry."
          },
          "ingredient_id": {
            "kind": "fk",
            "ref": "ingredients.id",
            "description": "References the primary ingredient."
          },
          "substitute_id": {
            "kind": "fk",
            "ref": "ingredients.id",
            "description": "References the substitute ingredient."
          },
          "reason": {
            "kind": "sentence",
            "description": "Reason for the substitution, such as flavor profile or dietary restriction.",
            "nullable": true
          }
        }
      },
      "user_preferences": {
        "description": "This table records user interactions with ingredient substitutions, tracking preferences over time.",
        "rows": 500,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each user preference entry."
          },
          "user_id": {
            "kind": "uuid",
            "description": "Unique identifier for the user."
          },
          "ingredient_id": {
            "kind": "fk",
            "ref": "ingredients.id",
            "description": "References the ingredient the user prefers."
          },
          "timestamp": {
            "kind": "datetime",
            "from": "2022-01-01",
            "to": "2023-01-01",
            "description": "Timestamp of when the preference was recorded.",
            "dayProfile": "waking"
          },
          "preference_score": {
            "kind": "decimal",
            "min": 1,
            "max": 10,
            "scale": 1,
            "description": "Score indicating the strength of the user's preference.",
            "nullable": true
          }
        }
      },
      "usage_statistics": {
        "description": "This table tracks the usage of various ingredients and substitutes over time, highlighting trends.",
        "rows": 400,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each usage statistic entry."
          },
          "ingredient_id": {
            "kind": "fk",
            "ref": "ingredients.id",
            "description": "References the ingredient being tracked."
          },
          "substitute_id": {
            "kind": "fk",
            "ref": "ingredients.id",
            "description": "References the substitute ingredient."
          },
          "usage_count": {
            "kind": "int",
            "min": 0,
            "max": 1000,
            "description": "Count of how many times the ingredient or substitute has been used.",
            "nullable": true
          },
          "recorded_date": {
            "kind": "date",
            "from": "2022-01-01",
            "to": "2023-01-01",
            "description": "Date when the usage was recorded.",
            "nullable": true,
            "trend": "growing"
          }
        }
      },
      "trends": {
        "description": "This table holds insights into ingredient substitution trends, summarizing changes in preferences over time.",
        "rows": 150,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each trend entry."
          },
          "ingredient_id": {
            "kind": "fk",
            "ref": "ingredients.id",
            "description": "References the ingredient associated with the trend."
          },
          "trend_type": {
            "kind": "enum",
            "values": [
              "increasing",
              "decreasing",
              "stable"
            ],
            "description": "Type of trend observed."
          },
          "trend_score": {
            "kind": "decimal",
            "min": 0,
            "max": 1,
            "scale": 2,
            "description": "Score indicating the strength of the trend.",
            "nullable": true,
            "when": {
              "column": "trend_type",
              "in": [
                "increasing",
                "decreasing"
              ]
            }
          },
          "observed_period": {
            "kind": "date",
            "from": "2022-01-01",
            "to": "2023-01-01",
            "description": "Period over which the trend was observed.",
            "trend": "seasonal"
          }
        }
      },
      "allergens": {
        "description": "This table provides details on known allergens related to ingredients, assisting chefs in avoiding potential issues.",
        "rows": 100,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each allergen entry."
          },
          "ingredient_id": {
            "kind": "fk",
            "ref": "ingredients.id",
            "description": "References the ingredient linked to allergens."
          },
          "allergen_name": {
            "kind": "words",
            "description": "Name of the allergen associated with the ingredient.",
            "nullable": true,
            "when": {
              "column": "severity",
              "in": [
                "moderate",
                "severe"
              ]
            }
          },
          "severity": {
            "kind": "enum",
            "values": [
              "mild",
              "moderate",
              "severe"
            ],
            "description": "Severity level of the allergen."
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "nullable",
      "high-cardinality",
      "timestamped"
    ],
    "analysisQuestions": [
      "What are the most common ingredient substitutions used by chefs?",
      "How do user preferences for ingredients change over the year?",
      "What trends can be observed in ingredient usage over time?",
      "Which allergens are most frequently associated with commonly substituted ingredients?",
      "How do substitution patterns vary across different culinary styles?"
    ],
    "suggestedQueries": [
      {
        "title": "List all ingredient substitutions",
        "sql": "SELECT i.name AS ingredient, s.name AS substitute FROM substitutions sub JOIN ingredients i ON sub.ingredient_id = i.id JOIN ingredients s ON sub.substitute_id = s.id;",
        "dialect": "postgres"
      },
      {
        "title": "Count substitutions by ingredient",
        "sql": "SELECT i.name, COUNT(s.substitute_id) AS substitution_count FROM substitutions s JOIN ingredients i ON s.ingredient_id = i.id GROUP BY i.name;",
        "dialect": "postgres"
      },
      {
        "title": "Find the most popular substitutes for a specific ingredient",
        "sql": "SELECT s.name AS substitute, COUNT(u.preference_score) AS preference_count FROM user_preferences u JOIN substitutions sub ON u.ingredient_id = sub.ingredient_id JOIN ingredients s ON sub.substitute_id = s.id WHERE u.ingredient_id = ? GROUP BY s.name ORDER BY preference_count DESC;",
        "dialect": "postgres"
      },
      {
        "title": "Analyze trends over time",
        "sql": "SELECT t.observed_period, t.trend_type, COUNT(t.id) AS trend_count FROM trends t GROUP BY t.observed_period, t.trend_type ORDER BY t.observed_period;",
        "dialect": "postgres"
      },
      {
        "title": "Identify allergens for popular ingredients",
        "sql": "SELECT i.name, a.allergen_name FROM ingredients i JOIN allergens a ON i.id = a.ingredient_id WHERE i.id IN (SELECT ingredient_id FROM substitutions GROUP BY ingredient_id HAVING COUNT(substitute_id) > 5);",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Menu Planning",
        "body": "Restaurant managers can utilize this dataset to enhance menu planning by identifying which ingredient substitutions are most popular among users. This way, they can ensure that menus remain appealing even when certain ingredients are unavailable."
      },
      {
        "title": "Inventory Management",
        "body": "Chefs can leverage the insights from the usage statistics table to manage their inventory effectively. By understanding which ingredients are frequently substituted, they can better predict demand and reduce waste."
      },
      {
        "title": "Customer Preferences Analysis",
        "body": "Market analysts can use the user preferences table to analyze customer preferences over time, helping restaurants tailor their offerings to meet evolving tastes and dietary needs."
      },
      {
        "title": "Trend Identification",
        "body": "Culinary researchers can utilize the trends table to identify emerging culinary trends based on ingredient substitutions, aiding chefs in staying ahead of the curve and innovating their menus."
      }
    ]
  },
  "counts": {
    "ingredients": 200,
    "allergens": 100,
    "substitutions": 300,
    "trends": 150,
    "usage_statistics": 400,
    "user_preferences": 500
  },
  "stats": {
    "ingredients": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "name": {
          "nulls": 0,
          "distinct": 195,
          "min": "Alice Adams",
          "max": "Zoe Wang"
        },
        "nutritional_info": {
          "nulls": 23,
          "distinct": 177
        },
        "is_common": {
          "nulls": 0,
          "distinct": 2,
          "min": "false",
          "max": "true"
        }
      }
    },
    "substitutions": {
      "rows": 300,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 300,
          "min": 1,
          "max": 300
        },
        "ingredient_id": {
          "nulls": 0,
          "distinct": 153,
          "min": 1,
          "max": 198
        },
        "substitute_id": {
          "nulls": 0,
          "distinct": 153,
          "min": 1,
          "max": 198
        },
        "reason": {
          "nulls": 27,
          "distinct": 270
        }
      }
    },
    "user_preferences": {
      "rows": 500,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 500,
          "min": 1,
          "max": 500
        },
        "user_id": {
          "nulls": 0,
          "distinct": 500
        },
        "ingredient_id": {
          "nulls": 0,
          "distinct": 191,
          "min": 1,
          "max": 200
        },
        "timestamp": {
          "nulls": 0,
          "distinct": 500,
          "min": "2022-01-01 09:00:34",
          "max": "2022-12-31 13:45:43"
        },
        "preference_score": {
          "nulls": 38,
          "distinct": 90,
          "min": 1,
          "max": 10
        }
      }
    },
    "usage_statistics": {
      "rows": 400,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 400,
          "min": 1,
          "max": 400
        },
        "ingredient_id": {
          "nulls": 0,
          "distinct": 165,
          "min": 1,
          "max": 200
        },
        "substitute_id": {
          "nulls": 0,
          "distinct": 175,
          "min": 1,
          "max": 200
        },
        "usage_count": {
          "nulls": 27,
          "distinct": 314,
          "min": 6,
          "max": 998
        },
        "recorded_date": {
          "nulls": 46,
          "distinct": 212,
          "min": "2022-01-06",
          "max": "2023-01-01"
        }
      }
    },
    "trends": {
      "rows": 150,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 150,
          "min": 1,
          "max": 150
        },
        "ingredient_id": {
          "nulls": 0,
          "distinct": 106,
          "min": 1,
          "max": 197
        },
        "trend_type": {
          "nulls": 0,
          "distinct": 3,
          "min": "decreasing",
          "max": "stable"
        },
        "trend_score": {
          "nulls": 48,
          "distinct": 61,
          "min": 0,
          "max": 1
        },
        "observed_period": {
          "nulls": 0,
          "distinct": 116,
          "min": "2022-01-02",
          "max": "2023-01-01"
        }
      }
    },
    "allergens": {
      "rows": 100,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 100,
          "min": 1,
          "max": 100
        },
        "ingredient_id": {
          "nulls": 0,
          "distinct": 77,
          "min": 1,
          "max": 193
        },
        "allergen_name": {
          "nulls": 30,
          "distinct": 70
        },
        "severity": {
          "nulls": 0,
          "distinct": 3,
          "min": "mild",
          "max": "severe"
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/ingredients.csv",
      "format": "csv",
      "table": "ingredients",
      "key": "datasets/ai-powered-recipe-ingredient-substitution-tool/v1/csv/ingredients.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ai-powered-recipe-ingredient-substitution-tool/v1/csv/ingredients.csv",
      "bytes": 26426,
      "sha256": "4fbb83493535649fb7d115374195450b7fe51b3f15251d8aef37465c4ebbf555",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/allergens.csv",
      "format": "csv",
      "table": "allergens",
      "key": "datasets/ai-powered-recipe-ingredient-substitution-tool/v1/csv/allergens.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ai-powered-recipe-ingredient-substitution-tool/v1/csv/allergens.csv",
      "bytes": 3406,
      "sha256": "82ac939613f57f3cd3ad2bf0708029aee9b974c2c4dfe111f5dbee09727d14c3",
      "rows": 100,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/substitutions.csv",
      "format": "csv",
      "table": "substitutions",
      "key": "datasets/ai-powered-recipe-ingredient-substitution-tool/v1/csv/substitutions.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ai-powered-recipe-ingredient-substitution-tool/v1/csv/substitutions.csv",
      "bytes": 18938,
      "sha256": "935e9373ce1ad57b37532aea93f0e8f3392edf338e2aad1214b513bb6c124141",
      "rows": 300,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/trends.csv",
      "format": "csv",
      "table": "trends",
      "key": "datasets/ai-powered-recipe-ingredient-substitution-tool/v1/csv/trends.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ai-powered-recipe-ingredient-substitution-tool/v1/csv/trends.csv",
      "bytes": 4893,
      "sha256": "da697d4deffa6787e816db0b6fd67c760951d2690b6b10d8e35fc54a82edf5a1",
      "rows": 150,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/usage_statistics.csv",
      "format": "csv",
      "table": "usage_statistics",
      "key": "datasets/ai-powered-recipe-ingredient-substitution-tool/v1/csv/usage_statistics.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ai-powered-recipe-ingredient-substitution-tool/v1/csv/usage_statistics.csv",
      "bytes": 10147,
      "sha256": "a48265fe796e8ceb63b3e374530ef67d66708215e760389c8070f2bb804eb789",
      "rows": 400,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/user_preferences.csv",
      "format": "csv",
      "table": "user_preferences",
      "key": "datasets/ai-powered-recipe-ingredient-substitution-tool/v1/csv/user_preferences.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ai-powered-recipe-ingredient-substitution-tool/v1/csv/user_preferences.csv",
      "bytes": 34551,
      "sha256": "8510864b7987e7e045131b6cea0d689cf3add2dd6d85c5268a340b51bed23807",
      "rows": 500,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "ai-powered-recipe-ingredient-substitution-tool.json",
      "format": "json",
      "table": null,
      "key": "datasets/ai-powered-recipe-ingredient-substitution-tool/v1/ai-powered-recipe-ingredient-substitution-tool.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ai-powered-recipe-ingredient-substitution-tool/v1/ai-powered-recipe-ingredient-substitution-tool.json",
      "bytes": 285392,
      "sha256": "b88b4c7daa00af7b74a3edc1fe130343c54338586965b14e8bcc501476045fd7",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/ai-powered-recipe-ingredient-substitution-tool/v1/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ai-powered-recipe-ingredient-substitution-tool/v1/sql/postgres.sql",
      "bytes": 121499,
      "sha256": "412356469f39978198f0081fef300d7518e9aed501d35ca2a0f81f216b9258ec",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/ai-powered-recipe-ingredient-substitution-tool/v1/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ai-powered-recipe-ingredient-substitution-tool/v1/sql/mysql.sql",
      "bytes": 120128,
      "sha256": "ac944ed00cf30e6f44c6d597ac671cee6ace846edb84c7e32b0aae0a169dd7b1",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/ai-powered-recipe-ingredient-substitution-tool/v1/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ai-powered-recipe-ingredient-substitution-tool/v1/sql/mssql.sql",
      "bytes": 123038,
      "sha256": "a58cdfa76e71a0c319bf62e13d9058ad5bf180af861b5fcb1e4e78dd1c70d3af",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/ai-powered-recipe-ingredient-substitution-tool/v1/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ai-powered-recipe-ingredient-substitution-tool/v1/sql/sqlite.sql",
      "bytes": 119783,
      "sha256": "69dae5f7627b368f0e2e82d7aad2e33d8dd0a1d89c967b27f929b97ef5050bc0",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/ai-powered-recipe-ingredient-substitution-tool/v1/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ai-powered-recipe-ingredient-substitution-tool/v1/prisma/seed.ts",
      "bytes": 228481,
      "sha256": "33703a19ff7f9cad04d12fe9434193b61675d45bed9e2c9c7611616ebe206d9b",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/ai-powered-recipe-ingredient-substitution-tool/v1/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/ai-powered-recipe-ingredient-substitution-tool/v1/django/fixtures.json",
      "bytes": 361357,
      "sha256": "02f78dbff51cea214833dcad17ea4df2803d11e3b4d25e22a6ad71137e3f9573",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788766731797,
  "updatedAt": 1788766731797
}
