Dataset Viewer
Auto-converted to Parquet Duplicate
donor_blood_type
string
recipient_blood_type
string
compatible_for_rbc_transfusion
int64
compatibility_level
string
O+
O+
1
ideal
O+
O-
0
incompatible
O+
A+
1
acceptable
O+
A-
0
incompatible
O+
B+
1
acceptable
O+
B-
0
incompatible
O+
AB+
1
acceptable
O+
AB-
0
incompatible
O-
O+
1
acceptable
O-
O-
1
ideal
O-
A+
1
acceptable
O-
A-
1
acceptable
O-
B+
1
acceptable
O-
B-
1
acceptable
O-
AB+
1
acceptable
O-
AB-
1
acceptable
A+
O+
0
incompatible
A+
O-
0
incompatible
A+
A+
1
ideal
A+
A-
0
incompatible
A+
B+
0
incompatible
A+
B-
0
incompatible
A+
AB+
1
acceptable
A+
AB-
0
incompatible
A-
O+
0
incompatible
A-
O-
0
incompatible
A-
A+
1
acceptable
A-
A-
1
ideal
A-
B+
0
incompatible
A-
B-
0
incompatible
A-
AB+
1
acceptable
A-
AB-
1
acceptable
B+
O+
0
incompatible
B+
O-
0
incompatible
B+
A+
0
incompatible
B+
A-
0
incompatible
B+
B+
1
ideal
B+
B-
0
incompatible
B+
AB+
1
acceptable
B+
AB-
0
incompatible
B-
O+
0
incompatible
B-
O-
0
incompatible
B-
A+
0
incompatible
B-
A-
0
incompatible
B-
B+
1
acceptable
B-
B-
1
ideal
B-
AB+
1
acceptable
B-
AB-
1
acceptable
AB+
O+
0
incompatible
AB+
O-
0
incompatible
AB+
A+
0
incompatible
AB+
A-
0
incompatible
AB+
B+
0
incompatible
AB+
B-
0
incompatible
AB+
AB+
1
ideal
AB+
AB-
0
incompatible
AB-
O+
0
incompatible
AB-
O-
0
incompatible
AB-
A+
0
incompatible
AB-
A-
0
incompatible
AB-
B+
0
incompatible
AB-
B-
0
incompatible
AB-
AB+
1
acceptable
AB-
AB-
1
ideal

🩸 Blood Donation Registry — Synthetic Donors, Prevalence & Compatibility

A synthetic blood donation operations dataset for analysis and decision-focused modeling: eligibility/deferrals, donation history, rare blood types, country-level prevalence, and RBC transfusion compatibility (ABO/Rh).

Synthetic data (safe for experimentation/teaching).
⚠️ Not clinical/medical ground truth and not intended for real-world medical decision-making.


Dataset summary

This dataset is designed to support portfolio-grade notebooks and practical workflows:

  • exploratory analysis (EDA) and segmentation
  • propensity / likelihood modeling and calibration
  • threshold selection under capacity/budget constraints
  • rare-blood availability analysis using prevalence + compatibility rules

Data files

1) blood_donation_registry_ml_ready.csv (30,000 rows × 27 columns)

Donor-level snapshot with a fixed reference date:

  • as_of_date = 2024-12-31

Key groups

  • Identity & geography: donor_id (unique), country_code, region
  • Profile: age, sex (M/F), bmi, smoker (0/1), chronic_condition_flag (0/1)
  • Eligibility & deferrals: eligibility_status, eligible_to_donate (0/1), deferral_reason
  • Donation behavior/history: donation_count_last_12m, lifetime_donation_count, first_donation_year, years_since_first_donation, last_donation_date, recency_days, is_regular_donor (0/1), donor_age_at_first_donation, preferred_site
  • Blood context: blood_type (8 types), is_rare_type (0/1), blood_type_country_prevalence
  • Engineered score (optional): donation_propensity_score

Outcome columns

  • donated_next_6m (0/1)
  • next_6m_donation_count (0–3)

2) blood_population_distribution.csv (39 rows × 12 columns)

Country-level population + blood type prevalence:

  • country_code, region, population_size
  • proportions: p_o_pos, p_o_neg, p_a_pos, p_a_neg, p_b_pos, p_b_neg, p_ab_pos, p_ab_neg
  • rh_negative_rate

Integrity note: blood type proportions sum to 1.0 per country.


3) blood_compatibility_lookup.csv (64 rows × 4 columns)

RBC transfusion compatibility matrix:

  • donor_blood_type, recipient_blood_type
  • compatible_for_rbc_transfusion (0/1)
  • compatibility_level: ideal | acceptable | incompatible

4) data_dictionary.csv

Column-level documentation:

  • file, column_name, type, description, allowed_values_or_range, missing_values

Relationships (how tables connect)

  • blood_donation_registry_ml_ready.csv.country_codeblood_population_distribution.csv.country_code

  • blood_donation_registry_ml_ready.csv.blood_type_country_prevalence is derived from the matching country prevalence table.

  • blood_compatibility_lookup.csv provides rule-based compatibility for blood type pairs.


Recommended tasks

1) Donation likelihood (binary classification)

  • Outcome: donated_next_6m
  • Suggested evaluation: ROC-AUC, PR-AUC, F1, plus calibration (reliability curve / Brier score)

2) Donation frequency (count prediction)

  • Outcome: next_6m_donation_count
  • Suggested evaluation: MAE, RMSE (optional Poisson/Ordinal baselines)

3) Decision policy under constraints

Turn probabilities into an outreach policy:

  • choose an operating threshold given capacity/budget
  • compare FP/FN tradeoffs
  • validate stability across segments (country/region, rare types, eligibility)

4) Rare blood operations analytics

  • analyze is_rare_type by country prevalence
  • explore compatibility-aware matching using the lookup matrix

Modeling notes (avoid leakage / shortcuts)

This dataset intentionally includes engineered and overlapping fields for different notebook styles.

  • donated_next_6m is derived from next_6m_donation_count → use one outcome as the target.
  • eligible_to_donate overlaps with eligibility_status → keep one for simpler baselines.
  • eligible_to_donate == 0 implies donated_next_6m == 0 → for behavior modeling, consider restricting training to eligible_to_donate == 1.
  • donation_propensity_score is an engineered signal; exclude it for “feature-only” benchmark baselines.

Data quality expectations

  • donor_id is unique (no duplicate donors)
  • no duplicate rows
  • snapshot consistency (as_of_date fixed)
  • recency_days aligns with as_of_date - last_donation_date
  • country codes match the prevalence table
  • compatibility lookup covers all 8×8 donor/recipient pairs

Synthetic data generation (high-level)

Records are simulated to reflect realistic constraints and patterns:

  • eligibility rules and deferral reasons (age/BMI/health flags)
  • donation history distributions and recency behavior
  • country-level blood type prevalence used to derive per-donor prevalence context
  • ABO/Rh compatibility rules encoded in the lookup table

Synthetic distributions may not match any specific real-world population.


Limitations

  • Snapshot-style dataset (not a full longitudinal event log beyond history fields)
  • Synthetic distributions may differ from real operational settings
  • Engineered signals (e.g., donation_propensity_score) can act as shortcut features if used without care

Quick start

import pandas as pd

donors = pd.read_csv("blood_donation_registry_ml_ready.csv")
pop    = pd.read_csv("blood_population_distribution.csv")
compat = pd.read_csv("blood_compatibility_lookup.csv")

# Example join: add country population
donors = donors.merge(pop[["country_code", "population_size"]], on="country_code", how="left")
print(donors.shape)

License

CC BY 4.0 — attribution required.


Author

Tarek Masryo

Downloads last month
18