{
  "format": "dataset-manifest/1",
  "slug": "depot-network",
  "version": 1,
  "seed": "depot-network:1",
  "spec": {
    "format": "dataset/1",
    "slug": "depot-network",
    "name": "Depot Network",
    "tagline": "A network of depots, lanes with distances and transit times, and historical shipment data for logistics analysis.",
    "description": "A complex network of depots and the lanes connecting them, this dataset models the logistics of transportation. Each row in the tables represents either a depot, a lane between depots, or a shipment traversing those lanes. The data is synthetic, designed to help developers understand graph structures and perform queries related to shortest paths, distances, and transit times. The first table contains information about each depot, including their locations and capacities. The second table details the lanes that connect these depots, including the distance and average transit time for each lane. The third table tracks shipments, recording which lane they traverse and the associated times. This structure allows for a variety of analyses regarding efficiency, capacity utilization, and route optimization. Questions such as 'Which lanes are the most frequently used for shipments?' or 'What is the average transit time between two specific depots?' can be explored using this dataset.",
    "domain": "logistics",
    "shape": "graph-edges",
    "useCases": [
      "sql-practice",
      "teaching"
    ],
    "keywords": [
      "logistics",
      "depot",
      "network",
      "shipments",
      "lanes",
      "transit times",
      "distances",
      "SQL",
      "practice",
      "teaching"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "depots": {
        "description": "Each row represents a depot in the network, including its location and capacity.",
        "rows": 50,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each depot."
          },
          "name": {
            "kind": "fullName",
            "description": "Name of the depot."
          },
          "city": {
            "kind": "city",
            "description": "City where the depot is located.",
            "nullable": true
          },
          "capacity": {
            "kind": "int",
            "min": 100,
            "max": 10000,
            "description": "Maximum capacity of the depot in units.",
            "nullable": true
          }
        }
      },
      "lanes": {
        "description": "This table describes the lanes connecting depots, including distances and transit times.",
        "rows": 80,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each lane."
          },
          "from_depot_id": {
            "kind": "fk",
            "ref": "depots.id",
            "description": "Depot from which the lane originates."
          },
          "to_depot_id": {
            "kind": "fk",
            "ref": "depots.id",
            "description": "Depot at which the lane ends."
          },
          "distance": {
            "kind": "decimal",
            "min": 1,
            "max": 1000,
            "scale": 2,
            "description": "Distance of the lane in kilometers.",
            "nullable": true
          },
          "transit_time": {
            "kind": "int",
            "min": 30,
            "max": 1440,
            "description": "Average transit time for the lane in minutes.",
            "nullable": true
          }
        }
      },
      "shipments": {
        "description": "Records of shipments traversing the lanes, linking to the lanes and providing timing information.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each shipment."
          },
          "lane_id": {
            "kind": "fk",
            "ref": "lanes.id",
            "description": "Lane through which the shipment travels."
          },
          "shipment_time": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Timestamp when the shipment was made.",
            "dayProfile": "business"
          },
          "units": {
            "kind": "int",
            "min": 1,
            "max": 1000,
            "description": "Number of units in the shipment.",
            "nullable": true
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "categorical",
      "nullable",
      "timestamped"
    ],
    "analysisQuestions": [
      "Which lanes have the highest number of shipments?",
      "What is the average transit time between two specific depots?",
      "How does the capacity of a depot affect the number of shipments it handles?",
      "Are there specific days of the week when shipments are more frequent?"
    ],
    "suggestedQueries": [
      {
        "title": "Get all shipments for a specific lane",
        "sql": "SELECT * FROM shipments WHERE lane_id = 1;",
        "dialect": "postgres"
      },
      {
        "title": "Average transit time per lane",
        "sql": "SELECT lane_id, AVG(transit_time) FROM lanes GROUP BY lane_id;",
        "dialect": "postgres"
      },
      {
        "title": "Count shipments by depot",
        "sql": "SELECT d.name, COUNT(s.id) FROM depots d JOIN lanes l ON d.id = l.from_depot_id JOIN shipments s ON l.id = s.lane_id GROUP BY d.name;",
        "dialect": "postgres"
      },
      {
        "title": "Find lanes with distance greater than a threshold",
        "sql": "SELECT * FROM lanes WHERE distance > 500;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Logistics Optimization",
        "body": "A logistics manager can use this dataset to analyze the efficiency of the depot network. By examining transit times and shipment frequencies, they can identify bottlenecks and optimize routes to improve overall performance."
      },
      {
        "title": "Educational Tool for SQL",
        "body": "Instructors teaching SQL can use this dataset in their courses, providing students with real-world scenarios to practice writing queries. Students can explore various questions about the depot network, shipment patterns, and performance metrics."
      },
      {
        "title": "Data Analysis for Supply Chain",
        "body": "Supply chain analysts can leverage this dataset to conduct detailed analyses on shipment patterns. By understanding lane usage and depot capacities, they can make informed decisions about resource allocation and logistics planning."
      }
    ]
  },
  "counts": {
    "depots": 50,
    "lanes": 80,
    "shipments": 200
  },
  "stats": {
    "depots": {
      "rows": 50,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 50,
          "min": 1,
          "max": 50
        },
        "name": {
          "nulls": 0,
          "distinct": 49,
          "min": "Ana Andersen",
          "max": "Wei Gomez"
        },
        "city": {
          "nulls": 8,
          "distinct": 30,
          "min": "Amsterdam",
          "max": "Zurich"
        },
        "capacity": {
          "nulls": 6,
          "distinct": 44,
          "min": 404,
          "max": 9958
        }
      }
    },
    "lanes": {
      "rows": 80,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 80,
          "min": 1,
          "max": 80
        },
        "from_depot_id": {
          "nulls": 0,
          "distinct": 40,
          "min": 1,
          "max": 50
        },
        "to_depot_id": {
          "nulls": 0,
          "distinct": 39,
          "min": 1,
          "max": 50
        },
        "distance": {
          "nulls": 8,
          "distinct": 72,
          "min": 7.57,
          "max": 961
        },
        "transit_time": {
          "nulls": 10,
          "distinct": 70,
          "min": 45,
          "max": 1440
        }
      }
    },
    "shipments": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "lane_id": {
          "nulls": 0,
          "distinct": 73,
          "min": 1,
          "max": 80
        },
        "shipment_time": {
          "nulls": 0,
          "distinct": 200,
          "min": "2023-01-02 16:59:19",
          "max": "2023-12-30 13:18:17"
        },
        "units": {
          "nulls": 20,
          "distinct": 164,
          "min": 7,
          "max": 999
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/depots.csv",
      "format": "csv",
      "table": "depots",
      "key": "datasets/depot-network/v1/csv/depots.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/depot-network/v1/csv/depots.csv",
      "bytes": 1376,
      "sha256": "d21f36383fcb9b708ae5bc9d5b000620d4bf82a87fd3f255f74a12c81e55db41",
      "rows": 50,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/lanes.csv",
      "format": "csv",
      "table": "lanes",
      "key": "datasets/depot-network/v1/csv/lanes.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/depot-network/v1/csv/lanes.csv",
      "bytes": 1617,
      "sha256": "e05fb4d66e19db412096767229a3187c1681f508b63fc4d45adfb104bcec2599",
      "rows": 80,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/shipments.csv",
      "format": "csv",
      "table": "shipments",
      "key": "datasets/depot-network/v1/csv/shipments.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/depot-network/v1/csv/shipments.csv",
      "bytes": 6229,
      "sha256": "66cfc08230edfb2a920c4b7b70957ea4edfce8cddcb45ce66f550d340a7b66cd",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "depot-network.json",
      "format": "json",
      "table": null,
      "key": "datasets/depot-network/v1/depot-network.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/depot-network/v1/depot-network.json",
      "bytes": 38966,
      "sha256": "7d73408728a19fd567022d5e7f5a5c3696029de20bf02e3bd45207640b00dc53",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/depot-network/v1/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/depot-network/v1/sql/postgres.sql",
      "bytes": 14656,
      "sha256": "06c32e62e342d25fe1b64206323851e59081df317f965400c471be1672ed8e0a",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/depot-network/v1/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/depot-network/v1/sql/mysql.sql",
      "bytes": 14324,
      "sha256": "0a16616e1c2a7028efecbd625db505596269e1f482d5360cb7a41cdd9dd850de",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/depot-network/v1/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/depot-network/v1/sql/mssql.sql",
      "bytes": 14794,
      "sha256": "f57b12226afdc4a1f0ce6146ffa605831d0f884eb2139eec84637c2875ed6a68",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/depot-network/v1/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/depot-network/v1/sql/sqlite.sql",
      "bytes": 14221,
      "sha256": "9889007fc0218da2c0abfceb140c8300cb44eb375a6242f926fc010b79de7a68",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/depot-network/v1/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/depot-network/v1/prisma/seed.ts",
      "bytes": 32241,
      "sha256": "63518455e95ec10f20ff10c11c924a82ee036ea19f2298d309a78303d69a43dc",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/depot-network/v1/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/depot-network/v1/django/fixtures.json",
      "bytes": 52564,
      "sha256": "7fdf367b59bedf0595667608f20f88248b4fc48e0f8c57ca4597ddf70767dd26",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788767365274,
  "updatedAt": 1788767365274
}
