{
  "format": "dataset-manifest/1",
  "slug": "shipment-tracking-events",
  "version": 1,
  "seed": "shipment-tracking-events:1",
  "spec": {
    "format": "dataset/1",
    "slug": "shipment-tracking-events",
    "name": "Shipment Tracking Events",
    "tagline": "Tracking events for shipments, including timestamps, statuses, and carrier details across multiple locations.",
    "description": "Shipments move through various stages in the logistics process, tracking their journey from creation to delivery and managing any exceptions along the way. As shipments are processed, events are recorded, capturing essential details about each movement. Each row in the shipments table represents a unique shipment, detailing aspects such as shipment ID, origin, destination, and current status. The events table documents the timeline of activities for each shipment, with entries that indicate when a shipment was created, collected, in transit, out for delivery, delivered, or encountered an exception. Each event is linked to a specific shipment, allowing for a comprehensive view of the shipment's journey.\n\nThe locations table holds information about the various depots or hubs where shipments may be routed, including location IDs and their corresponding addresses. This table connects with both the shipments and events tables, enabling users to see where each shipment has been at any point in its lifecycle. The carriers table lists the different shipping companies involved, including carrier IDs and names, and serves as a reference for identifying which carrier is responsible for each shipment.\n\nWith these tables, you can answer critical questions regarding shipment performance, such as average delivery times, the frequency of exceptions, and the efficiency of different carriers. Analyzing this data can help you practice skills related to time series analysis, event tracking, and logistical optimization. You can also experiment with joining tables to generate insights on shipment paths and carrier performance.\n\nIt is important to note that this dataset is synthetic, providing a flexible environment for developers to hone their data manipulation and analysis skills without the constraints of real-world data.",
    "domain": "logistics",
    "shape": "event-log",
    "useCases": [
      "etl-pipelines",
      "analytics-demo"
    ],
    "keywords": [
      "shipment",
      "tracking",
      "events",
      "logistics",
      "transit",
      "delivery",
      "data",
      "synthetic"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "shipments": {
        "description": "This table contains basic information about each shipment, including its unique identifier, status, and the associated carrier.",
        "rows": 100,
        "columns": {
          "shipment_id": {
            "kind": "pk",
            "description": "Unique identifier for each shipment."
          },
          "carrier_id": {
            "kind": "fk",
            "ref": "carriers.carrier_id",
            "description": "References the carrier responsible for this shipment.",
            "nullable": true,
            "when": {
              "column": "status",
              "in": [
                "delivered",
                "exception"
              ]
            }
          },
          "status": {
            "kind": "enum",
            "values": [
              "created",
              "collected",
              "in transit",
              "out for delivery",
              "delivered",
              "exception"
            ],
            "description": "Current status of the shipment."
          }
        }
      },
      "events": {
        "description": "This table records timestamps and statuses for each shipment's journey, linking back to the shipments table.",
        "rows": {
          "per": "shipments",
          "via": "shipment_id",
          "min": 1,
          "max": 6,
          "skew": "long-tail"
        },
        "columns": {
          "event_id": {
            "kind": "pk",
            "description": "Unique identifier for each event."
          },
          "shipment_id": {
            "kind": "fk",
            "ref": "shipments.shipment_id",
            "description": "References the associated shipment."
          },
          "event_timestamp": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2024-12-31",
            "description": "Timestamp for the event occurrence.",
            "nullable": true,
            "when": {
              "column": "event_type",
              "in": [
                "delivered",
                "exception"
              ]
            },
            "dayProfile": "waking"
          },
          "event_type": {
            "kind": "enum",
            "values": [
              "created",
              "collected",
              "in transit",
              "out for delivery",
              "delivered",
              "exception"
            ],
            "description": "Type of event that occurred."
          }
        }
      },
      "locations": {
        "description": "This table provides information about the different depots associated with the shipments, linking back to the shipments table.",
        "rows": {
          "per": "shipments",
          "via": "shipment_id",
          "min": 1,
          "max": 3,
          "skew": "flat"
        },
        "columns": {
          "location_id": {
            "kind": "pk",
            "description": "Unique identifier for each location."
          },
          "shipment_id": {
            "kind": "fk",
            "ref": "shipments.shipment_id",
            "description": "References the associated shipment."
          },
          "location_name": {
            "kind": "words",
            "min": 2,
            "max": 10,
            "description": "Name of the location or depot.",
            "nullable": true,
            "when": {
              "column": "location_type",
              "in": [
                "warehouse",
                "transit hub"
              ]
            }
          },
          "location_type": {
            "kind": "enum",
            "values": [
              "warehouse",
              "transit hub",
              "delivery center"
            ],
            "description": "Type of location."
          }
        }
      },
      "carriers": {
        "description": "This table contains details about the shipping companies handling the shipments.",
        "rows": 10,
        "columns": {
          "carrier_id": {
            "kind": "pk",
            "description": "Unique identifier for each carrier."
          },
          "carrier_name": {
            "kind": "words",
            "min": 2,
            "max": 5,
            "description": "Name of the shipping carrier."
          },
          "contact_info": {
            "kind": "json",
            "template": {
              "phone": {
                "kind": "phone",
                "description": "Contact phone number."
              },
              "email": {
                "kind": "email",
                "description": "Contact email address."
              }
            },
            "description": "Contact information for the carrier."
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "timestamped",
      "categorical",
      "nullable"
    ],
    "analysisQuestions": [
      "What is the average time taken for shipments to be delivered?",
      "Which carriers have the highest rate of delivery exceptions?",
      "How do transit times vary by shipment status?",
      "What are the most common locations for shipment delays?",
      "How does the status progression of shipments behave over time?"
    ],
    "suggestedQueries": [
      {
        "title": "Join shipments with events",
        "sql": "SELECT s.shipment_id, e.event_type, e.event_timestamp FROM shipments s JOIN events e ON s.shipment_id = e.shipment_id;",
        "dialect": "postgres"
      },
      {
        "title": "Count events by shipment status",
        "sql": "SELECT s.status, COUNT(e.event_id) FROM shipments s LEFT JOIN events e ON s.shipment_id = e.shipment_id GROUP BY s.status;",
        "dialect": "postgres"
      },
      {
        "title": "Average delivery time by carrier",
        "sql": "SELECT c.carrier_name, AVG(EXTRACT(EPOCH FROM (e.event_timestamp - s.event_timestamp))) AS avg_delivery_time FROM shipments s JOIN events e ON s.shipment_id = e.shipment_id JOIN carriers c ON s.carrier_id = c.carrier_id WHERE s.status = 'delivered' GROUP BY c.carrier_name;",
        "dialect": "postgres"
      },
      {
        "title": "Find most common event types",
        "sql": "SELECT event_type, COUNT(*) AS count FROM events GROUP BY event_type ORDER BY count DESC;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Logistics Data Analyst",
        "body": "A logistics data analyst can utilize this dataset to identify trends in shipment delivery times and pinpoint bottlenecks in the logistics chain. By analyzing event timestamps, they can provide actionable insights to improve logistics operations."
      },
      {
        "title": "Data Engineer",
        "body": "A data engineer could use this dataset to build ETL pipelines that extract shipment tracking data from various sources, transform it for analysis, and load it into data warehouses, ensuring data consistency and accuracy."
      },
      {
        "title": "Business Intelligence Developer",
        "body": "A business intelligence developer can leverage the dataset to create dashboards that visualize shipment performance metrics, helping stakeholders to monitor key performance indicators and make informed decisions based on real-time tracking data."
      },
      {
        "title": "Operations Manager",
        "body": "An operations manager may analyze the dataset to evaluate the efficiency of different carriers and identify areas for cost reduction. By assessing the frequency of delivery exceptions, they can adjust strategies to enhance overall service quality."
      }
    ]
  },
  "counts": {
    "carriers": 10,
    "shipments": 100,
    "events": 264,
    "locations": 201
  },
  "stats": {
    "shipments": {
      "rows": 100,
      "columns": {
        "shipment_id": {
          "nulls": 0,
          "distinct": 100,
          "min": 1,
          "max": 100
        },
        "carrier_id": {
          "nulls": 60,
          "distinct": 10,
          "min": 1,
          "max": 10
        },
        "status": {
          "nulls": 0,
          "distinct": 6,
          "min": "collected",
          "max": "out for delivery"
        }
      }
    },
    "events": {
      "rows": 264,
      "columns": {
        "event_id": {
          "nulls": 0,
          "distinct": 264,
          "min": 1,
          "max": 264
        },
        "shipment_id": {
          "nulls": 0,
          "distinct": 100,
          "min": 1,
          "max": 100
        },
        "event_timestamp": {
          "nulls": 174,
          "distinct": 90,
          "min": "2023-01-04 00:13:49",
          "max": "2024-12-31 16:43:19"
        },
        "event_type": {
          "nulls": 0,
          "distinct": 6,
          "min": "collected",
          "max": "out for delivery"
        }
      }
    },
    "locations": {
      "rows": 201,
      "columns": {
        "location_id": {
          "nulls": 0,
          "distinct": 201,
          "min": 1,
          "max": 201
        },
        "shipment_id": {
          "nulls": 0,
          "distinct": 100,
          "min": 1,
          "max": 100
        },
        "location_name": {
          "nulls": 69,
          "distinct": 132
        },
        "location_type": {
          "nulls": 0,
          "distinct": 3,
          "min": "delivery center",
          "max": "warehouse"
        }
      }
    },
    "carriers": {
      "rows": 10,
      "columns": {
        "carrier_id": {
          "nulls": 0,
          "distinct": 10,
          "min": 1,
          "max": 10
        },
        "carrier_name": {
          "nulls": 0,
          "distinct": 10
        },
        "contact_info": {
          "nulls": 0,
          "distinct": 10
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/carriers.csv",
      "format": "csv",
      "table": "carriers",
      "key": "datasets/shipment-tracking-events/v1/csv/carriers.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/shipment-tracking-events/v1/csv/carriers.csv",
      "bytes": 1045,
      "sha256": "97acdb2ea7af5f2d136f4713d50857e2d9eca6415d70bdd74b381e25d75afd85",
      "rows": 10,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/shipments.csv",
      "format": "csv",
      "table": "shipments",
      "key": "datasets/shipment-tracking-events/v1/csv/shipments.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/shipment-tracking-events/v1/csv/shipments.csv",
      "bytes": 1631,
      "sha256": "7316a8c36e9ac3778197ceefc6b7527bce9dd527d3918c8ff44a7a559c8f6eed",
      "rows": 100,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/events.csv",
      "format": "csv",
      "table": "events",
      "key": "datasets/shipment-tracking-events/v1/csv/events.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/shipment-tracking-events/v1/csv/events.csv",
      "bytes": 6966,
      "sha256": "e422e272f6b6c5929ff67ef9fb69ed257898e1d86ab5298686ecf31b03bc1f08",
      "rows": 264,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/locations.csv",
      "format": "csv",
      "table": "locations",
      "key": "datasets/shipment-tracking-events/v1/csv/locations.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/shipment-tracking-events/v1/csv/locations.csv",
      "bytes": 9340,
      "sha256": "4f47deb58da2fb0cb701ce16e711cd6174d661238413e2050ff6b8da6feb3adb",
      "rows": 201,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "shipment-tracking-events.json",
      "format": "json",
      "table": null,
      "key": "datasets/shipment-tracking-events/v1/shipment-tracking-events.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/shipment-tracking-events/v1/shipment-tracking-events.json",
      "bytes": 76589,
      "sha256": "c13ddb186d6cf7954383e0d9b744b908d1c300cb9c9477bdbd134056c3598697",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/shipment-tracking-events/v1/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/shipment-tracking-events/v1/sql/postgres.sql",
      "bytes": 29013,
      "sha256": "d7e369c3633c046ddf2395cb621d8ae95abe606722d8b5becc21b406b9b03696",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/shipment-tracking-events/v1/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/shipment-tracking-events/v1/sql/mysql.sql",
      "bytes": 28512,
      "sha256": "7fc8b64ebb2d39fd5b4b5a9f12a974942e09b69a04884cb4124001fceff70e09",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/shipment-tracking-events/v1/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/shipment-tracking-events/v1/sql/mssql.sql",
      "bytes": 29578,
      "sha256": "dc90915abc00dca008dfd25fe7b40921b420895fb52bdf58f7b7164d1217816e",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/shipment-tracking-events/v1/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/shipment-tracking-events/v1/sql/sqlite.sql",
      "bytes": 28359,
      "sha256": "8a7a06fc6ca5e97cd89151226db6efd19c8f4fba0c597b753b0fa23e58415879",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/shipment-tracking-events/v1/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/shipment-tracking-events/v1/prisma/seed.ts",
      "bytes": 62968,
      "sha256": "61d83981bb35eaa9d9f47624e85b8042890f2c289d7dcf2fdc9e29913aeef792",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/shipment-tracking-events/v1/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/shipment-tracking-events/v1/django/fixtures.json",
      "bytes": 95604,
      "sha256": "9a4da39cf47cfe883e5bc2a10b5c7e29df197c7f87a290792db843c2aa1d24c5",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788767058190,
  "updatedAt": 1788767058190
}
