Seyid Abdellahi Ebnou Abdem, Mariem Bounabi, Rida Azmi, El Bachir Diop, Mohammed Hlal, Mohamed Adou Sidi Almouctar, Jérôme Chenal, Meriem Adraoui
Access to safe and reliable water is a major challenge for African cities facing rapid urbanization, climate change, and socio-economic transformation. In Morocco, water scarcity threatens urban resilience and development. However, a gap remains in forecasting household water demand under such evolving conditions. This study develops a data-driven framework to anticipate domestic consumption in Ben Guerir up to 2030. By combining advanced statistical and machine learning techniques, we identify household size and socio-economic profile as the main drivers of demand, while policy and technological measures have moderate but measurable effects. Both Random Forest and Generalized Additive Models achieve strong predictive accuracy ( $$R^2$$ $$\ge $$ 0.91 for both models). Scenario analysis shows that demographic and social shifts affect demand more than income or pricing alone. Focusing on an intermediate African city, this research highlights transferable methods and insights for similar contexts. The results offer urban planners robust forecasts and actionable strategies to anticipate and manage future water challenges to achieve Sustainable Development Goals 6.1.