{
  "format": "dataset-manifest/1",
  "slug": "workforce-scheduling-insights",
  "version": 2,
  "seed": "workforce-scheduling-insights:1",
  "spec": {
    "format": "dataset/1",
    "slug": "workforce-scheduling-insights",
    "name": "Workforce Scheduling Insights",
    "tagline": "Employee shifts, shift swaps, leave requests, and shift bids for efficient workforce scheduling management.",
    "description": "Employees manage their schedules and ensure proper coverage in organizations, adapting to changing needs in real-time. They submit leave requests, bid for shifts, and sometimes swap with colleagues to maintain coverage while respecting their personal circumstances. This operational tempo is essential for organizations to function effectively, especially during peak hours or when unexpected absences occur. In this dynamic environment, understanding how shifts align with employee availability is critical for maintaining productivity and morale.\n\nThe dataset features several interrelated tables, beginning with 'employees', which contains records of each employee, including their skills and work history. 'shifts' details the scheduled work periods, indicating which employee is assigned to which shift. 'shift_swaps' tracks changes where employees exchange their scheduled shifts, facilitating flexibility while ensuring coverage. 'leave_requests' records the requests made by employees for time off, highlighting potential gaps in coverage. Lastly, 'shift_bids' allows employees to express interest in available shifts, giving organizations insight into employee preferences and availability.\n\nQueries such as identifying peak demand periods, analyzing shift bidding behavior, and tracking the frequency of leave requests can be answered using this dataset. It is particularly useful for practicing queries that involve join operations, aggregating data to find trends or bottlenecks, and applying analytical techniques to optimize workforce management. This dataset is synthetic, designed to simulate the complexities of real-world workforce scheduling while providing a rich resource for analytical practice.",
    "domain": "hr",
    "shape": "transactional",
    "useCases": [
      "sql-practice",
      "orm-seeding"
    ],
    "keywords": [
      "employee scheduling",
      "shift coverage",
      "attendance",
      "leave management",
      "shift swaps"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "employees": {
        "description": "This table contains records for employees, detailing their personal information and role within the organization. Each employee is uniquely identified and linked to their respective schedules.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each employee."
          },
          "full_name": {
            "kind": "fullName",
            "description": "The full name of the employee."
          },
          "email": {
            "kind": "email",
            "from": "full_name",
            "description": "The email address assigned to the employee."
          },
          "role": {
            "kind": "enum",
            "values": [
              "Manager",
              "Staff",
              "Intern"
            ],
            "description": "The position of the employee within the organization.",
            "weights": [
              6,
              3,
              1
            ]
          },
          "skills": {
            "kind": "words",
            "min": 1,
            "max": 3,
            "description": "A list of skills possessed by the employee.",
            "nullable": true,
            "pool": [
              "communication",
              "leadership",
              "teamwork",
              "problem-solving",
              "time-management",
              "adaptability",
              "creativity",
              "analytical",
              "negotiation",
              "project-management",
              "critical-thinking",
              "technical",
              "customer-service",
              "organization",
              "interpersonal",
              "research",
              "presentation",
              "collaboration",
              "multitasking",
              "decision-making",
              "conflict-resolution",
              "planning",
              "motivation",
              "networking",
              "data-analysis",
              "strategic-thinking",
              "empathy",
              "innovation",
              "flexibility",
              "detail-oriented",
              "self-motivation",
              "coaching",
              "mentoring",
              "sales",
              "marketing",
              "budgeting",
              "forecasting",
              "scheduling",
              "reporting",
              "training",
              "quality-assurance",
              "safety",
              "compliance",
              "performance-management",
              "resource-allocation",
              "time-tracking",
              "workforce-planning",
              "employee-engagement",
              "confidentiality",
              "technology",
              "software",
              "data-entry",
              "administration",
              "logistics",
              "research-and-development",
              "human-resources",
              "talent-acquisition",
              "diversity",
              "inclusion"
            ]
          }
        }
      },
      "shifts": {
        "description": "This table outlines the scheduled shifts for employees, detailing the start and end times for each shift and the employee assigned to it.",
        "rows": 600,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each shift."
          },
          "employee_id": {
            "kind": "fk",
            "ref": "employees.id",
            "description": "The employee assigned to the shift."
          },
          "start_time": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "The start time of the shift.",
            "nullable": true,
            "when": {
              "column": "status",
              "in": [
                "Scheduled",
                "Completed"
              ]
            },
            "dayProfile": "business"
          },
          "end_time": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "The end time of the shift.",
            "nullable": true,
            "dayProfile": "business"
          },
          "status": {
            "kind": "enum",
            "values": [
              "Scheduled",
              "Completed",
              "Cancelled"
            ],
            "description": "Current status of the shift.",
            "weights": [
              5,
              4,
              1
            ]
          }
        }
      },
      "shift_swaps": {
        "description": "This table tracks shift swaps between employees, linking the original and swapped shifts to the respective employees involved.",
        "rows": 150,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each shift swap."
          },
          "original_shift_id": {
            "kind": "fk",
            "ref": "shifts.id",
            "description": "The original shift being swapped."
          },
          "swapped_shift_id": {
            "kind": "fk",
            "ref": "shifts.id",
            "description": "The shift that replaces the original."
          },
          "employee_id": {
            "kind": "fk",
            "ref": "employees.id",
            "description": "The employee who initiated the swap."
          },
          "swap_date": {
            "kind": "date",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "The date the swap was made.",
            "trend": "seasonal"
          }
        }
      },
      "leave_requests": {
        "description": "This table records employee leave requests, detailing the type of leave and the duration for which it is requested.",
        "rows": 100,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each leave request."
          },
          "employee_id": {
            "kind": "fk",
            "ref": "employees.id",
            "description": "The employee requesting leave."
          },
          "leave_type": {
            "kind": "enum",
            "values": [
              "Sick",
              "Vacation",
              "Personal"
            ],
            "description": "The type of leave requested.",
            "weights": [
              4,
              3,
              2
            ]
          },
          "start_date": {
            "kind": "date",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "The start date of the leave.",
            "nullable": true,
            "when": {
              "column": "leave_type",
              "in": [
                "Sick",
                "Vacation"
              ]
            },
            "trend": "growing"
          },
          "end_date": {
            "kind": "date",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "The end date of the leave.",
            "nullable": true,
            "trend": "growing"
          }
        }
      },
      "shift_bids": {
        "description": "This table captures open shift bids made by employees for additional shifts, indicating their interest in covering extra work hours.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each shift bid."
          },
          "shift_id": {
            "kind": "fk",
            "ref": "shifts.id",
            "description": "The shift that is open for bidding."
          },
          "employee_id": {
            "kind": "fk",
            "ref": "employees.id",
            "description": "The employee placing the bid."
          },
          "bid_date": {
            "kind": "date",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "The date the bid was placed.",
            "trend": "growing"
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "timestamped",
      "categorical",
      "nullable"
    ],
    "analysisQuestions": [
      "What are the most common types of leave requested by employees?",
      "How do shift swaps affect employee attendance patterns?",
      "What time of day do employees prefer to work the most?",
      "Which employees frequently bid for extra shifts, and why?",
      "How often do employees swap shifts with one another?"
    ],
    "suggestedQueries": [
      {
        "title": "Join Employees with Their Shifts",
        "sql": "SELECT e.full_name, s.start_time, s.end_time FROM employees e JOIN shifts s ON e.id = s.employee_id;",
        "dialect": "postgres"
      },
      {
        "title": "Count Leave Requests by Type",
        "sql": "SELECT leave_type, COUNT(*) FROM leave_requests GROUP BY leave_type;",
        "dialect": "postgres"
      },
      {
        "title": "Shift Swaps by Employee",
        "sql": "SELECT e.full_name, COUNT(ss.id) FROM shift_swaps ss JOIN employees e ON ss.employee_id = e.id GROUP BY e.full_name;",
        "dialect": "postgres"
      },
      {
        "title": "Bids for Open Shifts",
        "sql": "SELECT b.shift_id, COUNT(*) AS number_of_bids FROM shift_bids b GROUP BY b.shift_id;",
        "dialect": "postgres"
      },
      {
        "title": "Employee Availability During Peak Times",
        "sql": "SELECT EXTRACT(HOUR FROM s.start_time) AS hour, COUNT(e.id) FROM shifts s JOIN employees e ON s.employee_id = e.id WHERE s.status = 'Scheduled' GROUP BY hour;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "HR Manager Scheduling",
        "body": "An HR manager can use this dataset to analyze employee schedules, ensuring optimal staffing levels during peak hours. By examining shift times and employee availability, they can make informed decisions about shift allocations."
      },
      {
        "title": "Data Analysts Tracking Leave Patterns",
        "body": "Data analysts can utilize the leave_requests table to identify trends in employee absences, such as seasonal peaks in sick leave. This insight can help the HR department prepare better for workforce shortages."
      },
      {
        "title": "Supervisors Monitoring Shift Swaps",
        "body": "Supervisors can leverage the shift_swaps table to track employee shift exchanges, ensuring that all shifts are covered while adhering to company policies and employee preferences."
      },
      {
        "title": "Employees Bidding for Extra Shifts",
        "body": "Employees interested in extra hours can analyze the shift_bids table to determine which shifts are available for bidding. This allows them to actively engage in managing their own work schedules."
      }
    ]
  },
  "counts": {
    "employees": 200,
    "leave_requests": 100,
    "shifts": 600,
    "shift_bids": 200,
    "shift_swaps": 150
  },
  "stats": {
    "employees": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "full_name": {
          "nulls": 0,
          "distinct": 196,
          "min": "Alice Smith",
          "max": "Zoe Silva"
        },
        "email": {
          "nulls": 0,
          "distinct": 199
        },
        "role": {
          "nulls": 0,
          "distinct": 3,
          "min": "Intern",
          "max": "Staff"
        },
        "skills": {
          "nulls": 23,
          "distinct": 155
        }
      }
    },
    "shifts": {
      "rows": 600,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 600,
          "min": 1,
          "max": 600
        },
        "employee_id": {
          "nulls": 0,
          "distinct": 191,
          "min": 1,
          "max": 200
        },
        "start_time": {
          "nulls": 60,
          "distinct": 540,
          "min": "2023-01-01 07:07:28",
          "max": "2023-12-30 18:30:04"
        },
        "end_time": {
          "nulls": 54,
          "distinct": 546,
          "min": "2023-01-02 10:39:51",
          "max": "2023-12-31 17:04:47"
        },
        "status": {
          "nulls": 0,
          "distinct": 3,
          "min": "Cancelled",
          "max": "Scheduled"
        }
      }
    },
    "shift_swaps": {
      "rows": 150,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 150,
          "min": 1,
          "max": 150
        },
        "original_shift_id": {
          "nulls": 0,
          "distinct": 137,
          "min": 1,
          "max": 600
        },
        "swapped_shift_id": {
          "nulls": 0,
          "distinct": 132,
          "min": 2,
          "max": 598
        },
        "employee_id": {
          "nulls": 0,
          "distinct": 107,
          "min": 1,
          "max": 200
        },
        "swap_date": {
          "nulls": 0,
          "distinct": 122,
          "min": "2023-01-06",
          "max": "2023-12-30"
        }
      }
    },
    "leave_requests": {
      "rows": 100,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 100,
          "min": 1,
          "max": 100
        },
        "employee_id": {
          "nulls": 0,
          "distinct": 79,
          "min": 6,
          "max": 194
        },
        "leave_type": {
          "nulls": 0,
          "distinct": 3,
          "min": "Personal",
          "max": "Vacation"
        },
        "start_date": {
          "nulls": 27,
          "distinct": 67,
          "min": "2023-01-01",
          "max": "2023-12-28"
        },
        "end_date": {
          "nulls": 12,
          "distinct": 79,
          "min": "2023-01-18",
          "max": "2023-12-31"
        }
      }
    },
    "shift_bids": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "shift_id": {
          "nulls": 0,
          "distinct": 175,
          "min": 6,
          "max": 598
        },
        "employee_id": {
          "nulls": 0,
          "distinct": 129,
          "min": 2,
          "max": 200
        },
        "bid_date": {
          "nulls": 0,
          "distinct": 151,
          "min": "2023-01-06",
          "max": "2023-12-30"
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/employees.csv",
      "format": "csv",
      "table": "employees",
      "key": "datasets/workforce-scheduling-insights/v2/csv/employees.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/workforce-scheduling-insights/v2/csv/employees.csv",
      "bytes": 14180,
      "sha256": "af8f1a5258d7d704963c29e28b26a96b58859bf1af977db22a94d4b5bfb55417",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/leave_requests.csv",
      "format": "csv",
      "table": "leave_requests",
      "key": "datasets/workforce-scheduling-insights/v2/csv/leave_requests.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/workforce-scheduling-insights/v2/csv/leave_requests.csv",
      "bytes": 3333,
      "sha256": "30b6f2ef3b484a92d4df27c188a5908e49e4fea5029d8cb393c0a2de8e86ddc0",
      "rows": 100,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/shifts.csv",
      "format": "csv",
      "table": "shifts",
      "key": "datasets/workforce-scheduling-insights/v2/csv/shifts.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/workforce-scheduling-insights/v2/csv/shifts.csv",
      "bytes": 32835,
      "sha256": "95593cb3665a720a5e7e55ef35ef39ad6f5fb9eae8a108d37ab78df33e2fdea4",
      "rows": 600,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/shift_bids.csv",
      "format": "csv",
      "table": "shift_bids",
      "key": "datasets/workforce-scheduling-insights/v2/csv/shift_bids.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/workforce-scheduling-insights/v2/csv/shift_bids.csv",
      "bytes": 4580,
      "sha256": "14be7daed27f181109f34771cfcb0b399ae5f9ce735e66a6ef78439e9df01c37",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/shift_swaps.csv",
      "format": "csv",
      "table": "shift_swaps",
      "key": "datasets/workforce-scheduling-insights/v2/csv/shift_swaps.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/workforce-scheduling-insights/v2/csv/shift_swaps.csv",
      "bytes": 4013,
      "sha256": "711f44deac70667d14fb8c84a09792b222f8d5b40f3fbc08ae09f8fa4471cd3e",
      "rows": 150,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "workforce-scheduling-insights.json",
      "format": "json",
      "table": null,
      "key": "datasets/workforce-scheduling-insights/v2/workforce-scheduling-insights.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/workforce-scheduling-insights/v2/workforce-scheduling-insights.json",
      "bytes": 191539,
      "sha256": "a3e4d03e673d0c0758f094585b3a642592d6d1f4ff5f4534924d43555a78c674",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/workforce-scheduling-insights/v2/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/workforce-scheduling-insights/v2/sql/postgres.sql",
      "bytes": 81303,
      "sha256": "d2fa507d96f101aaa3695d79a3f94c5c171d88dc182f041a9587f573f153cc1f",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/workforce-scheduling-insights/v2/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/workforce-scheduling-insights/v2/sql/mysql.sql",
      "bytes": 80722,
      "sha256": "fdfcf06c185c725aa12874419e2998dcb23e6fbf737118c960753707be445c84",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/workforce-scheduling-insights/v2/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/workforce-scheduling-insights/v2/sql/mssql.sql",
      "bytes": 84129,
      "sha256": "cf6eebce1b2d632ab37564e8c14952c445389f8e92ff8bc13a33d2364b25fa5f",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/workforce-scheduling-insights/v2/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/workforce-scheduling-insights/v2/sql/sqlite.sql",
      "bytes": 80407,
      "sha256": "0d4f91c8a359db299fbb0ad4c1f80422e1ebdeffd4f926d58bf7f040ab8584b3",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/workforce-scheduling-insights/v2/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/workforce-scheduling-insights/v2/prisma/seed.ts",
      "bytes": 161101,
      "sha256": "883c566b353e03aa54c85b48d07ba10ed9fdd4480880558d4fa76b18204cfaab",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/workforce-scheduling-insights/v2/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/workforce-scheduling-insights/v2/django/fixtures.json",
      "bytes": 242865,
      "sha256": "808919e97e0a335891d396432ef3a4c3fed963306f279b9cb90df4e828f28b97",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788766116346,
  "updatedAt": 1788787062939
}
