{
  "format": "dataset-manifest/1",
  "slug": "blood-donation-system",
  "version": 2,
  "seed": "blood-donation-system:1",
  "spec": {
    "format": "dataset/1",
    "slug": "blood-donation-system",
    "name": "Blood Donation Insights",
    "tagline": "Donor details, blood inventory levels, hospital needs, and appointment data for a community blood donation initiative.",
    "description": "A community-driven initiative connects donors with hospitals in need of blood supplies. This operation revolves around the efficient management of donor records, tracking of blood inventory, fulfilling hospital requests, and scheduling appointments for donations. Donors often return multiple times a year, contributing to a steady supply, while hospital requests can fluctuate significantly, with some facilities facing critical shortages. The dynamics of blood donation also reveal that certain blood types are less common, leading to an excess of inventory for more prevalent types, which can challenge effective distribution.\n\nThe data is structured across four main tables: donors, blood_inventory, hospitals, and appointments. Each donor record in the donors table contains details about individuals willing to give blood, including their contact information and donation history. The blood_inventory table tracks the types and quantities of blood available, reflecting the current status of supplies across various blood types. Hospitals are documented in the hospitals table, where requests for blood products are recorded, noting the specific types and quantities needed. Appointments link donors with scheduled donation times and locations, creating a seamless process for both the donors and the hospitals that rely on timely contributions.\n\nThis dataset allows practitioners to explore numerous questions, such as how donor frequency correlates with blood type distribution, which hospitals face the largest shortages, and how appointment scheduling impacts donation rates. Developers can practice their skills in data manipulation, join operations, and analytical queries, gaining insight into the operational challenges faced by nonprofits in the health sector. Since the data is synthetic, users can experiment without concerns for privacy or real-world implications.",
    "domain": "nonprofit",
    "shape": "transactional",
    "useCases": [
      "sql-practice",
      "orm-seeding"
    ],
    "keywords": [
      "blood donation",
      "healthcare",
      "donors",
      "hospitals",
      "inventory",
      "appointments",
      "requests",
      "synthetic data"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "donors": {
        "description": "This table holds information about blood donors, including their personal details and donation frequency. Each donor can have multiple donation records linked through appointments.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each donor."
          },
          "first_name": {
            "kind": "firstName",
            "description": "The first name of the donor."
          },
          "last_name": {
            "kind": "lastName",
            "description": "The last name of the donor."
          },
          "email": {
            "kind": "email",
            "from": [
              "first_name",
              "last_name"
            ],
            "description": "Email address of the donor derived from their name."
          },
          "blood_type": {
            "kind": "enum",
            "values": [
              "A+",
              "A-",
              "B+",
              "B-",
              "O+",
              "O-",
              "AB+",
              "AB-"
            ],
            "weights": [
              0.25,
              0.15,
              0.25,
              0.15,
              0.1,
              0.05,
              0.03,
              0.02
            ],
            "description": "Blood type of the donor."
          },
          "donation_frequency": {
            "kind": "int",
            "min": 1,
            "max": 12,
            "description": "Number of times the donor gives blood in a year.",
            "nullable": true,
            "when": {
              "column": "blood_type",
              "in": [
                "A+",
                "A-",
                "B+",
                "B-",
                "O+",
                "O-",
                "AB+",
                "AB-"
              ]
            }
          }
        }
      },
      "blood_inventory": {
        "description": "This table tracks the available blood inventory at various hospitals, detailing the types and quantities of blood available for use.",
        "rows": 100,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each inventory record."
          },
          "blood_type": {
            "kind": "enum",
            "values": [
              "A+",
              "A-",
              "B+",
              "B-",
              "O+",
              "O-",
              "AB+",
              "AB-"
            ],
            "description": "Type of blood in inventory."
          },
          "quantity": {
            "kind": "int",
            "min": 0,
            "max": 100,
            "description": "Quantity of this blood type available.",
            "nullable": true,
            "when": {
              "column": "blood_type",
              "in": [
                "A+",
                "A-",
                "B+",
                "B-",
                "O+",
                "O-",
                "AB+",
                "AB-"
              ]
            },
            "distribution": "normal"
          },
          "hospital_id": {
            "kind": "fk",
            "ref": "hospitals.id",
            "description": "Foreign key linking to the hospital that maintains this inventory."
          }
        }
      },
      "hospitals": {
        "description": "This table contains details about hospitals that request blood supplies, including their names and locations.",
        "rows": 50,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each hospital."
          },
          "name": {
            "kind": "company",
            "description": "Name of the hospital."
          },
          "location": {
            "kind": "city",
            "description": "City where the hospital is located.",
            "nullable": true
          },
          "critical_status": {
            "kind": "bool",
            "trueRate": 0.4,
            "description": "Indicates if the hospital is currently in a critical state regarding blood supplies."
          }
        }
      },
      "appointments": {
        "description": "This table records the donation appointments made by donors, including the date and status of donations.",
        "rows": 300,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each appointment."
          },
          "donor_id": {
            "kind": "fk",
            "ref": "donors.id",
            "description": "Foreign key linking to the donor who made the appointment."
          },
          "appointment_date": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Date and time of the donation appointment.",
            "nullable": true,
            "when": {
              "column": "status",
              "in": [
                "completed",
                "cancelled"
              ]
            },
            "dayProfile": "waking"
          },
          "status": {
            "kind": "enum",
            "values": [
              "scheduled",
              "completed",
              "cancelled"
            ],
            "description": "The current status of the appointment."
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "categorical",
      "nullable",
      "timestamped"
    ],
    "analysisQuestions": [
      "What is the most common blood type among donors?",
      "How often do donors return for donations throughout the year?",
      "Which hospitals experience the most critical blood shortages?",
      "Are there specific times of the year when donations peak?",
      "How does the blood inventory correlate with hospital requests?"
    ],
    "suggestedQueries": [
      {
        "title": "List all donors with their blood types",
        "sql": "SELECT first_name, last_name, blood_type FROM donors;",
        "dialect": "postgres"
      },
      {
        "title": "Count donations per blood type",
        "sql": "SELECT blood_type, COUNT(*) FROM donors GROUP BY blood_type;",
        "dialect": "postgres"
      },
      {
        "title": "Find hospitals with critical blood shortages",
        "sql": "SELECT name, location FROM hospitals WHERE critical_status = true;",
        "dialect": "postgres"
      },
      {
        "title": "Get appointment details for each donor",
        "sql": "SELECT d.first_name, d.last_name, a.appointment_date, a.status FROM donors d JOIN appointments a ON d.id = a.donor_id;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Data Analysis for Blood Donation Campaigns",
        "body": "Nonprofit organizations can analyze this dataset to understand donor behavior and optimize their outreach strategies. By identifying peak donation times and the most common blood types, they can tailor their campaigns to encourage more donations when they are most needed."
      },
      {
        "title": "Hospital Resource Management",
        "body": "Hospitals can use this dataset to manage their blood inventory more effectively. By tracking which blood types are in critical supply, they can prioritize their requests from donors and ensure that they maintain adequate supplies for their patients."
      },
      {
        "title": "SQL Practice for Data Analysts",
        "body": "Data analysts looking to improve their SQL skills can utilize this dataset to practice complex queries. The relational structure allows for various join operations and aggregations, providing a rich learning experience for users at different skill levels."
      },
      {
        "title": "ORM Seeding for Development",
        "body": "Developers working on applications related to healthcare or nonprofit sectors can use this dataset for ORM seeding. By populating their databases with realistic yet synthetic data, they can test their applications in a controlled environment before going live."
      }
    ]
  },
  "counts": {
    "donors": 200,
    "appointments": 300,
    "hospitals": 50,
    "blood_inventory": 100
  },
  "stats": {
    "donors": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "first_name": {
          "nulls": 0,
          "distinct": 74,
          "min": "Alice",
          "max": "Zoe"
        },
        "last_name": {
          "nulls": 0,
          "distinct": 71,
          "min": "Adams",
          "max": "Zhang"
        },
        "email": {
          "nulls": 0,
          "distinct": 197
        },
        "blood_type": {
          "nulls": 0,
          "distinct": 8,
          "min": "A+",
          "max": "O-"
        },
        "donation_frequency": {
          "nulls": 0,
          "distinct": 12,
          "min": 1,
          "max": 12
        }
      }
    },
    "blood_inventory": {
      "rows": 100,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 100,
          "min": 1,
          "max": 100
        },
        "blood_type": {
          "nulls": 0,
          "distinct": 8,
          "min": "A+",
          "max": "O-"
        },
        "quantity": {
          "nulls": 0,
          "distinct": 45,
          "min": 8,
          "max": 76
        },
        "hospital_id": {
          "nulls": 0,
          "distinct": 39,
          "min": 1,
          "max": 50
        }
      }
    },
    "hospitals": {
      "rows": 50,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 50,
          "min": 1,
          "max": 50
        },
        "name": {
          "nulls": 0,
          "distinct": 49,
          "min": "Acme Health",
          "max": "Willow Works"
        },
        "location": {
          "nulls": 10,
          "distinct": 28,
          "min": "Amsterdam",
          "max": "Warsaw"
        },
        "critical_status": {
          "nulls": 0,
          "distinct": 2,
          "min": "false",
          "max": "true"
        }
      }
    },
    "appointments": {
      "rows": 300,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 300,
          "min": 1,
          "max": 300
        },
        "donor_id": {
          "nulls": 0,
          "distinct": 156,
          "min": 1,
          "max": 199
        },
        "appointment_date": {
          "nulls": 97,
          "distinct": 203,
          "min": "2023-01-02 09:08:37",
          "max": "2023-12-30 16:22:15"
        },
        "status": {
          "nulls": 0,
          "distinct": 3,
          "min": "cancelled",
          "max": "scheduled"
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/donors.csv",
      "format": "csv",
      "table": "donors",
      "key": "datasets/blood-donation-system/v2/csv/donors.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/blood-donation-system/v2/csv/donors.csv",
      "bytes": 9265,
      "sha256": "e72ab1a30024bb6e3388184f3b8843bde89969ad934366b8758d0ff7a780e2d4",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/appointments.csv",
      "format": "csv",
      "table": "appointments",
      "key": "datasets/blood-donation-system/v2/csv/appointments.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/blood-donation-system/v2/csv/appointments.csv",
      "bytes": 9625,
      "sha256": "70afcb479822102554b73804026e926ebfadb246450a7b513e1bfda55d32221c",
      "rows": 300,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/hospitals.csv",
      "format": "csv",
      "table": "hospitals",
      "key": "datasets/blood-donation-system/v2/csv/hospitals.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/blood-donation-system/v2/csv/hospitals.csv",
      "bytes": 1558,
      "sha256": "26f066af6e119fa8d50c236322cde4a8c4c341a82716195fae258a4b7ac4df08",
      "rows": 50,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/blood_inventory.csv",
      "format": "csv",
      "table": "blood_inventory",
      "key": "datasets/blood-donation-system/v2/csv/blood_inventory.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/blood-donation-system/v2/csv/blood_inventory.csv",
      "bytes": 1328,
      "sha256": "92e139765469ffa1be9b5593fdb0eb46ee19100dca1af8b21a637e989777a9fe",
      "rows": 100,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "blood-donation-system.json",
      "format": "json",
      "table": null,
      "key": "datasets/blood-donation-system/v2/blood-donation-system.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/blood-donation-system/v2/blood-donation-system.json",
      "bytes": 90215,
      "sha256": "4f275f352be090d89427fbb2393b0e224021c1ebc00cea7067403b9baed02036",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/blood-donation-system/v2/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/blood-donation-system/v2/sql/postgres.sql",
      "bytes": 33521,
      "sha256": "50a850e72c2ffb2b91308ca2477570eba71e19d23bf847d8330600f165b40e9f",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/blood-donation-system/v2/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/blood-donation-system/v2/sql/mysql.sql",
      "bytes": 32885,
      "sha256": "2d1e2e26ddd359e5247a63c6ec752b22331665cb72e1f54cf24f073208b7a34b",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/blood-donation-system/v2/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/blood-donation-system/v2/sql/mssql.sql",
      "bytes": 34644,
      "sha256": "97060da9e347c004eb6542d1019e5dcd40f0d5fe5f2934854250864c49d48d1d",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/blood-donation-system/v2/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/blood-donation-system/v2/sql/sqlite.sql",
      "bytes": 32725,
      "sha256": "0aef2400212809f615a4a585ad7b29b5a4b592f6ac233aae8acc9ef85e3f671a",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/blood-donation-system/v2/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/blood-donation-system/v2/prisma/seed.ts",
      "bytes": 71921,
      "sha256": "0a1f75035378917b3a79982e67e91a8ca6e27bcf3668df8861515902c5e95001",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/blood-donation-system/v2/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/blood-donation-system/v2/django/fixtures.json",
      "bytes": 119278,
      "sha256": "498d8e6fd082fc18a0c5ee1e26f9d366093863b0b361e98d627545031739e021",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788765966841,
  "updatedAt": 1788777664388
}
