{
  "format": "dataset-manifest/1",
  "slug": "farm-to-table-food-app",
  "version": 1,
  "seed": "farm-to-table-food-app:1",
  "spec": {
    "format": "dataset/1",
    "slug": "farm-to-table-food-app",
    "name": "Farm Fresh Connections",
    "tagline": "Connecting local farms and restaurants for fresh, sustainable dining.",
    "description": "Farm Fresh Connections thrives on the partnership between restaurants and local farms, ensuring that fresh, high-quality ingredients make their way from farm to table. Each day, drivers play a crucial role in transporting produce, creating a seamless flow of operations that supports both suppliers and consumers. The dynamic nature of this business is highlighted through regular deliveries that bring seasonal items directly from farms to restaurants, enabling chefs to craft seasonal menus that emphasize local flavors. As the demand for transparency in sourcing increases, restaurants leverage this information to enhance their offers, while customers enjoy the benefits of knowing where their food comes from.\n\nThe data model comprises several interconnected tables that detail key aspects of this operation. The 'restaurants' table holds information about various dining establishments, including their names and locations. The 'farms' table showcases the profiles of local farms, providing details on their certification types, such as organic or sustainable. Each delivery is recorded in the 'deliveries' table, which links farms to restaurants, detailing the specifics of each transport. The 'orders' table captures customer orders, tracking what items have been requested, while the 'drivers' table reflects the individuals responsible for transporting these goods. Each row in these tables provides a snapshot of the complex network that facilitates the movement of food from producers to consumers.\n\nYou can explore questions such as which farms have the highest delivery frequency, which types of produce are most popular among customers, and how driver performance affects delivery times. These inquiries offer a practical foundation for honing skills in data analysis, joining tables, and deriving insights from relational data. It's important to note that all the data is synthetic, designed to mimic real-world scenarios while providing an engaging learning experience.",
    "domain": "restaurants",
    "shape": "slowly-changing",
    "useCases": [
      "etl-pipelines",
      "teaching"
    ],
    "keywords": [
      "farm-to-table",
      "restaurants",
      "local farms",
      "deliveries",
      "customer reviews",
      "certifications",
      "sustainability"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "restaurants": {
        "description": "This table contains information about restaurants participating in the farm-to-table initiative. Each row represents a restaurant, linking to its orders and deliveries.",
        "rows": 100,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each restaurant."
          },
          "name": {
            "kind": "fullName",
            "description": "Name of the restaurant."
          },
          "contact_email": {
            "kind": "email",
            "from": "name",
            "description": "Official contact email for the restaurant.",
            "nullable": true
          },
          "location": {
            "kind": "city",
            "description": "City where the restaurant is located."
          },
          "rating": {
            "kind": "decimal",
            "min": 1,
            "max": 5,
            "scale": 1,
            "description": "Average customer rating.",
            "nullable": true
          }
        }
      },
      "farms": {
        "description": "This table captures details about the farms that supply produce to restaurants. Each farm may have various certification types.",
        "rows": 50,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each farm."
          },
          "name": {
            "kind": "fullName",
            "description": "Name of the farm."
          },
          "certification_type": {
            "kind": "enum",
            "values": [
              "organic",
              "sustainable",
              "none"
            ],
            "description": "Type of certification the farm holds."
          },
          "location": {
            "kind": "city",
            "description": "City where the farm is located.",
            "nullable": true,
            "when": {
              "column": "certification_type",
              "in": [
                "organic",
                "sustainable"
              ]
            }
          }
        }
      },
      "deliveries": {
        "description": "This table records delivery transactions from farms to restaurants. Each delivery is linked to a specific restaurant and farm.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each delivery."
          },
          "restaurant_id": {
            "kind": "fk",
            "ref": "restaurants.id",
            "description": "The restaurant receiving the delivery."
          },
          "farm_id": {
            "kind": "fk",
            "ref": "farms.id",
            "description": "The farm sending the delivery."
          },
          "delivery_date": {
            "kind": "date",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Date of delivery.",
            "trend": "growing"
          },
          "produce_items": {
            "kind": "words",
            "min": 5,
            "max": 50,
            "description": "List of produce items delivered.",
            "nullable": true
          }
        }
      },
      "orders": {
        "description": "This table details customer orders placed at restaurants. Each order links to the restaurant from which it originates.",
        "rows": 300,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each order."
          },
          "restaurant_id": {
            "kind": "fk",
            "ref": "restaurants.id",
            "description": "The restaurant where the order was placed."
          },
          "order_date": {
            "kind": "date",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Date the order was placed.",
            "trend": "seasonal"
          },
          "total_amount": {
            "kind": "decimal",
            "min": 10,
            "max": 150,
            "scale": 2,
            "description": "Total amount of the order."
          },
          "customer_review": {
            "kind": "sentence",
            "min": 10,
            "max": 200,
            "description": "Customer feedback on the order.",
            "nullable": true
          }
        }
      },
      "drivers": {
        "description": "This table includes profiles of drivers responsible for delivering produce from farms to restaurants. Each driver is linked to delivery records.",
        "rows": 60,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each driver."
          },
          "name": {
            "kind": "fullName",
            "description": "Name of the delivery driver."
          },
          "vehicle_type": {
            "kind": "enum",
            "values": [
              "truck",
              "van",
              "bike"
            ],
            "description": "Type of vehicle used for deliveries."
          },
          "experience_years": {
            "kind": "int",
            "min": 1,
            "max": 30,
            "description": "Years of experience as a driver.",
            "nullable": true,
            "when": {
              "column": "vehicle_type",
              "in": [
                "truck",
                "van"
              ]
            }
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "categorical",
      "timestamped",
      "nullable"
    ],
    "analysisQuestions": [
      "How does the type of certification affect customer ratings?",
      "What are the most common produce items delivered to restaurants?",
      "Which farms have the highest delivery frequency to restaurants?",
      "Are there any trends in customer reviews based on the season or month?"
    ],
    "suggestedQueries": [
      {
        "title": "Join Restaurants and Deliveries",
        "sql": "SELECT r.name, d.delivery_date FROM restaurants r JOIN deliveries d ON r.id = d.restaurant_id;",
        "dialect": "postgres"
      },
      {
        "title": "Average Order Amount by Restaurant",
        "sql": "SELECT r.name, AVG(o.total_amount) AS avg_order_amount FROM orders o JOIN restaurants r ON o.restaurant_id = r.id GROUP BY r.name;",
        "dialect": "postgres"
      },
      {
        "title": "Count Deliveries Per Farm",
        "sql": "SELECT f.name, COUNT(d.id) AS total_deliveries FROM farms f LEFT JOIN deliveries d ON f.id = d.farm_id GROUP BY f.name;",
        "dialect": "postgres"
      },
      {
        "title": "Customer Reviews by Certification Type",
        "sql": "SELECT f.certification_type, AVG(r.rating) AS avg_rating FROM farms f JOIN restaurants r ON f.id = r.id JOIN orders o ON r.id = o.restaurant_id GROUP BY f.certification_type;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Teaching SQL Basics",
        "body": "Instructors can use this dataset to teach students the basics of SQL, including JOIN operations and aggregate functions. The variety of tables allows for exercises focused on different aspects of database querying, from simple SELECT statements to more complex queries involving multiple tables."
      },
      {
        "title": "Analyzing Customer Satisfaction",
        "body": "Data analysts can use this dataset to explore the relationship between farm certifications and customer satisfaction in restaurants. By examining ratings and reviews, they can provide insights into how sourcing practices impact customer experiences in the restaurant industry."
      },
      {
        "title": "ETL Pipeline Development",
        "body": "Developers can utilize this dataset to practice building ETL pipelines that transform and load data from the various tables into a data warehouse. This hands-on experience will help them understand the intricacies of data integration in a real-world context."
      },
      {
        "title": "Restaurant Supply Chain Management",
        "body": "Restaurant managers can leverage this dataset to analyze their supply chain processes, focusing on delivery frequencies and the reliability of different farms. This analysis can help them make informed decisions about sourcing and partnerships to enhance their menu offerings."
      }
    ]
  },
  "counts": {
    "drivers": 60,
    "farms": 50,
    "restaurants": 100,
    "deliveries": 200,
    "orders": 300
  },
  "stats": {
    "restaurants": {
      "rows": 100,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 100,
          "min": 1,
          "max": 100
        },
        "name": {
          "nulls": 0,
          "distinct": 97,
          "min": "Alice Khan",
          "max": "Zoe Shah"
        },
        "contact_email": {
          "nulls": 12,
          "distinct": 87
        },
        "location": {
          "nulls": 0,
          "distinct": 56,
          "min": "Amsterdam",
          "max": "Zurich"
        },
        "rating": {
          "nulls": 6,
          "distinct": 39,
          "min": 1,
          "max": 4.9
        }
      }
    },
    "farms": {
      "rows": 50,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 50,
          "min": 1,
          "max": 50
        },
        "name": {
          "nulls": 0,
          "distinct": 49,
          "min": "Alice Oliveira",
          "max": "Zoe Meyer"
        },
        "certification_type": {
          "nulls": 0,
          "distinct": 3,
          "min": "none",
          "max": "sustainable"
        },
        "location": {
          "nulls": 12,
          "distinct": 25,
          "min": "Ankara",
          "max": "Zurich"
        }
      }
    },
    "deliveries": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "restaurant_id": {
          "nulls": 0,
          "distinct": 90,
          "min": 1,
          "max": 100
        },
        "farm_id": {
          "nulls": 0,
          "distinct": 50,
          "min": 1,
          "max": 50
        },
        "delivery_date": {
          "nulls": 0,
          "distinct": 149,
          "min": "2023-01-02",
          "max": "2023-12-31"
        },
        "produce_items": {
          "nulls": 16,
          "distinct": 184
        }
      }
    },
    "orders": {
      "rows": 300,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 300,
          "min": 1,
          "max": 300
        },
        "restaurant_id": {
          "nulls": 0,
          "distinct": 96,
          "min": 1,
          "max": 100
        },
        "order_date": {
          "nulls": 0,
          "distinct": 199,
          "min": "2023-01-01",
          "max": "2023-12-31"
        },
        "total_amount": {
          "nulls": 0,
          "distinct": 298,
          "min": 10.35,
          "max": 149.92
        },
        "customer_review": {
          "nulls": 30,
          "distinct": 269
        }
      }
    },
    "drivers": {
      "rows": 60,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 60,
          "min": 1,
          "max": 60
        },
        "name": {
          "nulls": 0,
          "distinct": 59,
          "min": "Alice Baker",
          "max": "Zoe Lee"
        },
        "vehicle_type": {
          "nulls": 0,
          "distinct": 3,
          "min": "bike",
          "max": "van"
        },
        "experience_years": {
          "nulls": 23,
          "distinct": 19,
          "min": 2,
          "max": 29
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/drivers.csv",
      "format": "csv",
      "table": "drivers",
      "key": "datasets/farm-to-table-food-app/v1/csv/drivers.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/farm-to-table-food-app/v1/csv/drivers.csv",
      "bytes": 1425,
      "sha256": "8ff8d37a0adb352a08ec851e3c20970783f8877da814c9469babb20410d878a1",
      "rows": 60,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/farms.csv",
      "format": "csv",
      "table": "farms",
      "key": "datasets/farm-to-table-food-app/v1/csv/farms.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/farm-to-table-food-app/v1/csv/farms.csv",
      "bytes": 1628,
      "sha256": "a17caf8c9eea91763259c51ae0531498e581142836c1620f3d943c3602b94813",
      "rows": 50,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/restaurants.csv",
      "format": "csv",
      "table": "restaurants",
      "key": "datasets/farm-to-table-food-app/v1/csv/restaurants.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/farm-to-table-food-app/v1/csv/restaurants.csv",
      "bytes": 4953,
      "sha256": "8548f435636579a8b910c6a5733d99e723a40aa20c9ac78633af19f8f1b8c3df",
      "rows": 100,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/deliveries.csv",
      "format": "csv",
      "table": "deliveries",
      "key": "datasets/farm-to-table-food-app/v1/csv/deliveries.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/farm-to-table-food-app/v1/csv/deliveries.csv",
      "bytes": 38458,
      "sha256": "2350fc13841314d07e22cc287660230182cf8da3fc74877cb384cfcdacb4017e",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/orders.csv",
      "format": "csv",
      "table": "orders",
      "key": "datasets/farm-to-table-food-app/v1/csv/orders.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/farm-to-table-food-app/v1/csv/orders.csv",
      "bytes": 22774,
      "sha256": "ef1e0ca00b0c2735491e1888d0b3b7910bf8e84a00c70582550f607049a15ffe",
      "rows": 300,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "farm-to-table-food-app.json",
      "format": "json",
      "table": null,
      "key": "datasets/farm-to-table-food-app/v1/farm-to-table-food-app.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/farm-to-table-food-app/v1/farm-to-table-food-app.json",
      "bytes": 150136,
      "sha256": "2574ddb92ec4537dccbcae5b3eac6b9e42a2f96e037db57c3cab4ae743b233b0",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/farm-to-table-food-app/v1/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/farm-to-table-food-app/v1/sql/postgres.sql",
      "bytes": 82059,
      "sha256": "7b5c331ae27a5925a04f778ecfabddde8ed4ea1c33c4fc68f4be035b56ee22a4",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/farm-to-table-food-app/v1/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/farm-to-table-food-app/v1/sql/mysql.sql",
      "bytes": 81514,
      "sha256": "d8864e003016edc3f469a7e73bfd64702d3be787630390fb99b61ef6ee606135",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/farm-to-table-food-app/v1/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/farm-to-table-food-app/v1/sql/mssql.sql",
      "bytes": 83335,
      "sha256": "e57f35d91d83d788e423c5ebc54cf27cf1bd8bb577caf9401ce26af178b8b75b",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/farm-to-table-food-app/v1/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/farm-to-table-food-app/v1/sql/sqlite.sql",
      "bytes": 81327,
      "sha256": "ccf3372d0e63bbe127d4022e1953262098f329812973b1b45646b8ee3b787a03",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/farm-to-table-food-app/v1/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/farm-to-table-food-app/v1/prisma/seed.ts",
      "bytes": 127223,
      "sha256": "46c3d3b6400c94ce49d9df17e6fe0cd3d4b16c1e6397b97763cc99c407dfddcc",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/farm-to-table-food-app/v1/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/farm-to-table-food-app/v1/django/fixtures.json",
      "bytes": 179706,
      "sha256": "a238f3e0010d43fdee0044200fdc8aab26966361cb2be0778aa6bb8e67a805aa",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788767193844,
  "updatedAt": 1788767193844
}
