--- pretty_name: "Blood Donation Registry β€” Synthetic Donors, Prevalence & Compatibility" license: cc-by-4.0 language: - en size_categories: - 10K Tip: `load_dataset(repo_id)` will load the first config (here: `ml_ready`). --- ## πŸ—‚οΈ Data files ### 1) `data/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) `data/blood_population_distribution.csv` (39 rows Γ— 12 columns) Country-level population + blood type prevalence: - keys: `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 expectation:** blood type proportions sum to **1.0** per country. --- ### 3) `data/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/data_dictionary.csv` Column-level documentation for all files: - `file`, `column_name`, `type`, `description`, `allowed_values_or_range`, `missing_values` --- ## πŸ”— Relationships - `blood_donation_registry_ml_ready.country_code` ↔ `blood_population_distribution.country_code` - `blood_donation_registry_ml_ready.blood_type_country_prevalence` is derived from the matching country prevalence proportions. - `blood_compatibility_lookup` provides rule-based compatibility for donor/recipient blood type pairs. --- ## πŸ§ͺ Recommended tasks ### 1) Donation likelihood (binary classification) - Target: `donated_next_6m` - Suggested evaluation: ROC-AUC, PR-AUC, F1 + **calibration** (reliability curve / Brier score) ### 2) Donation frequency (count prediction) - Target: `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 under **capacity/budget** - compare FP/FN tradeoffs - validate stability across segments (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) - `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 training on `eligible_to_donate == 1`. - `donation_propensity_score` is engineered; 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 keys - 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 --- ## 🧾 Citation Tarek Masryo. (2025). *Blood Donation Registry β€” Synthetic Donors, Prevalence & Compatibility*. --- ## πŸ“œ License CC BY 4.0 β€” attribution required. --- ## πŸ‘€ Author Tarek Masryo