Predicting malaria burden across African countries from water, sanitation, and urbanization data. Random forest classifier achieving 86% test accuracy, built with pandas, seaborn, and scikit-learn.
# Malaria Burden and Infrastructure Access Across Africa (2007-2017)
## Overview
Malaria remains one of the leading causes of illness and death across the African
continent, but the drivers of its persistence go beyond mosquito nets alone. This
project examines whether access to basic infrastructure, specifically water,
sanitation, and urbanization, helps explain differences in malaria burden across
African countries over a decade of data.
A random forest classifier trained on infrastructure and population features
predicts a country-year's malaria burden level (Low, Medium, or High) with 86.4%
accuracy, substantially outperforming a logistic regression baseline (45.5%).
Feature importance analysis identifies urban sanitation access as the strongest
single predictor.
## Dataset
World Bank Open Data, compiled for all 54 African countries, 2007-2017
(594 country-year observations, reduced to 550 after cleaning). Includes malaria
incidence and case counts, water and sanitation access indicators, and urbanization
metrics.
Source: Malaria in Africa, Kaggle
## Key Findings
**Malaria incidence has been volatile, not steadily declining.** Continent-wide
median incidence fluctuated between roughly 156 and 190 (per 1,000 population at
risk) across the study period, with no clean downward trend despite over a decade
of intervention.
**Infrastructure access correlates with lower malaria burden, sanitation more
strongly than water.** Both show a clear negative relationship with incidence,
though substantial variation remains at every access level.
**A random forest model captures a non-linear relationship logistic regression
cannot.** The random forest achieved 86.4% test accuracy across three balanced
burden classes, compared to 45.5% for logistic regression, indicating the true
relationship between infrastructure and malaria burden is not linear.
**Urban sanitation access is the strongest predictor**, followed by rural water
access and rural population share. No s …